hi, i'd like to start with 3d programming. but i'm confused about all the different kinds. there is opengl, directx, directdraw, direct3d, .... what are the differenced, advantages, disadvantages? thanks
Posted on 2001-03-05 12:31:00 by [SaFc0n]
OpenGL is a cross platform API, and has quite a long (for 3D anyway) history. DirectX is a MS "answer" to OpenGL, and as time goes on the two become more and more similar in what is offered. DirectX is infact a package of several "games and media" related APIs, DirectDraw, and Direct3D being a part of it! It also includes DirectInput (Keyboard, Joystick, Mouse). Sound (Not sure about the name maybe DirectSound :P ) DirectPlay (Network stuff ? ) DirectArmadillo (Armadillo related stuff) Quake3 used OpenGL for its graphics engine, and DInput, DSound etc as a "plug in" for PC version. Basically professionals used OpenGL long before DX, and so they say "it is more refined", but I don't personally know! Also OpenGL has a more "open source" kind of feel about it, and so has more (C/C++) code available for it. Mirno ** To answer your question about DDraw & D3D ** DirectDraw is a 2D interface, it lacks many of the features of D3D (HW accelerated alpha blending etc.). DX8 provided no new DDraw stuff (lack of time apparently), the old DDraw7 (and previous) interfaces are there, but no new stuff 'til DX9 (?)! D3D provides all the functions to do all kinds of 3D stuff, and with DX8 there are (programmable) Vertex & Pixel Shaders, which look very cool (but run dog slow unless you've got a GeForce3). nVidea have provided OpenGL extensions that access the vertex shaders & pixel shaders in OGL, but as they are extensions, they are not officially a part of OGL yet! This message was edited by Mirno, on 3/5/2001 1:10:25 PM
Posted on 2001-03-05 13:04:00 by Mirno
Basically if your trying to decide between OpenGL or Direct3D, I'd recommend OpenGL. Why? Well, if you try to judge them based on speed its always very hard to know. Basically (they say) both have their own pros and cons; OpenGL is better for some things, D3D for others (peolple never seem to be able to elaborated on this though) The main reason I choose OGL over D3D was, because D3D hides too much of the underlying 3D maths from the user, this prohibits, or least limits how well you would be able to optimise code written for it. Clearly for an assembly programmer this is unacceptable. As for OpenGL it gives you complete access to its internal matrices, textures, everything. Plus theres an awful lot of great tutorials for OGL at nehe.gamedev.net and while I'm at it why not plug my own site snw.cjb.net
Posted on 2001-03-05 14:26:00 by Zadkiel
Hi 3D Programming is only ONE :) there are diffrent API's to choose from...this choose of one of the current API's is a matter of personal taste, experience and needs :) OpenGl and DirectX are more and more looking allmost the same... the only 2 sure things about them: 1.OpenGL is more portable to diffrent systems, other then Windows (tipicaly Unixes) 2.OpenGL is slower or not fully supported on Windows, as Micro$oft is trying to push DX in front and driverse for diffrent video boards (other then Geforce 3 of course) dont support OpenGl so well Indeed i have seen a lots of OpenGl programs that do work excelent on a special video board and fail drastically on another video board (even on my Voodoo 3 witch is not so old or slow) Is my personal oppinion that OpenGl architecture is still more advanced then DX8...... BUT has a few critical flows on Windows: like no real cool way to setup full screen exclusive mode :( and lack of drivers to support it, also hard to do 2D with it, pathetic supoort (up to none) for Sound and Network (have you lately seen any game without Sound and Network?) DirectX has the speed on its side, especially on Windows that is optimized for. DirectX also has companions like DirectDraw (well not in DX8 anymore) that can do optimized 2D and gives you ASM hardware access to the "video frame buffer" DirectSound will give you hardare acces to the sound board DirectPlay for Networt DirectMusic/Media for music.play movies etc So on a windows system DX8 is better integrated and has ALL the functions you need to make a game....typically OpenGl himself will use some of them :) I hate to say it but Micro$oft did a great job here...only now they are trying to destroy it (with DX8 beeing notoriouse SLOW on with stupid no 2D support, and that lack of understanding versus a hardware suported Alpha Blending for 2D games)
Posted on 2001-03-05 20:35:00 by BogdanOntanu
I just have to reply to BogdanOntanu about OpenGL and D3D. In every game i've ever seen that supports both D3D AND OpenGL, the OpenGL mode is always twice as fast. And as soon as you switch to D3D mode your fps is halved :) Now i do not know what GFX card you have but openGL has always been faster on NVIDIA and 3Dfx cards. And also it looks a LOT better. Visit an official forum of a game that supports both OpenGL and DirectX and you will see what the users have to say about DX vs OGL speed ;)
Posted on 2001-03-24 08:33:00 by Zynaps
I will say that the OpenGL for VooDoo3 sucks :) Newer boards are much better. DirectX is better on this card. Yes, I have owned and used a VooDoo3 since it came out - payed way too much for it :(
Posted on 2001-03-24 09:47:00 by bitRAKE
By curiosity, someone already did a code for OpenGL and other for DirectX (both in w32asm) and did they measure its speeds? (I would like to do that, but...) :) Other question, if I was going to do a CAD program, which is better to use: OpenGL, DirectX or a simple GDI way? :)
Posted on 2001-03-25 14:01:00 by wolfao
Thats a great suggestion, however its quite hard to devise a fair test and it would probably also be very hardware dependant. Anyway as regards your cad program, well if its going to be 3d then I would not advise GDI. And going by information I've read on the net, all CAD programs use OpenGL, it seems to be one thing that all are agreed on that OpenGL is better for.
Posted on 2001-03-25 16:25:00 by Zadkiel
One thing more to say: OpenGl is much easyer to use then DirectX, that's why high level developers prefer it, they do little and get results out faster, DirectX is more basic, that's why every video board has decent drivers for it, and yeah it gives you access to a lower level of the video board (as the frame buffer or the video memory itself) its a NATIVE API to Windows(c) OS's so its logically faster, i mean on the same testing conditions (but that is hard to get :D as every board favorizes one or the other of the API's) I have to state here that there is no such thing as a better API, API's come and go, algorithms remain, programers remain...but is a changeing world, learn to live with change :) most of all learn to learn.... INHO DirectX is a more "low level" API and so its more close to the ASM style and feel, but i encourage others to disagree and learn for themselfs ... After this 2D game is will start a 3D one and then i will take time to test the power of both API's in extensive tests Then i will choose the one that is faster and i mean not faster to make programs ...faster to execute at run time :D and the one that gives me more control over the hardware...up to register level if possible :)
Posted on 2001-03-25 20:31:00 by BogdanOntanu