summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide/fxapi.c
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2003-12-19 11:26:46 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2003-12-19 11:26:46 +0000
commite9e98405e720845f06f7a375585491e938f4dacd (patch)
treeae25ec98796f3456f2a5a17ce0a3d02d7838fd33 /src/mesa/drivers/glide/fxapi.c
parenteee77bf82fda5b9f3cf34e96e7d0010bf18db748 (diff)
DMesa: removed MGA2064W driver
DMesa: added capability to query visuals fxMesa: WGL_3DFX_gamma_control fxMesa: minor fixes to interface (fxQueryHardware vs fxMesaSelect...)
Diffstat (limited to 'src/mesa/drivers/glide/fxapi.c')
-rw-r--r--src/mesa/drivers/glide/fxapi.c68
1 files changed, 33 insertions, 35 deletions
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index e928b156eb..12b919b2e6 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -102,19 +102,46 @@ cleangraphics_handler(int s)
/*
+ * Query 3Dfx hardware presence/kind
+ */
+static GLboolean GLAPIENTRY fxQueryHardware (void)
+{
+ if (TDFX_DEBUG & VERBOSE_DRIVER) {
+ fprintf(stderr, "fxQueryHardware()\n");
+ }
+
+ if (!glbGlideInitialized) {
+ grGlideInit();
+ glb3DfxPresent = FX_grSstQueryHardware(&glbHWConfig);
+
+ glbGlideInitialized = 1;
+
+#if defined(__WIN32__)
+ _onexit((_onexit_t) cleangraphics);
+#elif defined(__linux__)
+ /* Only register handler if environment variable is not defined. */
+ if (!getenv("MESA_FX_NO_SIGNALS")) {
+ atexit(cleangraphics);
+ }
+#endif
+ }
+
+ return glb3DfxPresent;
+}
+
+
+/*
* Select the Voodoo board to use when creating
* a new context.
*/
-GLboolean GLAPIENTRY fxMesaSelectCurrentBoard (int n)
+GLint GLAPIENTRY fxMesaSelectCurrentBoard (int n)
{
fxQueryHardware();
if ((n < 0) || (n >= glbHWConfig.num_sst))
- return GL_FALSE;
-
- glbCurrentBoard = n;
+ return -1;
- return GL_TRUE;
+ return glbHWConfig.SSTs[glbCurrentBoard = n].type;
}
@@ -415,7 +442,7 @@ fxMesaCreateContext(GLuint win,
redBits = 5;
greenBits = 5;
blueBits = 5;
- alphaBits = 1;
+ alphaBits = depthSize ? 1 : 8;
switch(fxMesa->fsaa) {
case 8:
pixFmt = GR_PIXFMT_AA_8_ARGB_1555;
@@ -852,35 +879,6 @@ fxMesaSwapBuffers(void)
/*
- * Query 3Dfx hardware presence/kind
- */
-GLboolean GLAPIENTRY fxQueryHardware (void)
-{
- if (TDFX_DEBUG & VERBOSE_DRIVER) {
- fprintf(stderr, "fxQueryHardware()\n");
- }
-
- if (!glbGlideInitialized) {
- grGlideInit();
- glb3DfxPresent = FX_grSstQueryHardware(&glbHWConfig);
-
- glbGlideInitialized = 1;
-
-#if defined(__WIN32__)
- _onexit((_onexit_t) cleangraphics);
-#elif defined(__linux__)
- /* Only register handler if environment variable is not defined. */
- if (!getenv("MESA_FX_NO_SIGNALS")) {
- atexit(cleangraphics);
- }
-#endif
- }
-
- return glb3DfxPresent;
-}
-
-
-/*
* Shutdown Glide library
*/
void GLAPIENTRY