PDA

View Full Version : how to lookup cube map texture array in GLSL



shapeare
06-02-2012, 08:08 AM
My graphics driver supports OpenGL 4.2

In the fragment program, I use the following code to lookup a cube map array:


#version 420

uniform samplerCubeArray cubes;

...

texture(cubes, vec4(direction, depth));


Then I was reminded to enable the following extension:


#extension GL_ARB_texture_cube_map_array : enable


I compiled and ran, but it still said "unable to find compatible overloaded function 'texCUBEARRAY(samplerCubeArray, vec4)'".
Is the function texCUBEARRAY a funcion of Cg? What should I do?

Alfonse Reinheart
06-03-2012, 12:35 AM
Then I was reminded to enable the following extension:

Why? It's a core feature of GL 4.2. By declaring `#version 420`, you automatically have it.


What should I do?

Sounds like a driver bug. Contact NVIDIA about it.