diff options
Diffstat (limited to 'src/glut/dos')
-rw-r--r-- | src/glut/dos/glutint.h | 1 | ||||
-rw-r--r-- | src/glut/dos/init.c | 5 | ||||
-rw-r--r-- | src/glut/dos/window.c | 8 |
3 files changed, 10 insertions, 4 deletions
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; } |