i've been using Xna 4 for quite a while now (2D mostly), but with the rumours about xna disappearing I thought to check out the real stuff (c++ & directX 10 sdk) and learn more about the 3D using the very good "Introduction to DirectX 10 game programming" book.
Doing this I discovered something weird (to me, that is). The HLSL in my book on DirectX 10 is different than XNA 4's. I'm starting to think XNA 4 is not directX 10, but then again i'm quite certain my XNA 4 games won't run on WinXP machines, so DirectX 9c is not supported.
Anyway, when i try to compile HLSL code from my DX10 book in XNA 4, i must change these things until it compiles: * "technique10" should be "technique" * SetGeometryShader must be deleted, it errors about the shader version that's not supported * the VS and PS version stated in the technique, are not supported (only <= 3_0 works)
So, why is there a difference, what am I missing between native DX10 and XNA 4? And if it's DX9c after all, why doesn't XNA 4 work on WinXP?
XNA 4 is built on D3D9. It absolutely works on Windows XP. XP is there in the list of supported operatoring systems. If your game doesn't work on XP, then there must be a problem with your game or how you're deploying it.
D3D10 brought some huge changes when it came out, and a lot of them had to do with Shader Model 4.0 which brought a lot of new shader features. There were also changes to the effect framework (which is seperate from core shaders), which is why you had to change "technique" to "technique10".
If you want to learn D3D10/D3D11, then I'm afraid you're going to have to actually use those API's. XNA is limited to a subset of D3D9-era functionality, which means you're going to get to a point in your book where there's no way to translate it back to XNA and SM3.0. If you want to know what you're missing out on by sticking with SM3.0, there's some info in the documentation:
thanks, after googling around a bit more, i indeed found out it's actually DX9 but with some non-standardized features (in hidef profile) that only work by DX10 supporting hardware. that's probably the reason why it's not working on xp machines, they often don't have DX10 hardware.
But thanks for clarifying even more.
So, i guess I'll have to learn C++ with all the difficult COM syntax and macro's. I'm a pro .NET guy for about 8 years, but damn, advanced C++ is hard to learn in absence of decent code completion and helping descriptions popping up everywhere. pitty c++ hasnt changed much the last decade. Even c++11 doesn't bring much improvement on the usability-domain imho. The IDE is just not very helpfull, like c# or any more mainstream language.
Ah well, i guess my hobby-games will have to settle with DX 9 It's more about the AI to me anyway.
I'm pretty sure the SlimDX guys have ported DX10 and 11 to C#. You may want to check that out.
External Articulation of Concepts Materializes Innate Knowledge of One's Craft and Science Beginner in Game Development? Read here. And read here. Super Mario Bros clone tutorial written in XNA 4.0 [MonoGame, ANX, and MonoXNA] by Scott Haley
If you have found any of the posts helpful, please show your appreciation by clicking the up arrow on those posts
How on earth can you go around telling lies, be shown that they are lies, then continue to ignore the evidence to the contrary. I'm not qualified to deal with this, sorry. - Hodgman Never crash to desktop. That's the equivalent of a Starbucks rep punching you in the face when you try to order a coffee with soymilk when they run out of soymilk. - Koobazaur For programmers, R & D means "Research & Duplicate". Just remember... XML is like violence. If it doesn't work, you just aren't using enough of it... - Moe Every time I go into my account settings I feel like I've never used the internet before. - boolean Person X: Do you want to live forever?
Person Y: No, but I want to live a long life.
Person X: Only cowards live that long.
Person Y: And yet, we travel to seek the counsel of these "cowards".
i already wondered why there wasn't anybody making some .NET interop of DX, but i figured XNA (what i thought to be DX10 before today) made any such attempt obsolete and that explained why no decent interop project existed.. but apparently they DO exist !!
thank you for your service but please close the door behind you, XNA