Directx or Opengl for my Game Engine
Write an abstraction layer for your graphics device and implement concrete devices for both OpenGL and DirectX. There, now choosing an API isn't a problem anymore.
My ATI 4850 seems to run OpenGL 3.x fine, up to 3.1.
The thing is that unlike Nvidia the ATI driver will not automatically give the highest context available so you have to make sure to request the correct context version. Also it will do a weird fallback to 1.3 (I think it was that) if it fails to get the requested context version, which is admittedly strange and rather annoying. Note I have only used GLX for my 3.x context creation.
The thing is that unlike Nvidia the ATI driver will not automatically give the highest context available so you have to make sure to request the correct context version. Also it will do a weird fallback to 1.3 (I think it was that) if it fails to get the requested context version, which is admittedly strange and rather annoying. Note I have only used GLX for my 3.x context creation.
Quote:Original post by FriktionThe interesting thing there is the writer didn't draw attention to that fact that even John Carmack decided not to use OpenGL for the PS3 but chose CG instead. And the author neglected to bash Sony for *their* decision to not just use OpenGL for their gaming platform. He also neglected to talk about the fiasco with OpenGL 3.0. Things looked pretty hairy with it for quite awhile and you can hardly blame Microsoft for that. There were some good points in that article but it mostly felt like a hatchet job to me.
Why you should use OpenGL and not DirectX
Quote:Original post by ScourageGood advice ;) As a graphics programmer, I'd highly recommend using a wrapper/graphics-engine rather than dealing with these bare-bones APIs! Personally, I use Horde3d for my non-work projects (and use proprietary wrappers at work).
Why not just use Ogre3d for your rendering needs.
Quote:Original post by nobodynewsThat doesn't make sense - CG is an implementation of the HLSL shading language whereas GL is a graphics API. You can't choose a shading language instead of a graphics API!
The interesting thing there is the writer didn't draw attention to that fact that even John Carmack decided not to use OpenGL for the PS3 but chose CG instead.
In that article, the writer says: "As John Carmack said when asked if Rage was a DirectX game, "It’s still OpenGL, although we obviously use ... CG on the PS3.""
Seeing as the PS3 only offers one choice of shader language (i.e. CG), I'd take this statement to mean that while they *are* using GL on the PS3, they obviously have to write their shaders in CG (instead of the traditional GLSL).
You can also use GL+CG on PC if you happen to like HLSL syntax more than GLSL syntax...
[Edited by - Hodgman on January 10, 2010 9:52:58 PM]
Quote:Original post by Friktion
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.
Ugh... this is why people shouldn't be allowed to write things.
That 'article' is complete garbage and generally dumb. The part on 'power' is complete rubbish and basically untrue (GL lacks DX11 features, some DX10(.1) features, the tessellation mentioned ISNT the same as D3D11's and the spec only went public last year and not 3 years ago) and the rest is a thinly covered MS bash.
Quote:Original post by AndreiVictor
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.
More recent Ati OpenGL support is very good, it is stricter in terms of following glsl specification, Nvidia's method of compiling GLSL via CG compiler is very loose, and will allow you do lots of things in your shaders GLSL does not necesarily support. one example is the use of CG syntax...which is obviosuly not acceptable..
So yes if your working on an Nvidia you will have a lot of potential problems on ATI cards, but this is because you have not written strict GLSL which any shaders you write and compile on ATI cards will pretty much be garunteed to work on Nvidia cards.
I wouldn't say "ATi's OpenGL API implementation is not forgiving" just because it striclty follows OpenGL/GLSL specs where as Nvidia is loose..
Thanks everybody.
Im still not that sure what to use but please dont tell me to use Ogre3d my goal in this project is to create an engine and not an game i do have some ideas on what to do for the game but that is once im able to do the basic stuff.
I have done this before but with python and it was great but i decided to learn c++.
so i do have some basic experience in opengl and i like it but since i havent used Direct3d i cannot say that i like opengl more.
Im still not that sure what to use but please dont tell me to use Ogre3d my goal in this project is to create an engine and not an game i do have some ideas on what to do for the game but that is once im able to do the basic stuff.
I have done this before but with python and it was great but i decided to learn c++.
so i do have some basic experience in opengl and i like it but since i havent used Direct3d i cannot say that i like opengl more.
Quote:Original post by Friktion
Thanks everybody.
Im still not that sure what to use but please dont tell me to use Ogre3d my goal in this project is to create an engine and not an game i do have some ideas on what to do for the game but that is once im able to do the basic stuff.
I have done this before but with python and it was great but i decided to learn c++.
so i do have some basic experience in opengl and i like it but since i havent used Direct3d i cannot say that i like opengl more.
Trying to develop an engine without a game, when you have zero experiance with either, is likely to end up with a collection of code which when used in the real world isn't really any use.
You would learn just as much, if not more, by producing a game up front, learning from it and then pulling reusable code out of the game to form a collection of code you can use for another game and so on.
As for OpenGL vs D3D, if you already know some OpenGL you might well be better off staying with it as it gives you a base to work from.
Either way, I strongly recommend against going out and trying to make an engine blind.
Quote:Original post by Friktion
Why you should use OpenGL and not DirectX
Amongst other things, that article uses old arguments from fricken 1997, equates OpenGL with OpenGL ES, doesn't touch upon the fact that building games that are portable to things like Wii and iPhone will require multiple render paths *anyways*... amongst other stupid arguments. As jpetrie pointed out, the article is dumb, and the guy who wrote it is ill-informed and obviously biased.
Assuming you don't care about porting your game to Mac or Linux, the decision between OpenGL and DirectX boils down to preference. If you do care about Mac and Linux, then go OpenGL. If you're thinking of porting to non-PC platforms like iPhone, then you'll probably want to aim for OpenGL just to smooth the transition, but you'll still have to do work to port it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement