Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Usage of GL_ARB_clear_texture throws access violation exception

Tags:

opengl

I use OpenGL 4.3 (core).My video card is NVidia Quadro4000 which supports OpenGL 4.3.I decided to try glClearTexImage() function.I updated GLEW from 1.9.0 to 1.10.0 which has this method mapped. When glClearTexImage line is entered, Visual Studio throws following exception:

"Unhandled exception at 0x757AC9F5 in XXXXX_XXXX.exe:0xC0000005:Access violation executing location 0x00000000."

The code is simple:

//...Here the texture is created....

    GLuint clearColor = 0;
glBindTexture   (_target,newTex);
glClearTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_BYTE, &clearColor);
like image 300
Michael IV Avatar asked Mar 23 '23 17:03

Michael IV


1 Answers

check value of glClearTexImage, e.g.

printf("%p\n", glClearTexImage);

It's most likely to be NULL. If so, check GLEW_ARB_clear_texture - surely it will be 0 too.

like image 173
keltar Avatar answered Apr 25 '23 05:04

keltar