Why am I seeing streak artifacts on the cube map I'm rendering?

Posted by BobDole on Game Development See other posts from Game Development or by BobDole
Published on 2011-11-10T04:18:06Z Indexed on 2011/11/11 18:29 UTC
Read the original article Hit count: 204

Filed under:
|

Streaks

I'm getting strange streaks on my cube map when rendering to it. He is my code that is being called each frame:

void drawCubeMap(void)
{


int face;
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glBindFramebuffer(GL_FRAMEBUFFER, fbo);
//glBindTexture(GL_TEXTURE_CUBE_MAP, cubeMapTexture);
//glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glViewport(0,0,sizeT, sizeT);

for (face = 0; face < 6; face++) {

   glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, cubeMapTexture, 0);
   drawSpheres();
}
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindTexture(GL_TEXTURE_2D, 0);
glViewport(0,0,900, 900);
}

Any idea what it might be? The streaking occurs when I'm rotating the spheres around the main sphere.

© Game Development or respective owner

Related posts about opengl

Related posts about glsl