From 760960028f189e3afcbfef1f877dbd5b86fd1ae4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 28 Aug 2003 16:57:01 +0000 Subject: Updates from Daniel Borca --- src/glut/dos/glutint.h | 1 + src/glut/dos/init.c | 5 +++++ src/glut/dos/window.c | 8 ++++---- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/glut') diff --git a/src/glut/dos/glutint.h b/src/glut/dos/glutint.h index 013b307e94..23ab169d39 100644 --- a/src/glut/dos/glutint.h +++ b/src/glut/dos/glutint.h @@ -103,6 +103,7 @@ extern GLUTidleCB g_idle_func; extern GLUTmenuStatusCB g_menu_status_func; extern GLuint g_bpp; /* HW: bits per pixel */ +extern GLuint g_alpha; /* HW: alpha bits */ extern GLuint g_depth; /* HW: depth bits */ extern GLuint g_stencil; /* HW: stencil bits */ extern GLuint g_accum; /* HW: accum bits */ diff --git a/src/glut/dos/init.c b/src/glut/dos/init.c index 22bab9f8af..d30f270c64 100644 --- a/src/glut/dos/init.c +++ b/src/glut/dos/init.c @@ -35,6 +35,7 @@ #define DEFAULT_HEIGHT 300 #define DEFAULT_BPP 16 +#define ALPHA_SIZE 8 #define DEPTH_SIZE 16 #define STENCIL_SIZE 8 #define ACCUM_SIZE 16 @@ -42,6 +43,7 @@ GLuint g_bpp = DEFAULT_BPP; +GLuint g_alpha = ALPHA_SIZE; GLuint g_depth = DEPTH_SIZE; GLuint g_stencil = STENCIL_SIZE; GLuint g_accum = ACCUM_SIZE; @@ -67,6 +69,9 @@ void APIENTRY glutInit (int *argc, char **argv) if ((env = getenv("DMESA_GLUT_BPP")) != NULL) { g_bpp = atoi(env); } + if ((env = getenv("DMESA_GLUT_ALPHA")) != NULL) { + g_alpha = atoi(env); + } if ((env = getenv("DMESA_GLUT_DEPTH")) != NULL) { g_depth = atoi(env); } diff --git a/src/glut/dos/window.c b/src/glut/dos/window.c index 06e8ea9ead..af00897f3e 100644 --- a/src/glut/dos/window.c +++ b/src/glut/dos/window.c @@ -71,10 +71,10 @@ int APIENTRY glutCreateWindow (const char *title) if ((visual=DMesaCreateVisual(g_init_x + m8width, g_init_y + g_init_h, g_bpp, g_refresh, g_display_mode & GLUT_DOUBLE, !(g_display_mode & GLUT_INDEX), - g_display_mode & GLUT_ALPHA, - g_display_mode & GLUT_DEPTH ? g_depth :0, - g_display_mode & GLUT_STENCIL ? g_stencil:0, - g_display_mode & GLUT_ACCUM ? g_accum :0))==NULL) { + (g_display_mode & GLUT_ALPHA ) ? g_alpha : 0, + (g_display_mode & GLUT_DEPTH ) ? g_depth : 0, + (g_display_mode & GLUT_STENCIL) ? g_stencil : 0, + (g_display_mode & GLUT_ACCUM ) ? g_accum : 0))==NULL) { return 0; } -- cgit v1.2.3