Mahlzeit's picture

Using extensions

Hi, I'm new to the whole of OpenGL and was wondering how I could enable extensions? OpenTK supposedly exposes all of OpenGL, and I would like to test this one:
GL_OES_vertex_array_object

which should be exposed in OpenGL ES 2.0 and 1.1 as shown here:
http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro11&D=Apple%20...

and here:
http://www.khronos.org/registry/gles/

I'm gathering that I need to call GL.Enable(), but unfortunately I cannot find the correct enum. ES2.0 EnableCap only has about ~15 things to chose from, e.g. "Blend" which doesn't seem to fall into the right category which I'm looking for.

Thank you very much for your help!


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

By default, OpenTK doesn't add extension tokens to core enums (e.g. GL_OES_vertex_array_object to EnableCap). The simplest solution is to cast from the desired tokens from the "All" enum, which contains all available tokens.

Mahlzeit's picture

I found the vertexarrayobject,
http://www.opentk.com/files/doc/_g_l_enums_8cs_source.html

but it isnt avaiable in OpenGL ES 2.0 or 1.1 Enums.cs file !
Each OpenGL implementation has its own "All" enum. Does this mean that I cant use the extension, or that I should copy or merge the enum files somehow...

This would mean that OpenTK can do less than the c++ OpenGL, right? Just need to know, maybe there is an option do implement it myself at a later stage in OpenTK development.

the Fiddler's picture

Aha, the cause is simple: this extension was added to the ES registry after the last OpenTK update. I'll sync OpenTK with the latest specs (released last month).

Mahlzeit's picture

Sorry to be so naive, but what do you mean by "synced"? I supppose you mean, that you updated the OpenTK specs to reflect, that using this extension is not possible? The Enums.cs source hasn't changed, I looked into the trunk.
When do you think OpenTK will support this feature?

Edit: and where are the specs you synced?

the Fiddler's picture

By "sync" I mean update the header files to reflect those on the khronos website. These files are then converted to an xml representation and finally to C# code that is included in OpenTK.dll.

I haven't committed the changes to SVN yet because I'm making a small change to the xml generator to make future updates smoother (converting the header files to xml is not an exact science). I'll commit to the 1.0 branch as soon as this is ready.

Mahlzeit's picture

Thanks, I'll look into the changes every other day. :)