🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Starting Direct3D

Started by
8 comments, last by ZomeonE 24 years, 5 months ago
I want to start coding some direct3d stuff, but where do I start. Is there any good book that I should buy? Should I start with RM or IM?
Advertisement
Well starting direct3d is a bit tough....But it''s fun though.. :o)
u might start by buying INSIDE DIRECTX from amazaon.com
if u want do fast coding i suggest having a look at the source codes and the SDK tutorials...I began it all with this.
The net is rich with DirectX resources...and if u still need any help i am here :o)
About which mode to use that depends on the appplication u wanna develop and i think u will find rich explanation about the difference between them in the SDK documentation.
Anyway go for the immediate mode if u have enough graphix experience ,if not go for the retained mode

Thankz!
Woohoo. I was going to post a question, but I think I can sneak it under this topic. I''m starting to write a D3D add in for my 2D game (for hardware alpha), but I can''t seem to get the basics working. I downloaded the libs and docs (sdk is too big), and I tried entering the triangle tutorial from the docs, but I can''t get the triangle on screen. (Darn its hard to get an image in 3D. That 1st step is always the hardest). Do you have a copy of the source file for this tutorial, and if so could you e-mail it to me? I followed the docs (except I went full screen), but no triangle, and I can''t find my error.

Thanks.

Rock
Of important note--Inside DirectX contains no information of Direct3D. It''s about all the other parts of DirectX. It is, however, a very good book about what it covers.
oh gosh i've had so many problems getting d3d setup correctly to display just a triangle. i mean after that it's great, but the initialization is a pain. are you just init d3d directly? i just started a 3d modeller and it uses ID3DXContext and it greatly simplifies D3D initialization. the d3d util library also includes functions to make the view and projection matrices for you, which i've found to be the problem most of the time when i can't get the triangle to show. clearing the buffers to a color other then black also helps in case the triangle is drawn with no light. also make sure it isn't being clipped, i was stupid a couple times and created projection matrices with near Z at 0.0f and far Z at 1.0f.

but above all, if your triangle is being placed correctly (i'd put it at (0,0,0)), check to make sure your view matrix is pointing towards it and that your projection matrix isn't screwed up


Edited by - mutex on 1/3/00 7:42:57 PM

Ok, if you''re writing an editor take a look at retained mode since it has mesh functions, and you can pick primitives out of the mesh. If you''re good in math then go with Immediate mode and write those functions yourself if you really want to or need customized ones. I started in d3d by shutting the lighting off and used D3DLVERTEX struct, in which you specify the color yourself. Then I switched to D3DX that made it heck of a lot easier to setup my app. The wireframe mode in dx7 imm.mode is broken so if one of your primitive''s side touches the clipping plane it goes haywire. Try retained mode where the wireframe works, and can use progressive meshes for LOD. Above all, if you have a great game idea and want to implement it quickly go with an already made engine with a strong editor, like Genesis3D. To go beyond writing a simple room in d3d/OpenGL you need an editor because you will get lost in all the drawprimitive() calls without one. Plus you''ll need to write some kind of structure that holds visible and non-visible polygons to speed up rendering. Plus you will need physics, sound, input, installer and other routines and unless you''re a wizard or have 5+ years of free time then I suggest picking an already made engine, Genesis3D, CrystalSpace, or others. This is from my own experience. Most people think about the rendering side only, forgetting the other stuff like managing large code, documentation, finding/fixing bugs in later stages, and other major parts.
There are some smart cookies out there that can pull it off and more power to them;)

Jerry
I have a very useful program if you are interested in it. I is used with D3D IM, so that newbies don''t have to code all the enum code/setting selection. It is a small program that lets you select all the stuff you need to start out (driver, device, display mode, z-buffer format) and then it saves the important info in the registry. So all you have to do in your code is call simple funtions that I provide to get the info out of the registry. For example, to get the driver GUID, you call GRegReadDriverGUID() it is very simple, and FREE. Let me know if you want it, I''ll email it to you.

Pseudo_Me@email.com
Pseudo
Send it to me please! :-)
start wit D3D7X
it pretty cool, really easy, you can consentrate on da game more.

This topic is closed to new replies.

Advertisement