Newbie: 2 fundamentally different types of openGL programs?

Started by
15 comments, last by Andre the Giant 21 years, 7 months ago
Andre, I''m sorry for this hijacked thread. If the replies above did not answer your question, then feel free to interrupt us

[offtopic 4]
quote:
Unfortunately, OpenGL is also mired in platform independence. Platform-specific extensions, windowing kits (wgl, glx, etc) and resource acquisition methods (PFDs, etc) contradict this objective, though admittedly to a lesser extent.

This is certainly true, but I don''t think that it is totally possible to avoid those dependencies when creating a portable API. Especially, if it goes over such a wide range of software/hardware combinations as OpenGL (some of them very exotic). There will always be a platform dependend hook somewhere, the only real solution would be a standarized API hook built into every OS itself. That would change the target of interoperability: not the API would need to be made multiplatform, but the OS/architecture would need to adapt to a standard API. I don''t know if this scenario would really be a better alternative. A lot of people would object to it, for obvious reasons.

quote:
The other big problem with OpenGL''s platform independent objectives - not an integral API problem, but rather a shortcoming in the design process - is that the ARB moves slowly to update the API (which necessitated extensions in the first place, which leads to inconsistencies in syntax and functionality per platform, which contradicts the initial objective).

Hmm, every concept has it''s advantages and shortcomings. And open design brings the problem of internal consistency among different vendors, with different views of the market. IP and patents are another important factor to consider here. Although the ARB extensions could be seen as a kind of incremental API update, too few real important functionality has been standarized. This will change with OpenGL 2.0 (hopefully). On the other hand, consider when OpenGL was first introduced - graphics hardware wasn''t even capable of texture mapping at that time. I think it is still interesting to note, how well it has nevertheless managed to stay up to date with modern features. Although OpenGL 1.x has admittedly lost some of it''s open ideals in that process (NV_*, ATI_*, etc).

quote:
OpenGL is mad cool, though. If and when 2.0 hits, and if it provides solutions (or at least decent attempts at solutions) to these problems, then people like me (read: lazy programmers who don''t care about platform independence) might give it a very serious look. Until then...

You could of course use the opposite argument as well: a programmer that does not have to care about platform independence can focus it''s energy onto other parts of the project
It ultimately always depends on your goals, and target markets. And if everything goes well with the OpenGL 2.0 launch, lots of there above mentioned problems will disappear - and we are all waiting for that.
[/offtopic 4]

/ Yann
Advertisement
noone mentioned sdl www.libsdl.org, its a very good bet to build a opengl app upon + as a bonus its also runs on a few platforms (even the ps2!)

http://uk.geocities.com/sloppyturds/gotterdammerung.html
quote:Original post by zedzeek
noone mentioned sdl www.libsdl.org, its a very good bet to build a opengl app upon + as a bonus its also runs on a few platforms (even the ps2!)

http://uk.geocities.com/sloppyturds/gotterdammerung.html


Yes someone did.
-------------------------GBGames' Blog: An Indie Game Developer's Somewhat Interesting ThoughtsStaff Reviewer for Game Tunnel
Continuing the unfortunate hijacking of the thread... My apologies to all; this should be a separate thread but it''s hard to move a discussion once it''s started. Again, just stop us if it gets in the way.

quote:Original post by Yann L
This [OpenGl "mired in platform independence, etc"] is certainly true, but I don''t think that it is totally possible to avoid those dependencies when creating a portable API. Especially, if it goes over such a wide range of software/hardware combinations as OpenGL (some of them very exotic). There will always be a platform dependend hook somewhere, the only real solution would be a standarized API hook built into every OS itself.

Actually, I think that it''s quite possible to write an API that is exactly the same at on all supported platforms. Instead of maintaining these platform-specific "interface" APIs, simply write them into the initialization of OpenGL (for instance) and have their platform-specific implementation hidden from the end user, just like with the rest of the API. SDL is consistent across all platforms, and so is FMOD.

The truly interesting question is how to allow extensions to be made in a fashion that is platform- and vendor-agnostic, standard and than benefits the end-user (the developer) so we can avoid the mechanisms we''ve both mentioned - NV_* and ATI_* being prime examples. I assume this is one of the issues that 2.0 addresses (I haven''t really studied the spec/proposal).

While it can be argued that DirectX doesn''t have platform issues to address (other than the closed-access XBox version), they did take steps to solve version compatibility problems by basing DX on COM. Is it feasible to based OpenGL (or its successor) on (open) object technologies like CORBA? Is it possible to provide some QueryInterface-like functionality for determining exact vendor extensions available, and utilizing them in a cohesive manner (dropping vendor-specific extension names would be one step such that cards from different manufacturers providing the same additional functionality would use the same extension name, removing the burden of writing to specific drivers)? I, for one, sincerely hope so.

quote:
It ultimately always depends on your goals, and target markets. And if everything goes well with the OpenGL 2.0 launch, lots of there above mentioned problems will disappear - and we are all waiting for that.

Amen to that!
>>they did take steps to solve version compatibility problems by basing DX on COM<<

i was drinking coffie when i read that (with obvious results )

http://uk.geocities.com/sloppyturds/gotterdammerung.html
This is very against what it seems most people are saying. But in the game programming world - or PC game programming only - wouldn''t it not be so bad to ignore all platforms other than Windows? I mean, it may be good programming practice to do this or that, but if you want to make a killer game and you dont want it to be for any other console than Windows...why not use the Win32 API?

And in general, most games do come out for Windows and nothing else but Windows. This maybe just me, but it also seem like more and more games are just using Direct3D and ignoring OpenGL(this isn''t to start a war).
"Ogun's Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.
quote:Original post by zedzeek
>>they did take steps to solve version compatibility problems by basing DX on COM<<

i was drinking coffie when i read that (with obvious results )

LOL! But you know what I meant: the reason we have to CoInitialize and QueryInterface is to allow the API interfaces be broken if absolutely necessary without breaking existing code that depended on those interfaces (those who have no idea what I''m talking about, don''t worry; it''s in those static libs you link in). And while it''s not necessarily the most elegant of solutions, it works extremely well.

quote:Original post by EbonySeraph
This is very against what it seems most people are saying. But in the game programming world - or PC game programming only - wouldn''t it not be so bad to ignore all platforms other than Windows? I mean, it may be good programming practice to do this or that, but if you want to make a killer game and you dont want it to be for any other console than Windows...why not use the Win32 API?

Platforms come and go. Professional shops will receive specs and debug units and dev kits early to allow them deliver content on time for new platforms, but having honed the techniques of platform-agnostic programming and built solid abstraction layers allows your library developers to port your existing tools to new platforms while the rest of your workforce continues using those tools "blindy". Existing, proven and familiar tools can greatly shorten development cycles, which means reduced cost and more time spent on play balancing and QA, which means a better game, which means higher sales, which means more profits to fund further game development.

quote:Original post by EbonySeraph
And in general, most games do come out for Windows and nothing else but Windows. This maybe just me, but it also seem like more and more games are just using Direct3D and ignoring OpenGL(this isn''t to start a war).

Only Windows developers can afford to ignore OpenGL and use Direct3D (XBox runs on a version of Windows, so it doesn''t count). OpenGL is available in some form on virtually all other platforms, so it''s a very important API. I just wonder whether 2.0 will really respond to the concerns of the developer or whether it''s time for an alternative (don''t take that too seriously; gaining the manufacturer support necessary to be an effective alternative to either D3D or OpenGL is no easy task). Why is this important? Because most games, contrary to your statement, do not come out for "Windows and nothing else but Windows". The cutting-edge PC gaming market still lags behind the console space in terms of grosses and media units. Even Microsoft thinks the PC market will never upset the console space, so it got into that other market with its XBox.

Anyway, I think this thread has drifted far enough.

This topic is closed to new replies.

Advertisement