• Advertisement

Archived

This topic is now archived and is closed to further replies.

Best API to start with, OpenGL or DX?

This topic is 5501 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve been playing around with doing 3D graphics in javascript for awhile, and have done a few raycasters and projection engines. But I think it''s time to move on to doing it all in C (it''d be nice to be able to draw more than 1000 polygons per second without the frame rate dropping!). I''ve done quite alot of C programming in the past, in DOS and for various consoles but I''ve not really touched windows programming or either of the main graphics APIs. So anyway would it be sensible to get used to windows programming first, and perhaps use GDI until I''m comfortable with it? Or would I would learning DX/OpenGL as I learn windows programming be a better idea? I''ve heard that DX is a bit harder to learn than OpenGL, so it might be a better idea to start with OGL.. But learning DX would probably be alot more worthwhile than OpenGL in the longterm, would anything I learn with openGL be transferable to DX? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
anything done with OGL can be done with D3D ... if i were you i would try both for a bit of time and see myself which one i feel more comfortable with. Dont stick with the GDI you have.. other alternatives for OGL and D3D is allegro and "SDL?". correct me is it's wrong, isn't SDL a wrapper of D3D ?


[edited by - Metal Typhoon on January 31, 2003 8:06:39 AM]

Share this post


Link to post
Share on other sites
no SDL is a cross platform tool and thus is a wrapper around OpenGL

Share this post


Link to post
Share on other sites
DirectX is for the smart people =) (to start with of course)

Are you smart enough?


[edit]btw, this thread should be closed...
.lick

[edited by - Pipo DeClown on January 31, 2003 8:13:08 AM]

Share this post


Link to post
Share on other sites
DirectX is the better API to start with because it works with C# and C# is an overall better language than C or C++.

-- Exitus Acta Probat --

Share this post


Link to post
Share on other sites
quote:
Original post by jperalta
DirectX is the better API to start with because it works with C# and C# is an overall better language than C or C++.

-- Exitus Acta Probat --


in youre opinion. btw he asked about DirectX/openGL not languages, im sure you can find a few c++ vs c# if you look hard enough

Share this post


Link to post
Share on other sites
I myself started out with DirectX, wrote a decent terrain engine with it. Then I started trying out things in OpenGL and I was blown away by the much more simple method things are done (in my opinion at least). For me DirectX seems obscure and at times illogical. OpenGL on the other hand met what I felt a 3D api should be.

Whichever you go with, you will be pleased with the results. However I suggest you try both before deciding to go full steam ahead on one.

Share this post


Link to post
Share on other sites
if all u want is to do gfx stuff and see the results fast, yes OGL is preferable since its a lot more straightforward and simpler in syntax.
but if u''re in to learning the win32 API and extended dabbling into COM, then directX is a good direction. both API''s are equally capable, however directX has that ''advanced-coder'' feel to it.
me? i go with OGL... its more forgiving when the API encounters errors

Share this post


Link to post
Share on other sites
quote:
Original post by noVum
no SDL is a cross platform tool and thus is a wrapper around OpenGL


SDL provides cross platform input, sound, threads, timing and 2d graphics. While it is easy to integrate with opengl it isn''t really a wrapper for it. However, on windows SDL will use directx to accellerate it''s 2d graphics.

Share this post


Link to post
Share on other sites
Ok, again, both are capable of about the same things. DX has more functionality as of now, but it doesn''t mean that you can''t do the same thing with opengl. Anything that can be done in one, can be done in the other. Both are great api''s. Don''t use one because john carmack uses it, and don''t choose because of some dudes "opinion" about c#. I see that no one here is really giving any idea of what is different between them, so I''ll give you a little info so you can make your own decision. Directx is alot more complicated, it has many more functions, and it the functions tend to take a lot more information to use than do their opengl counterparts. Take D3DDEVICE->clear, and glClear for instance. Just look them up on msdn and you will see the difference. DirectX, through more functions, has alot more functionality built in than opengl does. For instance, the huge math libraries (quaternion, matrix, vector stuff galore) are great, D3DX is great, makes model loading and stuff a snap, you can use built in functions to load textures and many things of that nature. WIth opengl, you have to do all of this more or less manually, and some things (like model loading), can be quite a pain. Directx is not cross-platform. If that is a concern of yours (for many its not), then you''ll have to use sdl, or opengl. Opengl is easier, directx has more built in functionailty, opengl is crossplatform, dx is not in conclusion.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you don''t know the Win32 API yet I would have to suggest you start with OpenGL. Using GLUT, you don''t have to worry about all the Windows garbage. You can write a "normal" C/C++ app with main(), etc. rather than a Win32 app with WinMain(), WndProc(), message loops and all that hooplah.

Share this post


Link to post
Share on other sites
I started using DirectDraw, and i found it pretty easy to follow; I would say start with DirectX, and dont fall for the DarkSide(GL)

Share this post


Link to post
Share on other sites

  • Advertisement