Directx or Opengl for my Game Engine

Started by
18 comments, last by Rycross 14 years, 3 months ago
Hello im going to create a game engine. It will be coded in c++ in a windows operating system. well my question is if i would create a game what is recommended Opengl or Directx i know that opengl is cross-platform and that directx is only for windows and xbox no need to tell me that. just the pros and cons of using it to render a game environment. and please dont link me to those comparison sites since they dont say that much about how they work in games. and when searching in youtube the most game engines there are in opengl, i have also once programmed using it but seems that its not recommended for games anymore. sorry for writing so much but any idea what would be good ? marry x-mas and a happy new year.
Advertisement
Well, since you're target platform is just windows, I'd try doing a small sample project in both DirectX and OpenGL and see what you prefer. Really, at this point given what you've said, it comes down to personal preference and which you'd rather learn at this moment. Granted, it's good to know both, but you have to start somewhere.
I would advise against writing your own game engine/graphics engine if your trying to make a game.

Game engines usually support both Direct3D and OpenGL rendering.

If you want to do it for the background and learning experience basically you have to try both of them and see what one you like better. I would recommend Direct3D as it is a lot easier IMO. OpenGL is good and it's what I started with years back. Learning from NeHe tutorials. Direct3D is more object-oriented and OpenGL is not so much.

The final product will look pretty much the same.

If you want to get programming games there are already great options for graphics engines that support both Direct3D and OpenGL such as Ogre3D.

There's also Irrlicht Engine and Crystal Space 3D to try out.
Thanks everybod.
im usually the one that wnats to create things my own, i started with ausing something similar to ogre but got tired and decided to code everything myself so i started with opengl and kinda like it but i cant say anything since i havent tried directx yet so i will do that.
thanks for helping me.
Quote:Original post by eFoDay...snip...


^^^ What he said!

That's not to say that you shouldn't write your own engine, but if you do so, it needs to be on your own time and for the sole purpose of learning how to write game engines. Don't try to make one for your game as there are so many high quality, free and cross-platform engines available. You'll get so bogged down in the engine creation that you'll lose sight of your game and get discouraged. Been there, done that. It simply is no longer necessary to write your own, again, unless you are doing so for your own education.

No, I am not a professional programmer. I'm just a hobbyist having fun...

FYI

If your goal is to make it work on multiple PCs, I advise going for Direct3D. OpenGL is not good as it causes problems (not able to run your game at all) on a lot of ATi cards out there. ATi's OpenGL API implementation is not forgiving.

source: experience.
c",)
Directx is supported much more on hardware, for example you can be glad if newest GPUs support OGL 2.1, plus, directx will run well on older GPU drivers unlike Opengl. If you want your games run on as many PC as possible and as fast as possible, paradox given, use directx.
Quote:Original post by JohnnyCode
Directx is supported much more on hardware, for example you can be glad if newest GPUs support OGL 2.1, plus, directx will run well on older GPU drivers unlike Opengl. If you want your games run on as many PC as possible and as fast as possible, paradox given, use directx.


Huh? GL 2.x has been standard across the board for several years now and the newer GPU's fully support 3.x. There are issues with ATi's support of OpenGL, but that only applies to ATi and even then, OpenGL still runs well. OpenGL is quite robust and very well supported. The problem with ATi is that they work so closely with Microsoft on DirectX support that their OpenGL drivers are lacking and they are slow to update them. This is a quality control issue for ATi, not OpenGL.

Don't get me wrong, if you are developing a game for Windows and Windows alone, go with DirectX. Or simplify your life and use Ogre3D...

No, I am not a professional programmer. I'm just a hobbyist having fun...

I may not be the best one to comment on this as I make games much more "niche-marketed" but I am fond of creating my own engine. This is because 1) you learn much more 2) you can tailor to your specific liking and 3) (most importantly) if there is a bug in the code, you can fix it yourself and track it easier than if using someone else's engine and code.

However, if you desire short development time and the most effecient results then do as the other fellow suggested and use a preexisting engine.
Hello again, sorry for bumping this thread.
But i have a good reason for it.
The thing is that i choosed Directx and i have been learning it for a while now but while googling some Directx stuff i stumbled on this article Why you should use OpenGL and not DirectX

And now im not really sure what to use anymore =/

Thanks.

This topic is closed to new replies.

Advertisement