Using GL_ARB_clear_texture excludes access violation

I am using OpenGL 4.3 (core). My NVidia Quadro4000 graphics card supports OpenGL 4.3. I decided to try glClearTexImage (). I updated GLEW from 1.9.0 to 1.10.0, which displays this method. When the glClearTexImage string is entered, Visual Studio throws the following exception:

"Unhandled exception in 0x757AC9F5 in XXXXX_XXXX.exe: 0xC0000005: Access violation 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); 
+4
source share
2 answers

check glClearTexImage value e.g.

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

Most likely it will be NULL. If so, check out GLEW_ARB_clear_texture - for sure it will also be 0.

+5
source

No release drivers support any of the latest OpenGL 4.4 features. Closest you are going to use the beta version of NVIDIA.

In addition, if you intend to use the function, you should check if the first version / extension is available.

+2
source

Source: https://habr.com/ru/post/1497975/


All Articles