diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-02-24 18:49:33 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-03 12:37:04 -0800 |
commit | fcf438e9e03f6e75bca4a49ad372fe7c4b1abbf8 (patch) | |
tree | 97e60edd4183291bd9e255e30a0998564c6a51f4 | |
parent | a9c1b3caf67f035df83c6a4e38709cfa395f4cc6 (diff) |
mesa: Remove support for creating color-index visuals
Remove the rgbMode and indexBits parameters from _mesa_create_visual
and _mesa_initialize_visual. These values are now hardcoded to
GL_TRUE and 0.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_api.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/beos/GLView.cpp | 4 | ||||
-rw-r--r-- | src/mesa/drivers/fbdev/glfbdev.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/glslcompiler/glslcompiler.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/windows/gdi/wmesa.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/windows/gldirect/dglcontext.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 3 | ||||
-rw-r--r-- | src/mesa/main/context.c | 15 | ||||
-rw-r--r-- | src/mesa/main/context.h | 6 |
10 files changed, 16 insertions, 35 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index 68518b19b9..217bdeff75 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -746,10 +746,9 @@ XMesaVisual XMesaCreateVisual( Display *display, } _mesa_initialize_visual( &v->mesa_visual, - rgb_flag, db_flag, stereo_flag, + db_flag, stereo_flag, red_bits, green_bits, blue_bits, alpha_bits, - v->mesa_visual.indexBits, depth_size, stencil_size, accum_red_size, accum_green_size, diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp index 9e4a7ebe56..a029f6b200 100644 --- a/src/mesa/drivers/beos/GLView.cpp +++ b/src/mesa/drivers/beos/GLView.cpp @@ -297,11 +297,9 @@ BGLView::BGLView(BRect rect, char *name, MesaDriver * md = new MesaDriver(); // examine option flags and create gl_context struct - GLvisual * visual = _mesa_create_visual( rgbFlag, - dblFlag, + GLvisual * visual = _mesa_create_visual( dblFlag, stereoFlag, red, green, blue, alpha, - index, depth, stencil, accum, accum, accum, accum, diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c index e6ece69a64..0ea2796eaa 100644 --- a/src/mesa/drivers/fbdev/glfbdev.c +++ b/src/mesa/drivers/fbdev/glfbdev.c @@ -327,7 +327,7 @@ glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo, const int *attrib; GLboolean dbFlag = GL_FALSE, stereoFlag = GL_FALSE; GLint redBits = 0, greenBits = 0, blueBits = 0, alphaBits = 0; - GLint indexBits = 0, depthBits = 0, stencilBits = 0; + GLint depthBits = 0, stencilBits = 0; GLint accumRedBits = 0, accumGreenBits = 0; GLint accumBlueBits = 0, accumAlphaBits = 0; GLint numSamples = 0; @@ -414,9 +414,9 @@ glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo, } } - if (!_mesa_initialize_visual(&vis->glvisual, GL_TRUE, dbFlag, stereoFlag, + if (!_mesa_initialize_visual(&vis->glvisual, dbFlag, stereoFlag, redBits, greenBits, blueBits, alphaBits, - indexBits, depthBits, stencilBits, + depthBits, stencilBits, accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits, numSamples)) { diff --git a/src/mesa/drivers/glslcompiler/glslcompiler.c b/src/mesa/drivers/glslcompiler/glslcompiler.c index 448029dace..66035a4a43 100644 --- a/src/mesa/drivers/glslcompiler/glslcompiler.c +++ b/src/mesa/drivers/glslcompiler/glslcompiler.c @@ -113,9 +113,9 @@ CreateContext(void) GLcontext *ctx; CompilerContext *cc; - vis = _mesa_create_visual(GL_TRUE, GL_FALSE, GL_FALSE, /* RGB */ + vis = _mesa_create_visual(GL_FALSE, GL_FALSE, /* RGB */ 8, 8, 8, 8, /* color */ - 0, 0, 0, /* z, stencil */ + 0, 0, /* z, stencil */ 0, 0, 0, 0, 1); /* accum */ buf = _mesa_create_framebuffer(vis); diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index bb6dbdf1c0..e20507ae92 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1116,14 +1116,12 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, osmesa = (OSMesaContext) CALLOC_STRUCT(osmesa_context); if (osmesa) { - osmesa->gl_visual = _mesa_create_visual( GL_TRUE, /* rgbMode */ - GL_FALSE, /* double buffer */ + osmesa->gl_visual = _mesa_create_visual( GL_FALSE, /* double buffer */ GL_FALSE, /* stereo */ redBits, greenBits, blueBits, alphaBits, - 0, depthBits, stencilBits, accumBits, diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c index 2fdcb387be..91ddc3615a 100644 --- a/src/mesa/drivers/windows/gdi/wmesa.c +++ b/src/mesa/drivers/windows/gdi/wmesa.c @@ -1461,12 +1461,10 @@ WMesaContext WMesaCreateContext(HDC hDC, break; } /* Create visual based on flags */ - visual = _mesa_create_visual(rgb_flag, - db_flag, /* db_flag */ + visual = _mesa_create_visual(db_flag, /* db_flag */ GL_FALSE, /* stereo */ red_bits, green_bits, blue_bits, /* color RGB */ alpha_flag ? alpha_bits : 0, /* color A */ - 0, /* index bits */ DEFAULT_SOFTWARE_DEPTH_BITS, /* depth_bits */ 8, /* stencil_bits */ 16,16,16, /* accum RGB */ diff --git a/src/mesa/drivers/windows/gldirect/dglcontext.c b/src/mesa/drivers/windows/gldirect/dglcontext.c index e9c23d1ccb..a420b36ffb 100644 --- a/src/mesa/drivers/windows/gldirect/dglcontext.c +++ b/src/mesa/drivers/windows/gldirect/dglcontext.c @@ -1377,14 +1377,12 @@ SkipPrimaryCreate: #ifdef _USE_GLD3_WGL lpCtx->glVis = _mesa_create_visual( - GL_TRUE, // RGB mode bDouble, /* double buffer */ GL_FALSE, // stereo lpPFD->cRedBits, lpPFD->cGreenBits, lpPFD->cBlueBits, dwAlphaBits, - 0, // index bits dwDepthBits, dwStencilBits, lpPFD->cAccumRedBits, // accum bits diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index c59df55166..a1723fa37b 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1443,10 +1443,9 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display, } _mesa_initialize_visual( &v->mesa_visual, - GL_TRUE, db_flag, stereo_flag, + db_flag, stereo_flag, red_bits, green_bits, blue_bits, alpha_bits, - v->mesa_visual.indexBits, depth_size, stencil_size, accum_red_size, accum_green_size, diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 4ecbb5ecf6..b827d54176 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -184,7 +184,6 @@ _mesa_notifySwapBuffers(__GLcontext *ctx) * Allocates a GLvisual structure and initializes it via * _mesa_initialize_visual(). * - * \param rgbFlag GL_TRUE for RGB(A) mode, GL_FALSE for Color Index mode. * \param dbFlag double buffering * \param stereoFlag stereo buffer * \param depthBits requested bits per depth buffer value. Any value in [0, 32] @@ -206,14 +205,12 @@ _mesa_notifySwapBuffers(__GLcontext *ctx) * \note Need to add params for level and numAuxBuffers (at least) */ GLvisual * -_mesa_create_visual( GLboolean rgbFlag, - GLboolean dbFlag, +_mesa_create_visual( GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, - GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, @@ -224,9 +221,9 @@ _mesa_create_visual( GLboolean rgbFlag, { GLvisual *vis = (GLvisual *) calloc(1, sizeof(GLvisual)); if (vis) { - if (!_mesa_initialize_visual(vis, rgbFlag, dbFlag, stereoFlag, + if (!_mesa_initialize_visual(vis, dbFlag, stereoFlag, redBits, greenBits, blueBits, alphaBits, - indexBits, depthBits, stencilBits, + depthBits, stencilBits, accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits, numSamples)) { @@ -248,14 +245,12 @@ _mesa_create_visual( GLboolean rgbFlag, */ GLboolean _mesa_initialize_visual( GLvisual *vis, - GLboolean rgbFlag, GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, - GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, @@ -277,7 +272,7 @@ _mesa_initialize_visual( GLvisual *vis, assert(accumBlueBits >= 0); assert(accumAlphaBits >= 0); - vis->rgbMode = rgbFlag; + vis->rgbMode = GL_TRUE; vis->doubleBufferMode = dbFlag; vis->stereoMode = stereoFlag; @@ -287,7 +282,7 @@ _mesa_initialize_visual( GLvisual *vis, vis->alphaBits = alphaBits; vis->rgbBits = redBits + greenBits + blueBits; - vis->indexBits = indexBits; + vis->indexBits = 0; vis->depthBits = depthBits; vis->stencilBits = stencilBits; diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index c3be1063f8..09bf1777da 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -60,14 +60,12 @@ struct _glapi_table; /*@{*/ extern GLvisual * -_mesa_create_visual( GLboolean rgbFlag, - GLboolean dbFlag, +_mesa_create_visual( GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, - GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, @@ -78,14 +76,12 @@ _mesa_create_visual( GLboolean rgbFlag, extern GLboolean _mesa_initialize_visual( GLvisual *v, - GLboolean rgbFlag, GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, - GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, |