I just discovered something that might have caused this.

I was calling:

[pascal]
ReadImplementationProperties;
ReadExtensions;
[/pascal]

while no rendercontext was activated. glProcedure, who assigns adresses to all the procvars failed miserably. So tons of procs weren't initialized.

I tried to manualy load the functions by using:

[pascal]
type
PFNGLBINDBUFFERARBPROC = procedure(target: GLenum; buffer: GLuint); stdcall;
PFNGLDELETEBUFFERSARBPROC = procedure(n :GLsizei; const buffers: PGLuint); stdcall;
PFNGLGENBUFFERSARBPROC = procedure(n :GLsizei; buffers: PGLuint); stdcall;
PFNGLBUFFERDATAARBPROC = procedure(target: GLenum; size: integer; const data: pointer; usage: GLenum); stdcall;

const
GL_ARRAY_BUFFER_ARB = $8892;
GL_STATIC_DRAW_ARB = $88E4;

var
glGenBuffersARB: PFNGLGENBUFFERSARBPROC = nil;
glBindBufferARB: PFNGLBINDBUFFERARBPROC = nil;
glBufferDataARB: PFNGLBUFFERDATAARBPROC = nil;
glDeleteBuffersARB: PFNGLDELETEBUFFERSARBPROC = nil;

{....}
//PROCVAR ASSIGNMENTS
glGenBuffersARB := wglGetProcAddress('glGenBuffersARB');
glBindBufferARB := wglGetProcAddress('glBindBufferARB');
glBufferDataARB := wglGetProcAddress('glBufferDataARB');
glDeleteBuffersARB := wglGetProcAddress('glDeleteBuffersARB');
[/pascal]

And it worked, but it's a messy workaround. During the last tests i outcommented the procvar-assignments and continued debugging. I should have outcommented all the code shown above, because the procedure-variables hid the variables in dglOpenGL.pas, because they had the same name. The variables in my app never got initialized, so the AV kept popping up. Basicly i created my own bug by not cleaning up the mess. :shock: