pjcozzi's picture

OpenGL 3.3 and 4.0 Functions

Hi,

I wanted to see if any of the GL 3.3 and 4.0 functions are available in the OpenTK developer builds. I tried both branches/gl4 and trunk and didn't see anything. Specifically, I'm interested in the new sampler objects - GL.GenSamplers, etc.

Regards,
Patrick


Comments

Comment viewing options

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

Hi Patrick. I just checked the build that i have and they're in there (Including GL.GenSamplers). I'm using a updated build that i generated myself. check the second half of this post for building details:

http://www.opentk.com/node/2081

pjcozzi's picture

Thanks for the link. I wouldn't have gotten as far as I did without it. I ran into a few new problems in addition to the ones you mentioned:

  • BlendingFactorDest.DstColor and BlendingFactorDest.OneMinusDstColor are missing (unless they were deprecated).
  • The first parameter to StencilFuncSeparate should not be Version20.
  • DrawRangeElements should not have the Version12 parameter.

I'll just wait for the official build. Thanks!

Patrick

sgsrules's picture

it only took a few minutes to fix and I'm impatient :P. generating the bindings from the new specs got rid of some needed enum like the ones i added, i just copied them from a previous opentk build, and changed the version parameters. On the other hand it doesn't look like it'll be too much longer till an official build is released.

swiftcoder's picture

I haven't actually managed to build a working copy of the gl4 branch with the new specs - I spent an hour recursing through errors on Friday (fix one error, and two more spring up).

You wouldn't happen to have more detailed instructions as to correcting all the errors, or better yet a patch file from a working build?

sgsrules's picture

Here's a link to my patched gl4 with the new specs.

http://www.ployproductions.com/OpenGL.rar

Just extract it into your OpenTK\Graphics\OpenGL folder and build using

 msbuild OpenTK.sln /p:Configuration=Release.

I haven't fully tested it yet but it builds with no errors, all my previous projects work and the new additions also work.

the Fiddler's picture

The gl4 branch contains a couple of backwards incompatible changes (bugfixes) but they affect rather exotic APIs (APPLE_object_purgeable) so they are less of an issue.

I am going to release an alpha gl4 build in the next few days which will be equivalent to the link in the previous post (so use that in the meantime). Strongly-typed enums will be coming shortly after that.

pjcozzi's picture

Thanks for the patch. I added fixes for DrawRangeElements and StencilFuncSeparate, and added BlendingFactorDest.DstColor and BlendingFactorDest.OneMinusDstColor. The zip with these changes is here:

http://dl.dropbox.com/u/1851229/OpenTKGL4/OpenGL2.zip

Regards,
Patrick
Virtual Globe and Terrain Rendering Blog

swiftcoder's picture
the Fiddler wrote:

The gl4 branch contains a couple of backwards incompatible changes (bugfixes) but they affect rather exotic APIs (APPLE_object_purgeable) so they are less of an issue.

Any idea just how incompatible gl4 is with trunk at this point? I need several of the features from trunk, but I also need access to ARB_tessellation_shader.
--
Tristam MacDonald - swiftcoding

the Fiddler's picture

The gl4 branch merges into trunk cleanly (a single conflict in enumext.spec can be resolved in favor of gl4) and you are unlikely to encounter any compatibility issues. However, I'd suggest simply dropping the GL4 files directly into your trunk instead of going down that path.