You are not logged in.

#1 2009-12-23 00:42:50

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

A question about OpenGL extensions.

The situation is (example):

I want to use vertex buffer objects. On OpenGL core profile <=1.4 it is provided as GL_ARB_vertex_buffer_object. Since that (>=1.5) it is a core feature. When it is extension functions have names such as glBindBufferARB. When it is core feature, it is glBindBuffer.
So, the exact questions are:
1. How to correctly test for presence of vertex_buffer_object? (as an extension, or as a core feature)
2. Will OpenGL >=1.5 have glBindBuffer AND glBindBufferARB, or only glBindBuffer?

I can't check currently by myself, since I have only netbook now, and it has OpenGL 1.4. I haven't find any clear sentences about this. So, if somebody here knows OpenGL well, I would really appreciate that. smile

Offline

#2 2009-12-23 23:59:38

kakTuZ
Member
From: Hannover, Germany
Registered: 2007-10-20
Posts: 86

Re: A question about OpenGL extensions.

Hi, the extensions will not be removed (not until they finally decide to make a release without backwards compatibility which version 3 was supposed to be but wasn't). At the moment you can assume that glBindBufferARB is available in the newest OpenGL versions.

You can decide here to either use the glBindBuffer function and stating somewhere that your software requires a minimum of OpenGL 1.5. Just test for OpenGL version >=1.5)

Or you want to support older versions. In that case you need to check the availability and retrieve its function pointer. See http://www.opengl.org/resources/features/OGLextensions/ sections 5 and 6. This does not hurt, because you probably want to use other extensions as well and than you'll have an infrastructure at hand.

Offline

#3 2009-12-24 00:20:15

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: A question about OpenGL extensions.

So, it seems that I can use even geometry shaders with any OpenGL version, but the extension GL_ARB_geometry_shader should be present?

If it so, what is the reason of introducing new OpenGL versions, if all that functionality is exposed through extensions anyway?

Why will I need to use OpenGL 3.2 core profile (for example), why not to use all the features from it through extensions?

Offline

#4 2009-12-24 09:07:23

the_isz
Member
Registered: 2009-04-14
Posts: 280

Re: A question about OpenGL extensions.

Well, because the OpenGL version defines from which version you can actually
rely on an extension to exist. This has four applications as far as I
see it:

* First, the (in my eyes) obvious: The extensions from the core profile are
officially supported. There probably exist many extensions which will never make
it into the core profile, so you can't be sure if they die someday.
* Hardware producers are able to say "card x supports OpenGL standard
3.2" so that customers know which extensions will definitely supported by the
card when buying it.
* The same accounts for extension developers: When they develop a new
extension, they know from which OpenGL version on their required extensions
will be available.
* And finally, application developers are able to tell their customers which
version of the OpenGL standard their card needs to fulfill to be able to run
their program.

Of course, you could do all that by enlisting extension names, but please: Who
the hell would check a list of 200 strings on the backside of a graphic card box
he's about to buy? wink

Edit: Why the heck does this forum not support lists!?

Last edited by the_isz (2009-12-24 09:08:55)

Offline

#5 2009-12-24 12:40:56

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: A question about OpenGL extensions.

Well, for the purpose of identifying hardware tech level, DirectX version is more widely used anyway (sad but true).
OpenGL 3.2 = DirectX 10, but (!) OpenGL 3.2 core + extensions = DirectX 11, or even (theoretically) OpenGL 1.1 core + extensions = DirectX 11.

OpenGL core profile version is therefore can not be considered as a thing for measuring GPU tech level.

And one more question: how can I know, which GLSL version do I have? (when not relying on core version, using shaders as extensions)

Offline

Board footer

Powered by FluxBB