Add a GL_GENERATE_MIPMAP fallback to the texture 2d and 3d backends
authorNeil Roberts <neil@linux.intel.com>
Tue, 13 Jul 2010 17:41:01 +0000 (18:41 +0100)
committerNeil Roberts <neil@linux.intel.com>
Tue, 13 Jul 2010 17:41:01 +0000 (18:41 +0100)
commitceb57087a76056b27f55ea67a2f97915570ad8cb
treed47f4d21ced314e39cd85616d28a721f560a2159
parentff56f4ac6f763dbce730454b8aa0806a1127e6cd
Add a GL_GENERATE_MIPMAP fallback to the texture 2d and 3d backends

The CoglTexture2DSliced backend has a fallback for when the
framebuffer extension is missing so it's not possible to use
glGenerateMipmap. This involves keeping a copy of the upper-left pixel
of the tex image so that we can temporarily enable GL_GENERATE_MIPMAP
on the texture object and do a sub texture update by reuploading the
contents of the first pixel. This patch copies that mechanism to the
2D and 3D backends. The CoglTexturePixel structure which was
previously internal to the sliced backend has been moved to
cogl-texture-private.h so that it can be shared.
clutter/cogl/cogl/cogl-texture-2d-private.h
clutter/cogl/cogl/cogl-texture-2d-sliced-private.h
clutter/cogl/cogl/cogl-texture-2d.c
clutter/cogl/cogl/cogl-texture-3d-private.h
clutter/cogl/cogl/cogl-texture-3d.c
clutter/cogl/cogl/cogl-texture-private.h