Does anybody know where can I get a very good tutorial (step-by-step) on using DirectX or OpenGL in C++? And which one is better and faster?
Thanks
OpenGL
DirectX
Does anybody know where can I get a very good tutorial (step-by-step) on using DirectX or OpenGL in C++? And which one is better and faster?
Thanks
what does signature stand for?
Good tutorials can be found at NeHe (OpenGL) and NeXe (DX) as well as www.gamedev.net (both). Neither is better, per say. Though OpenGL is portable whereas DX is limited to the Windows platforms.
[/leaves the room before the mud slinging starts....]
Last edited by jdinger; 07-25-2002 at 05:39 AM.
I checked out those sites but the tutorials there arent good enough for me to understand ... I also tried 3dlinks.com but found nothing that usefull...
Thanks
what does signature stand for?
I'm not sure about this cause I never got an answer out of anyone here but I think OpenGL is not thread safe and DirectX is. So for windows at least, DirectX makes the most sense. Unless someone can finally give me some info about this.
what does thread safe mean??
what does signature stand for?
when you are multithreaded there is a danger of things getting fouled up when two threads are essentially accessing the same variables at "the same time". So when you have globals that are used by two threads and one thread changes it to something that the other thread didn't expect you have a crisis.
Thread safeness usually means not sharing variables and protecting variables that are shared from being accessed at the same time.
OpenGL is a "state machine" which means everything is global states. if you access things in multiple threads you can have incorrect states for certain lines of code. Got it?
Computer graphics in general and especially 3D is not an easy topic (until you get into) so don't expect to pick it all up in a week.
For OpenGL, Nehe's site is by far the best
I found Drunken Hyena to be useful for DirectX stuff. It's similar to the layout of Nehe's but geared towards DirectX instead. Version 8 I think. Which brings to mind: use DirectGraphics if you're going to be learning DirectX. DirectDraw is no longer being updated and it's much easier to do stuff within the DirectGraphics routines, even 2D. Also read though the API documentation. It is very helpful and detailed.
I used to program in DirectX but I've moved to OpenGL. DirectGraphics is good but previous version can get down right ugly.
Starting out, I'd say go with OpenGL. Plus, you can find much better support for OpenGL. There are lots of books available (do a search for the OpenGL 'Red Book' and 'Blue Book' both are available free online). DirectX books always seem to be outdated.
One Question: Do OpenGL drivers come with windows98 (SE) or do I have to install them manually??
what does signature stand for?
If I'm not mistaken they are a video card specific implementation. so your video card driver has to support it. I think most all do though.
always looking, make an offer. get me out of this place.
Video card... Do you mean 3D Graphics Card?
what does signature stand for?
no, I mean video card, many of which have 3d graphics built in, that's true.
My understanding of OpenGL and DirectX is this. They allow directX to the hardware. Hardaware means videocard and potentially a 3d accelerator. They "emulate" the features that the card does not support such as 3d effects. Someone correct me if this is wrong.
always looking, make an offer. get me out of this place.
What do you think is better... DirectX or OpenGL??
what does signature stand for?
"better" is fairly objective. For portability, as people have been saying, of course OpenGL. But there are other issues I think. Some that I'm not entirely sure of. For one, what if a system doesn't have OpenGL set up? I have seen that. you can't play the game? That's pretty bad. OpenGL is dependant on the card manufacturer providing it. With DirectX, game manufacturers are able to distribute it. It's not card dependant as far as I can tell. Does that make sense?
DirectX is Windows only but for window-only games I say go with it.
On the other hand.... I really only know OpenGL. is that clear?!?!?!
always looking, make an offer. get me out of this place.
Ok... and another question ... what is Easier??
what does signature stand for?