pouët.net

Go to bottom

Beginner OpenGL vs DirectX

category: code [glöplog]
Quote:
Seems we finally found something you are right about! They are of course not the same but in a way close relatives - but you can easily ignore that and shout out "WRONG WRONG WRONG" without going into further detail (actually I find it quite good that you found that one - seems you at least tried to read my posts).


Well, I could point you to my blogs where I explain how to implement subpixel correction for Bresenham and then apply it to the Amiga blitter, it more or less touches on the differences between Bresenham and DDA in that respect :)
added on the 2013-11-19 10:47:38 by Scali Scali
I don't get why this has gone so awry, apart from that people like to turn it into a war.

a simplified bit of psuedo code
where GetOS() returns flags for desired OSs..


fDesiredOS = GetOS();

if( ( fDesiredOS | fWindows ) == fWindows ) // only windows flag is set
{
printf( "choose either latest directx or modern opengl\n" );

}
else
{
// either more than just windows is desired..
// e.g linux / mac os / iOS / steambox / raspberry pi / android?

printf( "modern gl\n");

if( fDesiredOS & fMObile ) )
{
printf( "modern gl - opengl es sub set" );
}
}
added on the 2013-11-19 10:48:05 by Canopy Canopy
Quote:
I don't get why this has gone so awry, apart from that people like to turn it into a war.


For the same reason as your own post I suppose.
You answer the question: "What API should I pick to target platform X?"
Which is not the same as the question: "What API should I pick to start learning 3D graphics?"
added on the 2013-11-19 10:52:29 by Scali Scali
you're right (then again we seem to be agreeing).

at least he did specifically ask for directx vs gl and someones not suggesting he learn 3d in 68k on an amiga :)

but i also agree with "superplek", learn one of the current ones and stick with it for for foreseebable, which i can see the mileage in.

(regardless of the fact that both api's have backwards compatibility, I found even my old directdraw code from 14 years ago still works on windows 7)

anyways, it sounds like he's learned enough GL to so the usage of modern gl won't be painful. and has chosen that route :)

but i agree, i can't talk for dx, but I know that starting out i know that starting out fresh with modern gl is an absolute nightmare even for experienced programmers.
added on the 2013-11-19 11:29:36 by Canopy Canopy
Quote:
but i agree, i can't talk for dx, but I know that starting out i know that starting out fresh with modern gl is an absolute nightmare even for experienced programmers.


Yup, there's the lousy documentation on modern OpenGL... Although apparently they've now finally updated the Red Book to 4.3 (8th edition). For years, it was only 3.1.

And then there's the problem with driver support. OpenGL stuff just... doesn't work.
Take this recent release for example... A lot of people complaining that the shaders won't compile.
OpenGL is just a poorly defined standard, with no quality control on drivers or anything.
Yes, you can make it work, if you are experienced (and have access to a wide range of hardware to test on), but for a beginner... I wouldn't recommend it.

It's just hard to take an API like that seriously, when apparently even the developers of that API don't appear to take it seriously enough to bother to document it properly, and do any kind of testing on actual implementations.
added on the 2013-11-19 11:38:59 by Scali Scali
Yeah i'm lucky enough to have two ati/amd machines of different ages and a nvidia one, really helps!

I've been a "pro" c/c++ coder for 17 years and write / maintain / design APIs for not only our developers but for end user developers to use, as well as implementing software above them and sometimes drivers right down the bit bashing hardware level.

Academically OpenGLl looks well designed, but in usage its a bloody nightmare for the uninitiated.

I've got all the latest generation of gl books, and i said earlier, the only book worth a damn is the super bible. some are money for old rope, and despite claiming to be about modern gl still use fixed function (the edward angel one comes to mind).

As in the early stages (Window setup/EGL aside) the basics of OpenGL ES 2.0 are similar to the modern GL approach the best references out there are those provided by the likes of Apple.

IMO There is a seriously big jump to get people doing casual graphics programming, whereas at least "back in the day" people with a desire to do it could do it in DOS fairly easily.

That combined with all the other options (web stuff, flash, Processing) seriously limit the number of people entering the graphics programming arena.
added on the 2013-11-19 11:58:08 by Canopy Canopy
what a crap thread. instead of just answering people start to insult each other ... grow up. but then again ... its pouet.net so go on if you like to!
added on the 2013-11-20 13:25:40 by trigger trigger
My lib for 3D wraps both DirectX and OpenGL, and it's compatible DX8 DX9 DX10 GL GLES11, and soon GLES2 (the abstraction layer of DX10 allows me to extend the functionnalities to GLES2 in one procedure).

It's the best we can to encapsulate APIs.
added on the 2013-11-20 19:09:45 by Bartoshe Bartoshe
nah, keep going guys. The topic was OpenGL VS directx, so there can be only one winner, no friendly draws or surrendering. Can I recommend researching each other's background next, see if you can dig up some good dirt?
added on the 2013-11-20 19:11:46 by psonice psonice
psonice: your background is directX on Mac :P
added on the 2013-11-20 22:50:28 by skomp skomp
Why not use something like Unity3D, for a beginner that seem like the right platform.
added on the 2013-11-21 04:27:14 by T21 T21
if(
 sizecoding|
 there is no library or tool which can do what you want|
 you don't want to use something created by other people
)
 use OpenGL or directx;
 //But I highly recommend OpenGL because I like OpenGL :)
else
 find out optimal library, tool or middle ware for your need;
 //e.g. Blender, OpenSceneGraph, Unity3D, Unreal Engine

Both OpenGL or DirectX are low level API to access GPU.
You can study how transform matrix works in interactive python console in Blender.
This is easier than OpenGL + C++ compiler.
added on the 2013-11-21 08:48:54 by tomohiro tomohiro
<troll>Mantle?</troll>
added on the 2013-11-21 09:18:00 by kusma kusma
I love how some people argue that OpenGL is immature and completely unusable, when most of the most revenue generating game titles (yes, for mobile) are all OpenGL. Perhaps it's time to do some reality-adjustments on your adjectives there.
added on the 2013-11-21 20:41:51 by gloom gloom
gloom: Don't confuse OpenGL ES for OpenGL. KTHXBYE.
added on the 2013-11-21 20:52:38 by kusma kusma
kusma: fair enough, but I fail to see how one can be fundamentally flawed and the other a pillar of excellence :)
added on the 2013-11-21 21:04:14 by gloom gloom
Quote:
I love how some people argue that OpenGL is immature and completely unusable, when most of the most revenue generating game titles (yes, for mobile) are all OpenGL. Perhaps it's time to do some reality-adjustments on your adjectives there.


In the land of the blind...
added on the 2013-11-21 21:13:47 by Scali Scali
gloom: That's easy, I was involved in creating OpenGL ES :)
added on the 2013-11-21 21:22:33 by kusma kusma
kusma: :D
added on the 2013-11-21 21:49:49 by gloom gloom
hahaha, rad
added on the 2013-11-21 23:15:07 by ferris ferris
kusma: cool! Which versions? Been using 2.0 heavily for a few years now, and I've been happy with it (apart from the super annoying extra typing where some function has a parameter with only 1 possible value! But I guess one day there might, maybe, be another value). And (on iOS at least) the dev tools are good, and there's a fair bit of good documentation / tutorials / books.

Maybe ES is the best place to start nowadays? Web + mobile look like the best platform choices in future, both are OpenGL ES based (aside from win phone, but that's not really worth looking at for most people still).
added on the 2013-11-22 10:32:03 by psonice psonice
Quote:
Maybe ES is the best place to start nowadays? Web + mobile look like the best platform choices in future, both are OpenGL ES based (aside from win phone, but that's not really worth looking at for most people still).


Well, my first OpenGL ES code was for iPhone/iPad.
When I later wanted to port it to Android, I had to debug some weird behaviour to get the textures working there. They worked in the emulator, but not on the real device (apparently things like mipmap flags and such have quite mysterious default values, and not all implementations support the same filters).

Just because it says 'OpenGL ES' doesn't mean that all implementations work the same apparently.
Granted, OpenGL ES is not quite as vague as regular OpenGL is... and well, the new OpenGL core profiles are moving towards OpenGL ES as well.
But it's still quite unpredictable at times.
added on the 2013-11-22 11:28:24 by Scali Scali
psonice: I was to some degree involved in OpenGL ES 1.x (I joined Falanx too late for the fundamental 1.0 stuff, but was there for most 1.1-stuff), and OpenGL ES 2.0. You can even find my name in the OpenGL ES Shading Language specification ;)
added on the 2013-11-22 11:28:59 by kusma kusma
Kusma was mostly responsible for things like the inclusion of troll features such as two-sided lighting and paletted textures.
Quote:
I love how some people argue that OpenGL is immature and completely unusable


aren't those "issues" with GLs reputation more to do with the stability of platforms, obviously targeting a fixed environment like a mobile device is going to give a much more consistent result that trying to target GL under Windows where driver quality (stability/consistency/compatibility) can still be an issue.

I used to code normal desktop gl back in the late 90's and once i decided to write stuff again the first thing i did after researching was to start from scratch with opengl es was for the mali emulator under windows, i've graduated to desktop gl just for the ease of getting my shit together with modern style gl in a environment i'm used to

i also started writing a directx/gl wrapper in the past, there is a place for them i'm sure, but i now know not to waste time and to actually only add 'helpers' for things i actually really have a need for.. without putting a sheen over teh real api, and keep my focus on the end product, which is more important than the engine you write..
added on the 2013-11-22 13:40:33 by Canopy Canopy

login

Go to top