Jump to content
  • Advertisement

Archived

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

Unreal

OpenGL OpenGL or DD/D3D?

This topic is 6490 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

Advertisement
You must choose and choose wisely, for while the real API will bring fame and fortune the false API will take it from you.

Flame on!

Go Wild!


The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

Share this post


Link to post
Share on other sites
Either one. Or both. When people tell you one API is faster than the other, bear in mind that that might be true for their 3D card, however, in the general case, neither API is faster.
If you use OpenGL, you can use it for Linux and MacOS programming as well. If you use Direct3D, you can use it for the XBox (when it is released).
OpenGL has an extensions mechanism by which you can use the latest features of the card before a new version of OpenGL is released. This is both a good and a bad thing, since if you want to use a new feature in OpenGL which is an extension, you have to write a piece of code to detect the card and select the appropriate extension, and if it is not present, write some software emulation for it (extensions are not emulated in software mode) Also, if you use OpenGL, changing the screen resolution and color depth for a fullscreen mode is much harder (I''m not sure if you even can change the color depth).
If you use Direct3D, you cannot use the latest features of a card until the yearly update of Direct3D. However, once it is updated, that feature is available in the same way on all cards. Also, on some of the cheaper video cards, there are only Direct3D drivers, and no OpenGL ones (I have one of these PCs, and it is very annoying that I cannot play Quake III or Star Trek Voyager: Elite Forces). Some people say that OpenGL is easier to use and that it looks ''cleaner'' than Direct3D. Some people say the exact opposite. I would advise that you read the forum FAQ if you want a more detailed discussion about Direct3D and OpenGL.



Just because you''re outnumbered doesn''t mean you''re wrong.


sharewaregames.20m.com

Share this post


Link to post
Share on other sites
quote:
Original post by Yorvik

learn them both. but learn opengl first (it''s easier to pick up - imo)


DX8 isn''t too hard, the only problem is the lack of online tutorials (I only use it for 2D, and I''m not planning to move to 3D as I don''t have the resources or skills to do so). I wouldn''t say that you should definitely learn OpenGL first. I mean, you should look at them both first, then choose one based on what you have seen.



Just because you''re outnumbered doesn''t mean you''re wrong.


sharewaregames.20m.com

Share this post


Link to post
Share on other sites
quote:

Also, if you use OpenGL, changing the screen resolution and color depth for a fullscreen mode is much harder (I''m not sure if you even can change the color depth).



Yes, you can change the color depth . It does it the same way DirectX does it, except that DirectX (since it is only usable in a Windows environment) wraps it for you. OpenGL isn''t sure what OS you''ll be using, so you get to do it on your own .



http://www.gdarchive.net/druidgames/

Share this post


Link to post
Share on other sites
I''m moving from D3D8 to OpenGl. Here''s why:
1) Because D3D optimizes everything to an extreme amount, performing vertex level operations is often conceptually fairly difficult because the vertices are often loaded into the graphics card for purposes of acceleration. Vertices are much easier to deal with in OpenGl.
2) OpenGl is stable. There are many many good books on OpenGl. Direct3d is still growing -- DX8 was just released, yet there are only good books on DX7.
3) The DX8 tutorials all assume a sort of "retained mode" thinking. Basically, the DX8 tutorials use wrapper classes and x files like there is no tommorrow. So what ends up happening is that the wrapper classes magically load an .x file. One never even sees the vertices, making it difficult to perform vertex level operations.
4) Academic code is written in OpenGl. Almost all of the code I''ve seen for cloth simulations, collision detection, deformations, etc. are written in OpenGl.

DX does however, rock in terms of directsound, directplay. I had a directplay program up and running in under a week, its that easy.

DmGoober

Share this post


Link to post
Share on other sites
changing screen mode using win32 + opengl is easy heres an example



bool SetScreenMode(int width, int height, int depth)

{

DEVMODE dmScreenSettings;
memset(&dmScreenSettings,0,sizeof(dmScreenSettings));
dmScreenSettings.dmSize=sizeof(dmScreenSettings);
dmScreenSettings.dmPelsWidth = width;
dmScreenSettings.dmPelsHeight = height;
dmScreenSettings.dmBitsPerPel = depth;
dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;
ChangeDisplaySettings(&dmScreenSettings,4);



}

Share this post


Link to post
Share on other sites
Suggestion for Furby:

Seeing as how the same question seems to find its way to this board about 10 million times a day (which API is better? OpenGL or D3d?? Which should I bother learning?? etc)..

Dude, you should have the FAQ link in 18 pt. fontsize, as well as a banner that pops up when someone is going to post a new topic saying "Have you read the FAQ?"

just my 2 cents...

And hey no disrespect. We''ve all been beginners, and we all know what''s it''s like...

Wazoo

What we do in this life,
echoes in eternity!

Share this post


Link to post
Share on other sites

DmGoober:

quote:

2) OpenGl is stable. There are many many good books on OpenGl. Direct3d is still growing -- DX8 was just released, yet there are only good books on DX7.



Umm, so DirectX is unstable is it? I think not. You''ll find it''ll be the drivers for a particular video card. Also, what you said about books is completely incorrect. There are very few published texts on OpenGL, there are lots for DirectX. Even though convention and syntax differs throughout the DirectX versions, DirectX8 is hardly any different to DirectX7.

quote:

3) The DX8 tutorials all assume a sort of "retained mode" thinking. Basically, the DX8 tutorials use wrapper classes and x files like there is no tommorrow. So what ends up happening is that the wrapper classes magically load an .x file. One never even sees the vertices, making it difficult to perform vertex level operations.



Even if that *is* true. Just cos they do it, doesn''t mean you must too. You''re the one who''s so concerned about being low-level and having control .. why don''t you read the docs and learn how to do it yourself, your way?

quote:

4) Academic code is written in OpenGl. Almost all of the code I''ve seen for cloth simulations, collision detection, deformations, etc. are written in OpenGl.



Meaning what? That DirectX sucks? I assume you have an independent mind - although from your comments you seem to like to have decisions made for you.



Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!