freopen("MESA.LOG", "w", stderr);
}
+ if (((env = getenv("FX_GLIDE_REFRESH")) == NULL) || !atoi(env)) {
+ /* FX_GLIDE_REFRESH=0 has a special meaning for DJGPP Glide3x
+ * (switch via VESA, using default refresh) and we'll not override that.
+ */
+ char tmp[256];
+ sprintf(tmp, "FX_GLIDE_REFRESH=%u", refresh);
+ putenv(tmp);
+ }
+
return (DMesaVisual)fxMesaCreateBestContext(-1, width, height, fx_attrib);
#endif /* FX */
}
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 },
#include "image.h"
#include "teximage.h"
#include "texformat.h"
+#include "texobj.h"
#include "texstore.h"
#include "texutil.h"
FREE(ti);
tObj->DriverData = NULL;
+
+ /* Free mipmap images and the texture object itself */
+ _mesa_delete_texture_object(ctx, 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
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;