www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Access violation error using Derelict GL3

reply "Ross Hays" <test gmail.com> writes:
I have run into a problem using the Derelict GL3 binding and I am 
not sure if I am doing something wrong or if this is a bug.

I have a class that contains several uints that are to represent 
the ids returned by OpenGL functions. I have a call to 
glDeleteBuffers that always result in "object.Error: Access 
Violation." My specific call is glDeleteBuffers(1, 
&m_vertextBuffer); where m_vertexBuffer has a value of 0. 
According to the documentation for OpenGL, this should be 
silently ignored but instead it crashes.

Am I doing something wrong here?
Dec 15 2013
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 12/15/13, Ross Hays <test gmail.com> wrote:
 Am I doing something wrong here?
You're likely not loading the function pointers first. Try calling DerelictGL.reload() first.
Dec 15 2013
parent "Ross Hays" <test gmail.com> writes:
On Sunday, 15 December 2013 at 21:31:21 UTC, Andrej Mitrovic 
wrote:
 On 12/15/13, Ross Hays <test gmail.com> wrote:
 Am I doing something wrong here?
You're likely not loading the function pointers first. Try calling DerelictGL.reload() first.
That was it... knew it was something dumb. I had it in there originally in a version tag that I accidentally stopped using. Thanks.
Dec 15 2013