Sign in to follow this  
MARS_999

OpenGL Questions to DX coming from OpenGL...

Recommended Posts

I am currently using OpenGL and am thinking of moving to DX9. Some things I have questions are 1.For the .X file format if I remember right DX has a function to load this without me having to code one right? So after I have it loaded will DX calculate the normals and tangent vectors for me also? 2.Will DX load .3ds files with a single function call? 3.Does DX support 24bit depth buffers and 24bit depthmaps for shadowing? 4.Would like to hear from people who have used both and what I can expect to miss or gain from switching... Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by MARS_999
1.For the .X file format if I remember right DX has a function to load this without me having to code one right? So after I have it loaded will DX calculate the normals and tangent vectors for me also?


I only experimented with the mesh class briefly, but if the normal data is in there it should do it. If not then there's probably some other function to do it.

Edit: I found ComputeNormals and ComputeTangent functions for MDX, so you should be fine here.

Quote:
Original post by MARS_999
2.Will DX load .3ds files with a single function call?


No, only .X files and some image formats(bmp,jpeg,tga,png).

You could of course just convert them to .X

Quote:
Original post by MARS_999
3.Does DX support 24bit depth buffers and 24bit depthmaps for shadowing?


Yes to the depth buffer(if your card supports it of course). Not sure what a depthmap is, but in general if it can be done in OGL, it can be done in D3D.

Quote:
Original post by MARS_999
4.Would like to hear from people who have used both and what I can expect to miss or gain from switching...


You'll gain a more object oriented structure plus the D3DX helper classes; textures, sprites, fonts, matrices, meshes and other fun stuff. What you'll lose is the ability to draw you first triangle quickly. In D3D you have to create a vertex buffer and the triangle data, in OGL all it takes is a few glVertex calls. However as your scenes become more complex you'll be glad vertex buffers are there. This is of course my completely bias opinion though since I prefer D3D( would be nice if we had an OO version of OGL ).

Oh yeah and you can kiss cross-platform code good bye, unless you count Windows<->XBOX as cross-platform.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this