summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2004-01-15 07:16:06 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2004-01-15 07:16:06 +0000
commit4d5e6623d36183b9c0380aa5da8fa37a979ce441 (patch)
tree2347e89e095ee766e5d9fc6c3efe9d46a4d85226 /src/mesa/drivers/glide
parent3663c0f82527d972a7e5b85937d8da60253eb6f3 (diff)
_mesa_delete_texture_object and some other updates
Diffstat (limited to 'src/mesa/drivers/glide')
-rw-r--r--src/mesa/drivers/glide/fxapi.c2
-rw-r--r--src/mesa/drivers/glide/fxddtex.c4
-rw-r--r--src/mesa/drivers/glide/fxsetup.c2
-rw-r--r--src/mesa/drivers/glide/fxwgl.c14
4 files changed, 12 insertions, 10 deletions
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index c1dea541e2..6ed9453c9b 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -203,8 +203,10 @@ gl3DfxSetPaletteEXT(GLuint * pal)
static GrScreenResolution_t fxBestResolution (int width, int height)
{
static int resolutions[][5] = {
+#if 1 /* Voodoo^2 can't fullscreen these, because of Glide */
{ 320, 200, GR_RESOLUTION_320x200 },
{ 320, 240, GR_RESOLUTION_320x240 },
+#endif
{ 512, 384, GR_RESOLUTION_512x384 },
{ 640, 400, GR_RESOLUTION_640x400 },
{ 640, 480, GR_RESOLUTION_640x480 },
diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c
index 629f0e311e..eaca8401b8 100644
--- a/src/mesa/drivers/glide/fxddtex.c
+++ b/src/mesa/drivers/glide/fxddtex.c
@@ -43,6 +43,7 @@
#include "image.h"
#include "teximage.h"
#include "texformat.h"
+#include "texobj.h"
#include "texstore.h"
#include "texutil.h"
@@ -365,6 +366,9 @@ fxDDTexDel(GLcontext * ctx, struct gl_texture_object *tObj)
FREE(ti);
tObj->DriverData = NULL;
+
+ /* Free mipmap images and the texture object itself */
+ _mesa_delete_texture_object(ctx, tObj);
}
/*
diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c
index 61ceb6e7ac..17a4129eb6 100644
--- a/src/mesa/drivers/glide/fxsetup.c
+++ b/src/mesa/drivers/glide/fxsetup.c
@@ -80,7 +80,7 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj)
* than hardware can support. Two cases:
* 1) we have mipmaps. Then we just push up to the first supported
* LOD. A possible drawback is that Mesa will ignore the skipped
- * LODs on further texture handling (including memory freeing).
+ * LODs on further texture handling.
* Will this interfere with GL_TEXTURE_[MIN|BASE]_LEVEL? How?
* 2) we don't have mipmaps. We need to rescale texture; two ways:
* a) create a new LOD and push up ti->minLevel and tObj->BaseLevel
diff --git a/src/mesa/drivers/glide/fxwgl.c b/src/mesa/drivers/glide/fxwgl.c
index 7b323dd617..adf88a485c 100644
--- a/src/mesa/drivers/glide/fxwgl.c
+++ b/src/mesa/drivers/glide/fxwgl.c
@@ -324,18 +324,14 @@ wglCreateContext(HDC hdc)
SetWindowLong(hWnd, GWL_WNDPROC, (LONG) __wglMonitor);
}
-#if FX_DEBUG
- /* always log when debugging */
- freopen("MESA.LOG", "w", stderr);
-#else
- /* log only if user wants */
{
- char *env = getenv("MESA_FX_INFO");
- if (env && env[0] == 'r') {
+ char *env;
+ /* always log when debugging, or if user demands */
+#if !FX_DEBUG
+ if ((env = getenv("MESA_FX_INFO")) && env[0] == 'r')
+#endif
freopen("MESA.LOG", "w", stderr);
- }
}
-#endif
{
RECT cliRect;