Cubemap sampler with cubemap texture


I’ve come across a problem when using a cubemap texture and a cubemap sampler inside of a texture. When I associate a cubemap texture with a cubemap sampler inside of a shader, the cubemap texture then binds itself to every other object in the world (overriding any other texture binds I call).

here is some pseudo code of what i do:

//create the cube map texture using fbo

//bind the program shader
glActiveTexture(GL_TEXTURE0 + next_unused_value);
glBindTexture(GL_TEXTURE_CUBE_MAP, cubemapGLuint);

//set up texture params for cubemapping
//repeat for s,t


//draw my object

//detach the shader

I can’t seem to track down any reasons why the cube map will override textures especially since it isn’t bound when other objects are drawn.


Do a XML frame grab with and have a look at what textures are bound with each draw call.

(Use the AuthorStd profile and press CTRL-SHIFT-F)

thanks for the program. It helped me track down my issue. FYI, I was disabling GL_TEXTURE_CUBE_MAP in a different active texture than the one I originally created the cube map and had never originally turned off GL_TEXTURE_CUBE_MAP there.

Thanks again, looking at it from a different angle helped me locate the issue.


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.