Cube map shader texture binding

I have set up a few classes which basically encapsulate the dynamic cube map generation code as in the superbible, 4th ed. p 616 based on framebufferobjects.
Now, I want to provide this texture(cube) to a shader for coloring a sphere. The shader code seems to be correct, because if I use static images, it looks ok.
However, when I try to generate images dynamically, something goes wrong: I get (static) random images (which are currently on the gpu memory) painted onto the sphere.
For painting the 6 sides of the texture-cube, I use glFramebufferTexture2D as in the book, but I am not sure what really goes wrong.
How do I bind the texture-cube to the shader-variable?
Currently, I use something like:
glBindTexture(GL_TEXTURE_CUBE_MAP, cubeMapId);
setUniformValue(cubeMapTexLocation, 0); // cubeMapTexLocation is the location of the cubeMapTex variable, a samplerCube, in the shader

Is there an easy way to check the 6 images in the framebuffer after having rendered them (GL_TEXTURE_CUBE_MAP_POSITIVE_X,…?

Any ideas what is wrong here?

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