Hi,
i was trying GSE beta 1. It was working ok. Now i have just installed Beta 2 and i got problem.
When i try to do:
m_spriteBatch = new SpriteBatch(GraphicsDevice);
i get exception "The method call is invalid."
also when i try to run code that we can find in XNA GSE Programming Guide : Use BasicEffect i get exception "Both a valid vertex shader and pixel shader (or valid effect) must be
set on the device before draw operations may be performed." in line
"graphics.GraphicsDevice.DrawPrimitives...."
does any one know how to fix this problems
thanks for any help!

Problem wih Beta 2
WalangAlam
Jarek Błaszczyk
i'm pretty disappointed by this :(
okcompute.
js111
Suthy67
It's vaguely possible that the SpriteBatch implementation in beta1 wasn't checking for this, and would somehow let you get away without one, but that was never the intention!
Jehan Badshah
Make sure that the following code:
graphics =
new GraphicsComponent(this);is now this:
graphics =
new GraphicsDeviceManager(this);The object required for graphics has changed in B2.
Hopefully, that helps.
Ignatius V Ignatius
I have an Intel Integrated card as well and also cannot run with beta 2, but worked fine in beta 1. It looks like beta 2 has made it mandatory that you have a pixel shader, which the integrated card does not have. Although it has a vertex shader which is odd...
Regards
arthurmnev
Mac Jamb
Intel dx8.1 grfx card on laptop
I want to upgrade now (have the cash) but dx10 is just around corner and dont want to get dx9 grfx when 10 is only months away in laptops, guess Im screwed
Heres a fix: sorta
whereever it throws an exception add empty try catch block on that line of code
try
{
code throwing exception;
}
catch (InvalidOperationException e)
{
}
After that you get a BUNCH of NullReferenceExceptions dealing with same pieces of code
go thru and add more empty try/catches on these too.
This will allow it to compile.
I moved the compiled executeable to a puter w/ dx9 grfx card and it ran fine.
Although even though beta 1 compiled it never ran spacewar right neway on my lappie.
But for now this should get u compiling.
swells
Ditto, here on my laptop.
tankImage = content.Load<
Texture2D>(@"Content/Graphics/tank");spriteBatch =
new SpriteBatch(graphics.GraphicsDevice);Causes invalid method call.
Going to load on my desktop and see if issue persists.
***************************************************************************
UPDATE:
I just loaded XNA beta2 on my desktop with a Radeon 9600 and this same line of code works fine. Must have something to do with DirectX 9 hardware compatability.
Ashok Kumar Roy
The problem seems to be that my graphic card does not accept Shader Models 2.0 (DirectX 8.1) since it is an old card, nVidia GeForce4. Yet I don't want to upgrade now because we have DirectX 10 (using Shader Models 4.0) coming up in a short time and I want a card that supports it.
To inform the community I have just found that for the last part of this year the first nVidia processors supporting that technology will be released, so we can expect them to come shortly in a few weeks (I found nothing about ATI or others). But until then... people of MS, what do we do if we want to use XNA My code copiles perfectly but I can't test it!
Angry Coder
Simply don't use SpriteBatch. Use your own redering method with a shader that your hardware supports i.e (ps_1_1).
JoshKorn
CharissaJB123
Chances are that something somewhere in XNA is setting the minimum pixel shader mode to 2.0
Ghoort
support his opinion.
Hope to support fix-pipeline graphics. It should be ideas and content that are real count for a game, rather than just greate graphics supported by shaders.
.net framework 2.0 + sm2.0 card + c#. It's hard, not easy.