opengl or directx?

Started by
16 comments, last by superpeter 22 years, 4 months ago
for beginner, which one is easy for use and understand?
Advertisement
Neither one. They''re roughly equal, IMO... they require different things for setup, but in my experience, neither is easier to learn.
--


WNDCLASSEX Reality;
...
...
Reality.lpfnWndProc=ComputerGames;
...
...
RegisterClassEx(&Reality);


Unable to register Reality...what''s wrong?
---------
Dan Upton
http://0to1.org
http://www20.brinkster.com/draqza
WNDCLASSEX Reality;......Reality.lpfnWndProc=ComputerGames;......RegisterClassEx(&Reality);Unable to register Reality...what's wrong?---------Dan Uptonhttp://0to1.orghttp://www20.brinkster.com/draqza
I have to disagree.

Unless you have a bit of experience coding with Windows, you''ll find some of the code from DirectX a little cryptic at first until you learn MS''s code style. It''s not hard, so don''t let that deter you.

Also, OpenGL is much more mature. While they both are about the same performance wise and feature wise, OpenGL has much more support readily available on the web and in most book stores.

Personally, I think you''ll spend more time wrestling with 3D concepts and algorathims than you will with the OpenGL or DirectX APIs so I wouldn''t worry which you pick.

G''luck,

R.
I agree with rube. if you don''t have some experience in windows coding D3D is hard to learn. I use OGL because if new GPU features come up it is not necessary to rewrite everything, you can add features very easy by using OGL extensions
"Art is a lie that lets us recognize the truth." - Pablo Picasso
It also depends on if you're looking to port your games to different platforms. OpenGL is more platform friendly as opposed to DirectX. However, since Windows has 90% or so of the desktop space it is not that much of a problem, if you're game is good more than likely, a lot of people can run it.

But from my expierence from dabbling with 3D game engines or 2D games programming, DirectX does require a lot of in depth understanding of different concepts. To use DirectX well, you need to understand how COM works, somewhat, and to get the most out of it you NEED to know how COM works. Then you can decide from using CoInitialize or ATL smart pointers. I haven't tried OpenGL but I'm not downing it, I hear it is a good API and I'll probably put some effort into learning it.

My suggestion would be learn the mathematics and algorithms behind whatever type of game programming you are considering as this would benefit you more in the long run. Then you can write your game code to whatever graphic API you chose.

Also 123cs is right when a new interface for DirectX comes out, since it must adhere to the COM standard may require you to use a different interface for your graphics code, this may require some rewrite on your part.

Sam
-----
TotalCoder
http://www.totalcoder.com
"Resources, tutorials, and articles for the novice, part-time, and hobbyist programmer"

Edited by - TotalCoder on December 12, 2001 12:55:26 PM
Sam-----TotalCoderhttp://www.totalcoder.com"Resources, tutorials, and articles for the novice, part-time, and hobbyist programmer"
i don''t think it really matters which you use, because with every revision of Direct3D, it looks more like OpenGL anyway.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
Yes, I think Microsoft anwsers the question for you: They try to copy OpenGL wherever possible in the new Direct3D versions...
yes, i try to learn directx first, but i find it is very hard to understand, i have to learn the ms c style coding, com.....etc, it made me feel very sad, so i change my attentsion to opengl, it also have advantage: it can be ported to another platform.

also anyone know, is the game console like ps, gamecube using opengl api or not?
> also anyone know, is the game console like ps, gamecube using opengl api or not?

Yes, they use OpenGL (at least the GameCube and the PS2 do).

The only console that only supports D3D is the Xbox, a major design flaw from M$, IMO. That''s going to backfire at them.
quote:Original post by Anonymous Poster
Yes, they use OpenGL (at least the GameCube and the PS2 do).
The only console that only supports D3D is the Xbox, a major design flaw from M$, IMO. That''s going to backfire at them.


Also, the DC supports OpenGL and Direct3D, just in case anyone cares



SKeTch
SKeTch

This topic is closed to new replies.

Advertisement