summaryrefslogtreecommitdiff
path: root/src/glitz_texture.c
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2004-04-28 08:59:38 +0000
committerDavid Reveman <davidr@novell.com>2004-04-28 08:59:38 +0000
commit14b8f0268696e867ef1c87d174e0ab4c233e691b (patch)
treec4a36d7caa3027d0cf7d5c6e3e1812bc54df4354 /src/glitz_texture.c
parentffe7e1d21cef1ab1e576274f774f86a47f58317b (diff)
Added support for direct compositing with mask surface only using multi-texturing
Diffstat (limited to 'src/glitz_texture.c')
-rw-r--r--src/glitz_texture.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/glitz_texture.c b/src/glitz_texture.c
index caa24ca..813a862 100644
--- a/src/glitz_texture.c
+++ b/src/glitz_texture.c
@@ -66,6 +66,15 @@ glitz_texture_generate (glitz_gl_proc_address_list_t *gl,
texture->format = texture_format;
texture->allocated = 0;
+ switch (texture->format) {
+ case GLITZ_GL_LUMINANCE_ALPHA:
+ texture->internal_format = GLITZ_GL_LUMINANCE_ALPHA;
+ break;
+ default:
+ texture->internal_format = GLITZ_GL_RGBA;
+ break;
+ }
+
if (!(target_mask & GLITZ_TEXTURE_TARGET_NPOT_MASK)) {
_glitz_texture_find_best_target (width, height,
target_mask, &texture->target);
@@ -106,7 +115,8 @@ glitz_texture_allocate (glitz_gl_proc_address_list_t *gl,
glitz_texture_bind (gl, texture);
- gl->tex_image_2d (texture->target, 0, GLITZ_GL_RGBA,
+ gl->tex_image_2d (texture->target, 0,
+ texture->internal_format,
texture->width, texture->height,
0, texture->format, GLITZ_GL_UNSIGNED_BYTE, NULL);