What is OpenGL?
is it used instead of Direct X?
Thanks
nick
Printable View
What is OpenGL?
is it used instead of Direct X?
Thanks
nick
It's a 3D graphics API. Basically a library of standardised 3D graphics functions which many modern graphics cards have drivers for, which allow the functions (or some of them) to be performed partially or wholly in hardware, making the whole process much speedier.
It is similar in what it does to Direct3D (or DirectX Graphics, or whatever they're calling it today). DirectX is a whole suite of APIs though, not just graphics.
OpenGL is popular because it is platform independant whereas Direct3D (and all of DirectX) is Windows-only, and it is also reputedly easier to learn than Direct3D. An excellent OpenGL resource is http://nehe.gamedev.net
I've always found however that anything OpenGL powered just kills your app :)
It is sooo slow.
Eg.
I was playing some funny game about being a samurai person and having to do stuff... daikatana or something, but when I ran it in OpenGL rendering mode the game just crawled along.
Took about a second or two per frame.
Then I switched to Direct3D, and it just flew through the game.
Also, during my limited research of the relative difficulty of Direct3D and OpenGL, I found that OpenGL was easier to just get a rendered sphere or something onto the screen. But to put a model (eg. the player) onto the screen, thats another matter. I would imagine thats where Direct 3D would shine.
- jamie
Well go to www.gamedev.net and ask the the people on that forum, they know. Most of them prefer OpenGL. The two APIs produce very similar results now. As far as I can tell, with DX8 at least, the graphics part of DirectX is no better than OpenGL, but it is roughly as good. Direct3D has spent the time from its initial development to now just catching up basically. OpenGL hasn't changed much.
Your problems with OpenGL were, I am 90% sure, either because your graphics card doesn't have very good OpenGL support, or because the game you were playing didn't make use of OpenGL very well. Many graphics cards nowadays will be released with good Direct3D drivers and rushed OpenGL drivers. The later releases of drivers generally improve on this.
If you want an example of a decent OpenGL engine just take a look at the Quake 3 engine. Even though it's getting quite old now, it's still one of if not the most technically impressive 3D graphics engines around, and that's OpenGL.
Anyway it serves you right for playing Daikatana, it's sucky game ;)
This is a P-III 650 w/128Mb RAM with an S3 Savage IX, and Quake3 ran like a piece of crap using OpenGL :)
- jamie
Well I have no idea what teh Savage4's like, but do you have the latest drivers?
I have an Athlon 550/128 meg and a GeForce DDR, it runs real smooth.
Ah listen, I couldnt give a flying **** to be honest :)
Im tired and hungry.
I just wanna go home :)
Ciao till monday.
- jamie
I agree and disagree with plenderj.
OpenGL sucks for Quake and Unreal....
BUT!
PlenderJ, I have a Savage4 as well, a 533 with 128mb of ram. If I play Half-Life at 1152x864 with 40 frames per second, you should be able to run it with 50!
(all benchmarks taken from OpenGL)
I see no reason to be unfaithful to OpenGL, but it does have a clipping problem, with things that are within 1 quake unit of each other. The Savage4 and OpenGl combo suck for sniping (with the clipping problem) but you can still play.
Try playing CounterStrike for HalfLife with OpenGL, and I think you will start to appreciate my viewpoint.
Ther are many, many, many which API people should use (DirectX, OpenGL or Glide). I'd say Direct3D wins because it's fast and compatible to all graphics cards. OpenGL, however, has better quality than D3D while D3D supports new technology earlier tahn OpenGL... (Glide is only for Voodoo cards but very fast)
As I said you can't really say one of them is better, but I'd recommend you using D3D. Best -of course- is if your engine supports all 3 rendering APIs and also software emulation ;)
I personally like D3D more and it's a good feeling to use the DirectX package from A-Z (DInput, DPlay, DSound, D3D,...) instead of having an 'external' renderer ...
OpenGL is a lot more efficient than Direct3D (or whatever it is now ;)). The software implementation is faster than software D3D, too.
DirectX may have a HAL/HEL, but the OpenGL drivers can choose what they send to the card and what they do themselves. Plus you can register extensions for different things and if they're used a lot they sometimes get put into hardware by the vendors based on developer decisions (like nVidia did).
In Half-Life OpenGL is a lot better than Direct3D, and I've had much less difficulty with it. Also it doesn't take over your entire system :rolleyes:
DirectX's new layer - HELL!
Hardware Emulation Limbo Layer
Of course, I'm only kidding... :)
But I would like to see you do bumpmapping in D3D, cause it can only be done (to my knowledge) with OGL.
Bumpmapping is supported in D3D8 =P
[edit]
In fact, there are 6 samples included with the DX8 SDK.