OpenGL, the right graphics API?

6918a68d53df45967550c706fa7609ea
0
PixelDuck 101 Feb 19, 2003 at 08:24

I just wanted to make a small query on what you all think of the quality/speed/adaptation-to-new-stuff/industry-suitabillity of OpenGL.

It seems that most of the people in the gamedev industry use DirectX due to it’s high ammount of tools and device independence, which makes it extremely efficient to work with. I’ve even heared such an explanation that most people aren’t that profficient in the math involved or don’t have the intrest to work with the low-level. Well, sounds pretty convincing, but are there any other things that might effect their choise? Like system speed? I might say that atleast the vertex/(pixel/fragment) program constant/parameter assignment is more efficient in Direct3D9 than with ARB_vertex/fragment_program, since one can actually group the constants for one call but with OpenGL you’ll have to call the assignment function for every constant/parameter, not very efficient, eh :\ Or am I missing something, is there some function that can take an array of values for the assignment of environment/local parameters (ARB_vertex/fragment_program)?

Hope I didn’t mix any terms here, since I’ve not been using OpenGL for that long (mostly DX, but almost all OGL now) :)

Well anyway, what do you think about the future of OpenGL, will DirectX replace it or will it persevere? I surely hope it will remain. I actually don’t like the interface style of DX (since I only do c/c++ ;) … exluding asm).

Anyways, please post your opinnions!

Cheers!

31 Replies

Please log in or register to post a reply.

49921baa7439fb1e91e02caf0a925cfe
0
DarkLight 101 Feb 19, 2003 at 10:04

Well, both of OpenGL and DirectX have advantages and disadvantages. I’ll say only, that
Quake (Quake 2 and 3 too), Doom (and Doom 3 wll) and many other popular games uses OpenGL

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Feb 19, 2003 at 13:43

I say the main reason many of the ppl use DirectX is because of the fact that DX has EVERYTHING integrated. DirectSound, Direct Play etc;
The Vertex/Pixel Shaders are also better off in DX, but soon DX would lose that lead, guess because Cg is gonna rock soon. Cg is not all that upto mark as of now, but soon it would be. Remember its nVidia whoz working on it.
Other than that, OGL and DX are not far apart. If that were to be the case, QII would have been written in DX and not in OGl. Remeber how slow OGl during those days was.
When its Mr. Carmack , John we are talking of, I would say he would not mind rewriting hte whole of Quake II IF it were to add an extra 5 fps in DX. Remember he ALREADY wrote his own Graphix Library for scroll games. I should say that soon many games would shift over to DX.
To ADD: Unreal also uses DX and or OGL

D12838c45a4840e6c05bf94d8bb5e135
0
Morgoth 101 Feb 19, 2003 at 14:29

To begin with, I must say that I’m not that into vertex/pixel shaders so I can’t comment on this issue.
The integration issue seems to be of some importance since the proposals on OpenGL 2.0 include some discussion on integration with an OpenML (media library). Besides, games that use GL for graphics also rely on DirectX for sound and input… Talking about Carmack, in some older .plan he had stated that after GLQuake (1) he tried to port the code to DirectX (then 3 or 5, not sure) but dropped the whole thing because “he had better things to do with his time”. Bad API back then but great improvement over time. By the way, Unreal dropped “real” OpenGL support, but keeps some -potentially buggy- legacy support. UT2003 and Unreal2 don’t even offer the option! The initial design of OpenGL has proved its longevity (OpenGL 1.x lived for at least 5-6 incarnations of DirectX at the PC’s) and is even older - i think - in SGI platforms) but some changes are required. My personal opinion is that the fate of OpenGL relies heavily on the success (or failure) of the OpenGL 2.0 project. It HAS to be good, at extension management definitely need a fresh look, and of course integrated programmability is highly wanted!
As for the fact that many people aren’t that proficient on maths, if you are referring to DirectX extension lib, remember that GLutility library has been a standard since the beginning.

6918a68d53df45967550c706fa7609ea
0
PixelDuck 101 Feb 19, 2003 at 15:15

Morgoth: I thought of that before I said that about some people’s proficiency in math, but I still said it since it wasn’t originaly mine, the opinnion I mean ;)

Anyways, I share the thought that integration is important. And for efficiencys sake, using one API compared to many is very much better. OpenGL 2.0… yeah, that’s what we’re all waiting for, aren’t we :) And I too have high expectations and reading the papers, for some part atleast, I think that it will be pretty good to say the least. Though, we’ve seen this before, or are seeing it right now, namely the GeForceFX case. They promissed it to be a superb card and what did it bring to us? A poorly designed heat-sinking system (apparently, atleast compared to ATI) that sounds like an airplane! Well that’s a bit axeggaratation (or what ever :). But one thing can’t be avoided, it just barely surpasses ATI’s r300 in speed :\ And with very few additions in form of capabillities it doesn’t sound like beeing worth the money. Oops, a bit of topic :D

My point beeing that who knows. Maby OpenGL 2.0 will turn out just like GFFX seems to become… I surely hope not, but we never know :\ Atleast it sounds promissing, as I mentioned before, and I sure have high hopes of it and hopefully it will be the “saviour of OpenGL” :)

Though surely OpenGL will retain a great portion on the non-game side of graphics if DX takes over, but that remains to be seen :)

Cheers!

Edit: Oh and forgot to say that one reason for prefering DirectX might be that you can actually download it as a SDK. This was a thing that created confusion in me, since I was accustomed to the downloading of a SDK and I didn’t notice, at first, that OpenGL comes with the OS (or was it the IDE, atleast VC++) :D Anyways, 124 MB was understandable for a SDK download, but the about 200 MB of DX9 is a bit bad :eek:

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 19, 2003 at 20:56

one thing, UT2k3 has more than legacy support for OpenGL. It had a linux client out of the box, and that ran on opengl

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Feb 19, 2003 at 22:03

Both APIs are fast & powerful. Just a side note: What makes one wonder is that OpenGL was developed almost 12 years ago, and yet it is very powerful and widely used. Whereas, DirectX came into power after DX 7.0/8.0. Caramack himself disproved DirectX (when version 6.0 was out), but now I’m sure he’ll change his opinion now that we have DX 8.0/9.0. The point is, OpenGL being as old and as powerful as it is (not that many changes since its initial release) makes it a prefered API for young developers. DirectX went drastic & dramatic changes which is a very disadvantgous thing about it (it shows that there was no initial design & planning). When I look at openGL I see that the guys were looking 10-15 years ahead when the API was developed. But now, one must admit that OpenGL is getting old (since Computer Graphics has evovled rapidly) and the extensions on it are causing problems. That’s why there is a need for OpenGL 2.0

Its just my humble opinion. :lol:

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 20, 2003 at 16:37

yes, carmack officially stated he likes dx8 and 9 very much, and thinks about using it as well in the next projects.

but gl is great for a start, yes. its what i started with as well.

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 20, 2003 at 18:11

From memory, I think carmacks comments were on DirectX 3 :).

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 20, 2003 at 20:29

yes, he first played with dx3, hated it, then he tested dx6, hated it, and dx7 was nothing new for him, but dx8 was a surprise for him..

D12838c45a4840e6c05bf94d8bb5e135
0
Morgoth 101 Feb 21, 2003 at 06:57

@baldurk

one thing, UT2k3 has more than legacy support for OpenGL. It had a linux client out of the box, and that ran on opengl

I have just seen UT2003 & Unreal2 only on Windows platforms (2k & XP) and they don’t offer directly an option for OpenGL. As far as I know, they fall back to OpenGL rendering only if they fail to properly detect required DirectX features/version. Of course, for a Linux client there is no other option than OpenGL :-)

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Feb 21, 2003 at 13:38

UT2003 - I havent played it dont have a GeForce here. :(
Carmack - did say that things were bad with DX. I agree. It was a huge coding effort to get DX started. DX 7 was the last of the long coding stories. Well DX8 makes things a lot better. I would say good work M$. However DX still remains one of the ‘old’ APIs. OGL is more of a C based API. It has more support (in terms of OSs) while graphix companies (card companies) love DX because it puts load on the coder and not on the card. OGL on the other hand would require the card to do more work compared to DX.
However DX has been doing lotsa advanced work. OGL has been taking tooo long to incorporate the changes. OGL 1.4 itself took a lot of effort for card companies to accept. Besides DX is tightly coupled with the Windoze OS. So it performs better in most cases.

If OGL 2.0 works well, OGL lives else I would say things are going to be tough for OGL for sometime.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 21, 2003 at 16:20

@CyraX

UT2003 - I havent played it dont have a GeForce here. :(
Carmack - did say that things were bad with DX. I agree. It was a huge coding effort to get DX started. DX 7 was the last of the long coding stories. Well DX8 makes things a lot better. I would say good work M$. However DX still remains one of the ‘old’ APIs. OGL is more of a C based API. It has more support (in terms of OSs) while graphix companies (card companies) love DX because it puts load on the coder and not on the card. OGL on the other hand would require the card to do more work compared to DX.
However DX has been doing lotsa advanced work. OGL has been taking tooo long to incorporate the changes. OGL 1.4 itself took a lot of effort for card companies to accept. Besides DX is tightly coupled with the Windoze OS. So it performs better in most cases. If OGL 2.0 works well, OGL lives else I would say things are going to be tough for OGL for sometime.

well, carmack said this till before dx8. then he changed opinion. read up the .plans of him..

dx is an ‘old’ api? gl is older. and well, so we could say windows XP is an old windows? because far far back, there was win3.0 (and even olders:D), and its (loosely) based on it? where do we get then? each new version is a revision, and you can’t compare any dx before version 8 with any version after and including 8. you can basically say, dx got a rebirth then.

and the other stuff, about gl and dx, is simply untrue. most of the code is one-to-one mappable. dx is not more work for the programmer as gl is, same for drivers. gl has more features, useless for games and so not supported by gamers hardware. this is an issue for driver developers, but they can just let it fallback to software mode then if they want to.

those apis are today so equal (coding style is different, and i would say dx is much more futuristic in coding style than gl, wich is only funcs and #defines.. really old style that is:D), they are so equal, bashing on one or the other is simply useless. same feature set, same power. its a mather of choise. in dx, you know that you get microsoft as support. this is great. in gl.. you get.. driver developers.. you get them in dx, too.. there is more help for professional developers on dx side (if you’re just a normal programmer. weenie and carmack get much support from everyone.. but they are exceptions)..

F49b4b8d0b35ff04154df2eec2121276
0
Jeroen 101 Feb 24, 2003 at 10:35

A major advantage of OpenGL is that it is cross-platform. If you want your game to be available for Windows + Linux, for example, you should use OpenGL. Furthermore, as far as I know OpenGL is just as fast as DirectX and more easy to use. That’s why i’m using OpenGL in my current project.

Check out Delgine 3d engine/editor for more info. :)

Jeroen

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Feb 24, 2003 at 13:18

DX was CREATED specifically for game programming and not for applications.
Hence DX is good @ game apps.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 24, 2003 at 18:55

@donBerto

@CyraX

DX was CREATED specifically for game programming and not for applications.
Hence DX is good @ game apps.

…so which one is it? :lol:

i’m just kidding…
:yes:

you can’t stop this, can you?

oh.. i see, you’re near the senior.. thats why..:D

203e4e77a4880ecbd91054865fc5d0b7
0
Phaetos 101 Feb 25, 2003 at 06:21

Hi @ all!

As I don’t know a single thing about DirectX I would like
to know: Does the native M$-DirectX API contain such cute
Matrix-Stacks and Operations as OpenGL does?
Or does it need additional Libraries?

Greetinx
Stefan

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 25, 2003 at 09:11

it has the d3dx helper library, providing similar features, though dx is designed a bit different (meaning you normally don’t use a matrix stack there..)..

but you do it offline, your own matrices you upload.

advantages: no forcing to modelview projection (i really dislike it, and want model, view, projection all 3 split)
same matrix math functions for all of your own matrices, too.

and a matrix stack is really easy to code up yourself actually..

6918a68d53df45967550c706fa7609ea
0
PixelDuck 101 Feb 26, 2003 at 08:00

davepermen: _vertex_program(x.x) you can actually send the matrices as program matrices if you like :\ Atleast ARB_vertex_program can do that, I haven’t tested the NV_vertex_program:s since I don’t have an nVidia card atm. :blink:

But yeah, DirectX at some points has a bit more flexibility, atleast the legacy fixed-function pipeline :yes:

Cheers!

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 26, 2003 at 10:01

yes, i know arb vertex program lets you use the matrices directly. no, nv vertex program doesn’t do it that neat, just forget it, its proprietary and outdated, arb vp can do all the nv vp does, it has minor differences, but major advantages, mainly it has variables and runs on all hw.

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 26, 2003 at 19:52

am I right in thinking that only the ATI Radeon 9700 supports arb_vp in hardware? or is that arb_pf. I seem to remember that the GF4 can’t do one of them, and I felt cheated because I only bought it so that I could do them :/

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 26, 2003 at 21:18

ARB_vertex_program is hw on gf3+ (without all mx craps)
ARB_fragment_program is r300+ only (radeon9500 and bether)

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Mar 15, 2003 at 07:50

If you read the .plan of Carmac you will realise the number of features (he talks mostly of the performance as a function of color depth) what we all fail to realise is that OGL and DirectX have been REALLY made for different purposes.
OpenGL is a “tru” graphix library allowing the complete Rendering pipeline to be exposed. DirectX would not expose the rendering pipeline as such but the hardware apis enable it.
Now that is exactly the reason most of hte colleges/courses teach OpenGL - it teaches Graphix and not hardware specific routines.
Perhaps the ONE way OGL can beat the DirectX API is by having a different pipeline mechanism for games and for apps.
That way OGL might just be able to reach DirectX level.
Oh btw DirectX 9 might stay for a long time (gdconf) because M$ is not going to release a new DirectX library anytime soon.
Might be that this the ample time and the right time for OGL ARB to just revamp the whole pipeline and redo the processes.

1c7757ea91b5bbf7a4d2cf0563b9e872
0
sumedhs 101 Mar 17, 2003 at 05:08

Well the debate of OGL Vs DirectX continues…

One of the major advantages of an OGL code is that its portablility & genericity to any language. I can have one function defined in VC for panning in 3D & the same will work good in Python! We just need to handle the data types but the OGL calls more or less remain same.
Python has an implemented PyOpenGL library that implenets all the openGl calls. Its much easy to handle things there.
Nextly Gaming is not the only industry where CG is Used. Are we overlooking the Huge CAD/CAM industry?
I used a DX in some earler projects in my CAD firm but there was one where we needed to implent Model Deformation through Graphics. The challange was that the code needed to be workable on IRIX. PyOpenGL was the solution.

I think we all need to get out of the hole that Microsoft is digging by forcing us to follow their standards. Just because lot of people use MS standards does not make it better.

Besides that I personally find OGL is very easy to implement. One thing where OpenGL *USED* to fall back was device interface; But OpenGL was intended to be a purely a graphics API.

Anyways now with the advent of OpenML & OpenAL it has almost overcome its limitations wrt DX as well!
OGL LIVES!

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Mar 17, 2003 at 18:23

hmm, I’m not sure that cg would be used in CAD/CAM. There are more appropriate solutions for the CAD/CAM industry, which aren’t appropriate for games.

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Mar 20, 2003 at 15:39

CG would be used in Gamez and presentations, media - LOTR stuff.
In CAD/CAM you dont need stunning graphix, what you need is realism interms of physics and physical quantitites.

557ecddfbe11a41de320f70c2c976459
0
Merlin 101 Mar 31, 2003 at 01:54

What is cg anyway? An OpenGL modelling tool?

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Mar 31, 2003 at 17:28

Cg is a high-level shading language developed by nvidia. It can compile into Dx9 code, and OGL code, either NV_* extensions or the ARB_vp and ARB_fp extensions. It’s completely compatible with the HLSL

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Mar 31, 2003 at 22:19

addendum:

HLSL: high level shading language.

:yes:

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Apr 01, 2003 at 17:44

to further clarify (;)), HLSL is indeed the high level shading language. It was written, designed and implemented solely by Microsoft for DirectX 9.0. This is different to GLSL (GL shading language) which is being designed by the ARB.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Apr 02, 2003 at 08:09

and its not glsl but glslang, short for opengl shading language

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Apr 07, 2003 at 13:51

CG has the advantage wrt the programming paradigm.
Works either on OGL/DX whichever is available (you can also select).
Works on HW that supports DX9.0 or OGL 1.4 (onwards). So will work on ATI tooo.
I wud give it thumbs up… pretty neat API.
Tho has its own set of problems - not really evolved.