"9" - 512x512 textures
"10" - 1024x1024 textures
"11" - 2048x2048 textures
+MESA_GLX_FX
+ OS: win32, linux
+ HW: selective
+ Desc: force display mode
+ Note: (!) experimental!
+ Value:
+ "w" - windowed mode (linux: V1/2/Rush, win32: all except V1/V2)
+ "f" - fullscreen mode (linux: V1/V2/Rush)
+ "d" - disable glide driver (linux: V1/V2/Rush)
static HBITMAP dibHBM;
static HWND dibWnd;
+static int env_check (const char *var, int val)
+{
+ const char *env = getenv(var);
+ return (env && (env[0] == val));
+}
+
static LRESULT APIENTRY
__wglMonitor(HWND hwnd, UINT message, UINT wParam, LONG lParam)
{
SetWindowLong(hWnd, GWL_WNDPROC, (LONG) __wglMonitor);
}
- {
- char *env;
- /* always log when debugging, or if user demands */
- if (TDFX_DEBUG || ((env = getenv("MESA_FX_INFO")) && env[0] == 'r'))
+ /* always log when debugging, or if user demands */
+ if (TDFX_DEBUG || env_check("MESA_FX_INFO", 'r')) {
freopen("MESA.LOG", "w", stderr);
}
ShowWindow(hWnd, SW_SHOWNORMAL);
SetForegroundWindow(hWnd);
Sleep(100); /* a hack for win95 */
- if (0 && !(GetWindowLong (hWnd, GWL_STYLE) & WS_POPUP)) {
+ if (env_check("MESA_GLX_FX", 'w') && !(GetWindowLong (hWnd, GWL_STYLE) & WS_POPUP)) {
/* [dBorca] Hack alert: unfinished business! */
error = !(ctx = fxMesaCreateContext((GLuint) hWnd, GR_RESOLUTION_NONE, GR_REFRESH_NONE, pix[curPFD - 1].mesaAttr));
} else {
TNLcontext *tnl = TNL_CONTEXT(ctx);
DFN ( _tnl_x86_Vertex3fv, tnl->vtx.cache.Vertex[3-1], vertex_size );
- FIXUP(dfn->code, 0, 0, (int)&tnl->vtx.vbptr);
- FIXUP(dfn->code, 0, 1, vertex_size - 3);
- FIXUP(dfn->code, 0, 2, (int)&tnl->vtx.vertex[3]);
- FIXUP(dfn->code, 0, 0, (int)&tnl->vtx.vbptr);
- FIXUP(dfn->code, 0, 3, (int)&tnl->vtx.counter);
- FIXUP(dfn->code, 0, 3, (int)&tnl->vtx.counter);
- FIXUP(dfn->code, 0, 4, (int)ctx);
- FIXUPREL(dfn->code, 0, 5, (int)&_tnl_wrap_filled_vertex);
- return dfn;
+ switch (vertex_size) {
+ default: {
+ FIXUP(dfn->code, 0, 0, (int)&tnl->vtx.vbptr);
+ FIXUP(dfn->code, 0, 1, vertex_size - 3);
+ FIXUP(dfn->code, 0, 2, (int)&tnl->vtx.vertex[3]);
+ FIXUP(dfn->code, 0, 0, (int)&tnl->vtx.vbptr);
+ FIXUP(dfn->code, 0, 3, (int)&tnl->vtx.counter);
+ FIXUP(dfn->code, 0, 3, (int)&tnl->vtx.counter);
+ FIXUP(dfn->code, 0, 4, (int)ctx);
+ FIXUPREL(dfn->code, 0, 5, (int)&_tnl_wrap_filled_vertex);
+ return dfn;
+ }
+ }
}
static struct _tnl_dynfn *makeX86Vertex4fv( GLcontext *ctx, int vertex_size )