www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DerelictGL3.reload() returns wrong (?) GLVersion (GL32, should be 33)

reply "Koi" <koi nokoi.de> writes:
Hello,

today i implemented OpenGL instancing, and it crashed when 
calling glVertexAttribDivisor (OpenGL 3.3).

So i checked DerelictGL3.reload() and it returned GLVersion.GL32, 
not GL33.

My graphic card (NVidia GT 240) should support GL33 and an OpenGL 
Extensions Viewer tool confirmed, that it supports OpenGL 3.3 
fully.

Did i overlook something?
Mar 28 2015
next sibling parent reply "Rene Zwanenburg" <renezwanenburg gmail.com> writes:
On Sunday, 29 March 2015 at 01:27:01 UTC, Koi wrote:
 Hello,

 today i implemented OpenGL instancing, and it crashed when 
 calling glVertexAttribDivisor (OpenGL 3.3).

 So i checked DerelictGL3.reload() and it returned 
 GLVersion.GL32, not GL33.

 My graphic card (NVidia GT 240) should support GL33 and an 
 OpenGL Extensions Viewer tool confirmed, that it supports 
 OpenGL 3.3 fully.

 Did i overlook something?
How do you create your context? OpenGL version needs to be specified when creating it, for example when using GLFW: glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); auto windowHandle = glfwCreateWindow(...);
Mar 29 2015
parent "Koi" <koi nokoi.de> writes:
On Sunday, 29 March 2015 at 14:34:39 UTC, Rene Zwanenburg wrote:
 On Sunday, 29 March 2015 at 01:27:01 UTC, Koi wrote:
 How do you create your context? OpenGL version needs to be 
 specified when creating it, for example when using GLFW:

 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);

 auto windowHandle = glfwCreateWindow(...);
thanks Rene and Mike. Didn't remember that. i'm not sure what's more weighting, being glad that it's just a small thing or being annoyed with myself. Grrrrr. thanks again!
Mar 29 2015
prev sibling parent Mike Parker <aldacron gmail.com> writes:
On 3/29/2015 10:26 AM, Koi wrote:
 Hello,

 today i implemented OpenGL instancing, and it crashed when calling
 glVertexAttribDivisor (OpenGL 3.3).

 So i checked DerelictGL3.reload() and it returned GLVersion.GL32, not GL33.

 My graphic card (NVidia GT 240) should support GL33 and an OpenGL
 Extensions Viewer tool confirmed, that it supports OpenGL 3.3 fully.

 Did i overlook something?
It isn't reporting what your driver supports, but the version of the context that is actually loaded. What do you get when you call glGetString(GL_VERSION)?
Mar 29 2015