XNA 3.1 to 4.0 cheat sheet

Nelxon Studio has a nice article about XNA version upgrade: http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/

Comments (7)

Cancel reply

  1. Fabian Viking says:

    Seems nice, just 2months to late for me..

  2. deadlydog says:

    Yeah, having this a few months ago would've been awesome. Oh well.

    Shawn, I notice that he has a change for making point sprites work in XNA 4. In the DrawPrimitives() function he just changes the PrimitiveType from PointList to LineList. Would this actually work?!?  I just spent a couple weeks completely removing point sprites from my app and replacing them with textured quads because I thought point sprites were totally removed from XNA 4.  If this workaround works, that would be fantastic….way less memory transfer on the vertex buffer for my particle systems….although I imagine a LineStrip would be more appropriate than the LineList….we'd just have to write the vertex and pixel shaders to handle it appropriately.

  3. ShawnHargreaves says:


    If you just changed point list to line list without any other modifications, you'd get a line between every adjacent pair of points, which is not at all the same thing.

    I guess you could use single pixel lines as a replacement for single pixel points, but you'd have to create pairs of vertices a pixel apart, and this wouldn't work at all for point sprites that were larger than one pixel.

    My recommendation is to use SpriteBatch as a replacement for code that used to draw points in 2D, or indexed triangles as a replacement for code that used point sprites for GPU particle systems.

  4. Andrew says:

    Shawn, I guess this is slightly heretical inside the MS mindframe, and that in any case this is the wrong place to ask the question, but could you say if it is at all THEORETICALLY possible to use XNA 4.0 with dotnet framework 3.0 ?

  5. ShawnHargreaves says:

    Andrew: I don't know for sure, but I would be surprised if that was possible.

  6. Ns79 says:

    are there any plans to implement shadows on phone, anyone got a lead on a tutorial for that or is that beyond the scope without effect files

  7. www.candyface77@yahoo.com says:

    boyfriend search.

    age 45.

    (he must like astrology )

    my interests. programming & web page development.

    sports: roller bladding.

Skip to main content