Original Post
Hi,
I'm trying to do some rendering to cube maps, and I ran into this bug.
the code below crashes on the glCheckFramebuffer() call, on this machine :
xUbuntu 12.04 64 bit, Catalyst 12.8 64 bit, AMD A8-4500M
I believe this is a driver bug, because the frame stack ended there.
So is this one? Or am I doing something wrong?
Best regards,
Yours3lf
I'm trying to do some rendering to cube maps, and I ran into this bug.
the code below crashes on the glCheckFramebuffer() call, on this machine :
xUbuntu 12.04 64 bit, Catalyst 12.8 64 bit, AMD A8-4500M
I believe this is a driver bug, because the frame stack ended there.
So is this one? Or am I doing something wrong?
GLuint cubemap_tex = 0;
int w = 256;
int h = 256;
glGenTextures( 1, &cubemap_tex );
glBindTexture( GL_TEXTURE_2D, cubemap_tex );
glTexParameteri( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexImage2D( GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA16F, w, h, 0, GL_RGBA, GL_FLOAT, 0 );
glTexImage2D( GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGBA16F, w, h, 0, GL_RGBA, GL_FLOAT, 0 );
glTexImage2D( GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGBA16F, w, h, 0, GL_RGBA, GL_FLOAT, 0 );
glTexImage2D( GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGBA16F, w, h, 0, GL_RGBA, GL_FLOAT, 0 );
glTexImage2D( GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGBA16F, w, h, 0, GL_RGBA, GL_FLOAT, 0 );
glTexImage2D( GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGBA16F, w, h, 0, GL_RGBA, GL_FLOAT, 0 );
GLuint cubemap_fbo = 0;
glGenFramebuffers( 1, &cubemap_fbo );
glBindFramebuffer( GL_FRAMEBUFFER, cubemap_fbo );
GLenum mode = GL_COLOR_ATTACHMENT0;
glDrawBuffers( 1, &mode );
glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_POSITIVE_X, cubemap_tex, 0 );
GLenum error_code = glCheckFramebufferStatus( GL_FRAMEBUFFER ); //crashes here
glBindFramebuffer( GL_FRAMEBUFFER, 0 );
Best regards,
Yours3lf