DirectX with C# - some questions

Started by
1 comment, last by sharpshooter 21 years, 2 months ago
I've been programming a little OpenGL with C++, but liking Java I've decided I'll focus on C# from now on. However, since I'll be programming for Windows only I thought it may be more convenient to use DirectX instead of OpenGL since both DX and C# are Microsoft products and therefore may be easier to use together than C# and OpenGL. Now to my question. I'll be programming 2D-applications/games only and I've read that since DX8 more overhead is involved in setting up 2D stuff than there was in DX7. Is this reason enough to stick to DX7 and learn that instead of DX9? I'm completely new to DirectX but familiar with 3D-programming concepts from a university course in computer graphics where we used OpenGL and I've also programmed some (not a lot) myself. So, should I learn DX7 or DX9? And is it difficult to move from OpenGL to DirectX - is it mostly about learning new names for functions or is the structure of the APIs very different? [edited by - sharpshooter on February 8, 2003 9:12:36 AM]
Advertisement
I dont believe you can use dx7/8 with c#. AFAIK only dx9 has managed interfaces. If I were you I''d learn dx9 cause it''s that latest, and it has good 2D functionality, and you acn also perform 3D operationson 2D stuff (like alpha blending) which you cant do with direct draw. But dx9 is only for win98+ so if you want win95 users to be part of your compatability scope, you can use dx8 instead. but then there are no managed interfaces with dx8 so...you''re back to square one



:::: [ Triple Buffer V2.0 ] ::::
[size=2]aliak.net
You should use DirectX 9 for any programming with .NET. It included DirectDraw classes for 2D programming and is actually much easier and readable than DirectDraw7 code. There are good examples in the SDK for C# and VB.NET, though the documentation for DirectDraw is basically non-existent aside from the layout of the classes. Btw, any code you find for VB.NET will also work the same (for the most part) in C# except for syntax (like saying ''null'' instead of ''nothing'').

Check this out: http://www.codeproject.com/useritems/mdx_tutorial1.asp

This topic is closed to new replies.

Advertisement