From 43d646436c4bd2af0ab4764d0d9539272d171949 Mon Sep 17 00:00:00 2001 From: relnev Date: Tue, 30 Jul 2002 15:00:15 +0000 Subject: [PATCH] not use luminance alpha by default --- src/graphics/gropengl.cpp | 66 ++++++++++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/src/graphics/gropengl.cpp b/src/graphics/gropengl.cpp index 58bf855..b60690e 100644 --- a/src/graphics/gropengl.cpp +++ b/src/graphics/gropengl.cpp @@ -15,6 +15,9 @@ * Code that uses the OpenGL graphics library * * $Log$ + * Revision 1.54 2002/07/30 15:00:15 relnev + * not use luminance alpha by default + * * Revision 1.53 2002/06/22 17:08:16 relnev * more fixes to unused alpha code * @@ -345,6 +348,8 @@ typedef enum gr_zbuffer_type { volatile int GL_activate = 0; volatile int GL_deactivate = 0; +static int GL_use_luminance_alpha; + static char *Gr_saved_screen = NULL; static int Gr_saved_screen_bitmap; @@ -2238,8 +2243,9 @@ int opengl_create_texture_sub(int bitmap_type, int texture_handle, ushort *data, { int i,j; ubyte *bmp_data = ((ubyte*)data); - ubyte *texmem = (ubyte *) malloc (tex_w*tex_h*2); - ubyte *texmemp = texmem; + ubyte *texmem; + ubyte *texmemp; + ubyte xlat[256]; for (i=0; i<16; i++) { @@ -2250,23 +2256,53 @@ int opengl_create_texture_sub(int bitmap_type, int texture_handle, ushort *data, xlat[i] = xlat[0]; } - for (i=0;i