PDA

View Full Version : Breaking changes in XNA Game Studio 4.0



Fengol
16-03-2010, 05:21 PM
http://blogs.msdn.com/shawnhar/archive/2010/03/16/breaking-changes-in-xna-game-studio-4-0.aspx

* RenderTarget2D now inherits Texture2D: no more GetTexture method
* Replaced Effect.Begin and End with a new EffectPass.Apply method

are annoying but:

* Vertex buffer sizes are now specified as number of vertices rather than bytes
* You no longer need to specify a VertexDeclaration before drawing, because this is implicit in your choice of vertex buffer

which is awesome!

So if you have XNA projects expect them to break, this seems a pretty major change!

dislekcia
16-03-2010, 06:37 PM
I like that they removed the vertex shader setup that SpriteBatch used to do. That will make a lot of overlay and interface elements easier to do.

The vertex declaration dying is a good thing, not too sure about EffectPool and ClipPlane going the same way, but they probably weren't being used enough with people just rolling their own. I like that you're essentially forced to type your shaders into subclasses of Effect now, that's much better and less prone to side effects in code.

Chippit
16-03-2010, 07:13 PM
* No more SpriteBatch vertex shader magic, so you can easily position SpriteBatch text in a 3D world using BasicEffect

That's interesting too. That vertex shader magic was quite clever, though. I wonder if this'll make it slower on the Xbox.

dislekcia
16-03-2010, 07:35 PM
* No more SpriteBatch vertex shader magic, so you can easily position SpriteBatch text in a 3D world using BasicEffect

That's interesting too. That vertex shader magic was quite clever, though. I wonder if this'll make it slower on the Xbox.

You found a source for what was actually going on there? Gimme!

Chippit
16-03-2010, 07:54 PM
I actually have the source of the shader itself. Somewhere.

In fact, turns out I have the source for BasicEffect too. Which is actually anything but. Go figure.

Fengol
23-03-2010, 06:22 AM
again from Shawn Hargreaves's blog; explaining why point sprites were removed and what to do instead. It's worthwhile if you've gone through the XNA Creators Club 3D Particle sample (http://creators.xna.com/en-us/sample/particle3d).

http://blogs.msdn.com/shawnhar/archive/2010/03/22/point-sprites-in-xna-game-studio-4-0.aspx