diff options
author | Daniel Borca <[email protected]> | 2004-06-19 11:07:58 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2004-06-19 11:07:58 +0000 |
commit | f0f23aaba820d64d57b60e8bc113d15038e9f1b5 (patch) | |
tree | ef713dd9d980f637343159579d9e0ea74e8389e2 /src | |
parent | 1e93e197f962a3133eba08c91aa39874ee4cbaba (diff) |
Hack for linear fogging. Added empty routines for WGL_ARB_pixel_format WGL_ARB_render_texture WGL_ARB_pbuffer
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/glide/fx.rc | 4 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxapi.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxdd.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxsetup.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxwgl.c | 135 |
5 files changed, 139 insertions, 16 deletions
diff --git a/src/mesa/drivers/glide/fx.rc b/src/mesa/drivers/glide/fx.rc index 8c6dedff375..ebc80f0486f 100644 --- a/src/mesa/drivers/glide/fx.rc +++ b/src/mesa/drivers/glide/fx.rc @@ -5,10 +5,10 @@ #define HWSTR "3dfx Voodoo Graphics, Voodoo^2, Voodoo Banshee, Velocity 100/200, Voodoo3, Voodoo4, Voodoo5" #define COPYRIGHTSTR "Copyright \251 Brian E. Paul" -#define VERSIONSTR "6.1.0.5" +#define VERSIONSTR "6.1.0.8" #define MANVERSION 6 #define MANREVISION 1 -#define BUILD_NUMBER 5 +#define BUILD_NUMBER 8 VS_VERSION_INFO VERSIONINFO FILEVERSION MANVERSION, MANREVISION, 0, BUILD_NUMBER diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c index 016d968be05..0dccdc2093b 100644 --- a/src/mesa/drivers/glide/fxapi.c +++ b/src/mesa/drivers/glide/fxapi.c @@ -644,9 +644,8 @@ fxMesaCreateContext(GLuint win, fxMesa->snapVertices ? "" : "no "); } - sprintf(fxMesa->rendererString, "Mesa %s v0.61 %s%s%s", + sprintf(fxMesa->rendererString, "Mesa %s v0.61 %s%s", grGetString(GR_RENDERER), - getenv("MESA_3DFX_STRING") ? "3dfx " : "", grGetString(GR_HARDWARE), ((fxMesa->type < GR_SSTTYPE_Voodoo4) && (voodoo->numChips > 1)) ? " SLI" : ""); diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 7d4c1681941..8315096a0bf 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1505,15 +1505,12 @@ fxDDInitExtensions(GLcontext * ctx) /* core-level extensions */ _mesa_enable_extension(ctx, "GL_EXT_multi_draw_arrays"); _mesa_enable_extension(ctx, "GL_IBM_multimode_draw_arrays"); + _mesa_enable_extension(ctx, "GL_ARB_vertex_buffer_object"); #if 0 /* not until texel fetchers are right */ _mesa_enable_extension(ctx, "GL_SGIS_generate_mipmap"); #endif #if 0 - /* breaks UT2004 */ - _mesa_enable_extension(ctx, "GL_ARB_vertex_buffer_object"); -#endif -#if 0 /* not just yet */ _mesa_enable_extension(ctx, "GL_ARB_fragment_program"); _mesa_enable_extension(ctx, "GL_ARB_vertex_program"); diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c index 6ebdb717d0b..abef71a35e3 100644 --- a/src/mesa/drivers/glide/fxsetup.c +++ b/src/mesa/drivers/glide/fxsetup.c @@ -1802,6 +1802,14 @@ fxSetupFog(GLcontext * ctx) case GL_LINEAR: guFogGenerateLinear(fxMesa->fogTable, ctx->Fog.Start, ctx->Fog.End); + if (fxMesa->fogTable[0] > 63) { + /* [dBorca] Hack alert: + * As per Glide3 Programming Guide: + * The difference between consecutive fog values + * must be less than 64. + */ + fxMesa->fogTable[0] = 63; + } break; case GL_EXP: guFogGenerateExp(fxMesa->fogTable, ctx->Fog.Density); diff --git a/src/mesa/drivers/glide/fxwgl.c b/src/mesa/drivers/glide/fxwgl.c index 0b0197d3ecc..9f032e90949 100644 --- a/src/mesa/drivers/glide/fxwgl.c +++ b/src/mesa/drivers/glide/fxwgl.c @@ -477,12 +477,117 @@ wglSetDeviceGammaRamp3DFX (HDC hdc, LPVOID arrays) return TRUE; } +typedef void *HPBUFFERARB; + +/* WGL_ARB_pixel_format */ +GLAPI BOOL GLAPIENTRY +wglGetPixelFormatAttribivARB (HDC hdc, + int iPixelFormat, + int iLayerPlane, + UINT nAttributes, + const int *piAttributes, + int *piValues) +{ + SetLastError(0); + return(FALSE); +} + +GLAPI BOOL GLAPIENTRY +wglGetPixelFormatAttribfvARB (HDC hdc, + int iPixelFormat, + int iLayerPlane, + UINT nAttributes, + const int *piAttributes, + FLOAT *pfValues) +{ + SetLastError(0); + return(FALSE); +} + +GLAPI BOOL GLAPIENTRY +wglChoosePixelFormatARB (HDC hdc, + const int *piAttribIList, + const FLOAT *pfAttribFList, + UINT nMaxFormats, + int *piFormats, + UINT *nNumFormats) +{ + SetLastError(0); + return(FALSE); +} + +/* WGL_ARB_render_texture */ +GLAPI BOOL GLAPIENTRY +wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer) +{ + SetLastError(0); + return(FALSE); +} + +GLAPI BOOL GLAPIENTRY +wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer) +{ + SetLastError(0); + return(FALSE); +} + +GLAPI BOOL GLAPIENTRY +wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, + const int *piAttribList) +{ + SetLastError(0); + return(FALSE); +} + +/* WGL_ARB_pbuffer */ +GLAPI HPBUFFERARB GLAPIENTRY +wglCreatePbufferARB (HDC hDC, + int iPixelFormat, + int iWidth, + int iHeight, + const int *piAttribList) +{ + SetLastError(0); + return NULL; +} + +GLAPI HDC GLAPIENTRY +wglGetPbufferDCARB (HPBUFFERARB hPbuffer) +{ + SetLastError(0); + return NULL; +} + +GLAPI int GLAPIENTRY +wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC) +{ + SetLastError(0); + return -1; +} + +GLAPI BOOL GLAPIENTRY +wglDestroyPbufferARB (HPBUFFERARB hPbuffer) +{ + SetLastError(0); + return(FALSE); +} + +GLAPI BOOL GLAPIENTRY +wglQueryPbufferARB (HPBUFFERARB hPbuffer, + int iAttribute, + int *piValue) +{ + SetLastError(0); + return(FALSE); +} + GLAPI const char * GLAPIENTRY wglGetExtensionsStringEXT (void) { return "WGL_3DFX_gamma_control " "WGL_EXT_swap_control " - "WGL_EXT_extensions_string WGL_ARB_extensions_string"; + "WGL_EXT_extensions_string WGL_ARB_extensions_string" + /*WGL_ARB_pixel_format WGL_ARB_render_texture WGL_ARB_pbuffer*/; } GLAPI const char * GLAPIENTRY @@ -495,12 +600,26 @@ static struct { const char *name; PROC func; } wgl_ext[] = { - {"wglGetExtensionsStringARB", wglGetExtensionsStringARB}, - {"wglGetExtensionsStringEXT", wglGetExtensionsStringEXT}, - {"wglSwapIntervalEXT", wglSwapIntervalEXT}, - {"wglGetSwapIntervalEXT", wglGetSwapIntervalEXT}, - {"wglGetDeviceGammaRamp3DFX", wglGetDeviceGammaRamp3DFX}, - {"wglSetDeviceGammaRamp3DFX", wglSetDeviceGammaRamp3DFX}, + {"wglGetExtensionsStringARB", wglGetExtensionsStringARB}, + {"wglGetExtensionsStringEXT", wglGetExtensionsStringEXT}, + {"wglSwapIntervalEXT", wglSwapIntervalEXT}, + {"wglGetSwapIntervalEXT", wglGetSwapIntervalEXT}, + {"wglGetDeviceGammaRamp3DFX", wglGetDeviceGammaRamp3DFX}, + {"wglSetDeviceGammaRamp3DFX", wglSetDeviceGammaRamp3DFX}, + /* WGL_ARB_pixel_format */ + {"wglGetPixelFormatAttribivARB", wglGetPixelFormatAttribivARB}, + {"wglGetPixelFormatAttribfvARB", wglGetPixelFormatAttribfvARB}, + {"wglChoosePixelFormatARB", wglChoosePixelFormatARB}, + /* WGL_ARB_render_texture */ + {"wglBindTexImageARB", wglBindTexImageARB}, + {"wglReleaseTexImageARB", wglReleaseTexImageARB}, + {"wglSetPbufferAttribARB", wglSetPbufferAttribARB}, + /* WGL_ARB_pbuffer */ + {"wglCreatePbufferARB", wglCreatePbufferARB}, + {"wglGetPbufferDCARB", wglGetPbufferDCARB}, + {"wglReleasePbufferDCARB", wglReleasePbufferDCARB}, + {"wglDestroyPbufferARB", wglDestroyPbufferARB}, + {"wglQueryPbufferARB", wglQueryPbufferARB}, {NULL, NULL} }; @@ -510,7 +629,7 @@ wglGetProcAddress(LPCSTR lpszProc) int i; PROC p = (PROC) _glapi_get_proc_address((const char *) lpszProc); - /* [dBorca] we can't do BlendColor... yet */ + /* [dBorca] we can't do BlendColor */ if (p && strcmp(lpszProc, "glBlendColor") && strcmp(lpszProc, "glBlendColorEXT")) return p; |