PDA

View Full Version : nvidia: opengl 3.2 alpha textures don't work



makaroni
11-19-2009, 06:29 AM
hello,

i recently wanted to try some of the new opengl 3.2 features. however as soon as i choose an opengl 3.2 context using wglCreateContextAttribsARB my 1 component GL_ALPHA textures no longer work ( the glsl shader texture lookup functions always return 0). everything is fine if i switch to opengl 3.1 or 2.1. the problem is gone if i exchange the GL_ALPHA textures by GL_RGB.

i tested everything under windows xp pro x64 and the nvidia driver 191.07.

do i have to do something new with respect to opengl 3.2 or is it a driver bug?

DmitryM
11-19-2009, 07:11 AM
I don't see GL_ALPHA in the list of texture formats (and internal formats) according to GL 3.2 spec (point me to it if it's there).

I guess you can switch to GL_RED-family formats safely.

makaroni
11-19-2009, 09:20 AM
i see. if i enable opengl 3.2 its not automatically in a compatibility mode i assume, so GL_ALPHA textures as well as GL_QUADS no longer work.

thanks for your fast reply.

Alfonse Reinheart
11-19-2009, 11:02 AM
if i enable opengl 3.2 its not automatically in a compatibility mode i assume

You didn't ask for compatibility mode. You have to set the WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB in the WGL_CONTEXT_PROFILE_MASK_ARB attribute. According to the latest version of WGL_ARB_context_create, the default value of WGL_CONTEXT_PROFILE_MASK_ARB is WGL_CONTEXT_CORE_PROFILE_BIT_ARB.

makaroni
11-19-2009, 11:36 AM
thank you. this did the trick.