h = att->Texture->Image[att->CubeMapFace][att->TextureLevel]->Height;
f = att->Texture->Image[att->CubeMapFace][att->TextureLevel]->Format;
numImages++;
+ if (f != GL_RGB && f != GL_RGBA && f != GL_DEPTH_COMPONENT) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
+ return;
+ }
}
else if (att->Type == GL_RENDERBUFFER_EXT) {
w = att->Renderbuffer->Width;
trb->Base.Height = trb->TexImage->Height;
trb->Base.InternalFormat = trb->TexImage->IntFormat; /* XXX fix? */
trb->Base._BaseFormat = trb->TexImage->TexFormat->BaseFormat;
+#if 0
+ /* fix/avoid this assertion someday */
assert(trb->Base._BaseFormat == GL_RGB ||
trb->Base._BaseFormat == GL_RGBA ||
trb->Base._BaseFormat == GL_DEPTH_COMPONENT);
+#endif
trb->Base.DataType = GL_UNSIGNED_BYTE; /* XXX fix! */
trb->Base.Data = trb->TexImage->Data;