D3DX progression
Ive attempted OpenGL but ive encounted a few speed and compatibility problems with it, and I found the drivers to be a bit sketchy.
Since my game is mostly 2D, and OpenGL doesnt blit 2D, Ive decided to stick with DX for now, but im affraid learning 3D will be a long tedeous task. D3DX is supposed to be easy to use...right?
My main objective at the moment is to use some 3D for my backgrounds. The backgrounds are still (u cant wander through the scene), and there will be 2D blits over the background.
For those who have used D3DX, a few questions...
Q1: Is the D3DX interface capable of creating mini scenes, for example, rendering a 3D floor, a few trees, and a building?
Q2: Can i easily load an X File into D3DX?
Q3: Can DirectDraw blit over a D3DX rendered surface?
Q4: Is lighting and shadowing easy to implement in D3DX?
Downloads: ZeroOne Realm
I''m doing D3DX right now and I can say the D3DX makes it *almost* as easy as OpenGL if you know directdraw and all COM stuff..
In OpenGL you can just do the call the API functions. In D3DX, you call them through a interface pointer
like this OpenGL
In D3D
1. Of course. It just wraps around buffer creation, and the monotonous tasks. You can get a pointer to the direct3d interface and do it yourself too.
2. Don''t think so but there is BMP all those. Only the Retained Mode has a loader. I think the DirectX X file ref section has a tutorial on loading X files
3. Haven''t tried that
4. Doesn''t seem much difference from OpenGL in DirectX 7
In OpenGL you can just do the call the API functions. In D3DX, you call them through a interface pointer
like this OpenGL
glRotate
In D3D
lpdev->Rotate // this function does not exist. Just illustration
1. Of course. It just wraps around buffer creation, and the monotonous tasks. You can get a pointer to the direct3d interface and do it yourself too.
2. Don''t think so but there is BMP all those. Only the Retained Mode has a loader. I think the DirectX X file ref section has a tutorial on loading X files
3. Haven''t tried that
4. Doesn''t seem much difference from OpenGL in DirectX 7
June 12, 2000 11:09 PM
When it comes to programming, I hate how people throw around the word ''easy'' and ''difficult''. Sorry, it''s just a pet peeve of mine. Things are only easy if you know what you are doing. D3DX, imho, is easy if:
1) You have a good linear algebra background.
2) Understand COM
Yet, its easier to learn than D3DIM. I won''t dispute that.
In response to the questions,
1) As void stated, yes.
2) You need to wait for DirectX 8 for D3DX to load X files.
3) I''m assuming it can, but if you are using 3D anyway, why put in the extra overhead to add 2D? Why not just render the 2D images onto a 3D surface. That will make life a lot easier.
4) Void answered best.
1) You have a good linear algebra background.
2) Understand COM
Yet, its easier to learn than D3DIM. I won''t dispute that.
In response to the questions,
1) As void stated, yes.
2) You need to wait for DirectX 8 for D3DX to load X files.
3) I''m assuming it can, but if you are using 3D anyway, why put in the extra overhead to add 2D? Why not just render the 2D images onto a 3D surface. That will make life a lot easier.
4) Void answered best.
quote:
Since my game is mostly 2D, and OpenGL doesnt blit 2D, Ive decided to stick with DX for now
Usually what you do is draw a textured polygon right next to the screen. Not too hard, but I digress .
quote:
Q1: Is the D3DX interface capable of creating mini scenes, for example, rendering a 3D floor, a few trees, and a building?
Somewhat correct there, but it sounds more like your asking if D3DX has D3DRM like capabilities. It doesn''t. D3DX is simply a helper library for D3DIM, but it''s *not* meant to replace it.
quote:
Q2: Can i easily load an X File into D3DX?
Nope, but look for the files d3dfile.h and d3dfile.cpp in the SDK for some code which *does* load an X file.
quote:
Q3: Can DirectDraw blit over a D3DX rendered surface?
Yep.
quote:
Q4: Is lighting and shadowing easy to implement in D3DX?
D3DX doesn''t have any lighting functions, since, as I said, it''s not meant to replace D3DIM. D3DIM''s are pretty much like the ones you''ll find in OpenGL.
--TheGoop
I need lighting, so i guess i should be using Intermidiate mode, not D3DX. Ive looked at the Tentacle sample, and it seems D3DX is quite capable, but i dont see any real lighting effects in any of the samples. But i dont know much about 3D programming, and i dont want to spend months learning (yet). Is intermidiate mode difficult to get a grip on for someone who knows little about 3D? I learnt DDraw and DSound in a couple of weeks, surely D3DIM wont be that much harder...right?
Downloads: ZeroOne Realm
June 13, 2000 09:44 PM
quote: Original post by SikCiv
I need lighting, so i guess i should be using Intermidiate mode, not D3DX. Ive looked at the Tentacle sample, and it seems D3DX is quite capable, but i dont see any real lighting effects in any of the samples. But i dont know much about 3D programming, and i dont want to spend months learning (yet). Is intermidiate mode difficult to get a grip on for someone who knows little about 3D? I learnt DDraw and DSound in a couple of weeks, surely D3DIM wont be that much harder...right?
If you have a good understanding of DDraw and COM, D3DIM shouldn''t be that difficult to learn. However, seeing as you said you only took a couple weeks for DDraw, my guess is you probably don''t want to move onto D3DIM. An analogy for a novice would be like drawing a stick figure, then thinking you can paint the Mona Lisa.
The hardest thing about 3D is really not the programming, because once you have it down, it should come easy. The hardest thing imo is learning the math and formulas that go behind the 3D. And for that, trying out D3DX would probably be the best thing for you to do, unless you really just need lighting effects, and absolutely nothing else, but still, it''s always better to learn the basics.
quote: Original post by SikCiv
I need lighting, so i guess i should be using Intermidiate mode, not D3DX.
Just a quick note: it isn''t a case of using D3DIM -or- D3DX. D3DX is just a nifty wrapper for simplifying D3DIM tasks, not a replacement. When you use D3DX, you -are- using D3DIM, but via D3DX functions to save you a lot of typing and hard work.
What this means for you, is that you can use D3DX for your setup etc, saving a lot of work, drawing your background, etc, and just use normal D3DIM calls to render your 3d models, etc.
You don''t have to give up D3DX just because it doesn''t do everything you want. Just use it wherever it helps.
June 14, 2000 10:15 AM
to SikCiv,
My buddy and I used D3DX and D3DIM for our simple game project.
You can check out how the game runs at my buddy''s site at http://people.unt.edu/~crichard/
Just follow the link to the "DeathBall Game" on the left hand side. Be sure to read the System Requirements and Readme stuff.
(And you can check out what he''s up to at the Game Company he''s working at)
-TnT
My buddy and I used D3DX and D3DIM for our simple game project.
You can check out how the game runs at my buddy''s site at http://people.unt.edu/~crichard/
Just follow the link to the "DeathBall Game" on the left hand side. Be sure to read the System Requirements and Readme stuff.
(And you can check out what he''s up to at the Game Company he''s working at)
-TnT
One of the most annoying things with DirectX (and Direct3D) is that initialization requires tons of code. I think the main thing D3DX does is simplifies all that into one function call (or close to it). D3DX also has a lot of math helper functions which are very useful, but again, it''s not a replacement.
Thanks Kylotan,
I had no idea u can mix D3DIM and D3DX, that changes everything.
TNT: ill check out your game. Is the source available? I need something to learn off other than the Microsoft samples.
I had no idea u can mix D3DIM and D3DX, that changes everything.
TNT: ill check out your game. Is the source available? I need something to learn off other than the Microsoft samples.
Downloads: ZeroOne Realm
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement