From bc95321687662f0be337a9b01c128bcec302e40d Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 1 Sep 2004 00:08:39 +0000 Subject: [PATCH] fix for alternate viewports. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@102 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gltod3d/gl_fakegl.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/engine/gl/gltod3d/gl_fakegl.cpp b/engine/gl/gltod3d/gl_fakegl.cpp index 7ef61f383..5cc36bba3 100644 --- a/engine/gl/gltod3d/gl_fakegl.cpp +++ b/engine/gl/gltod3d/gl_fakegl.cpp @@ -24,12 +24,11 @@ This would probably be faster if it wasn't written in cpp. the fact that it uses wrapper functions to call methods in a class could be a reasonable hit in speed. */ +#include "bothdefs.h" //our always-present config file + #ifdef AVAIL_DX7 -//#define BUGGYMULTITEXTURE //FIXME: we get wierd effects. LM texture coords appear to be set to Normal Texture - - #define WIN32_LEAN_AND_MEAN #include @@ -1444,8 +1443,9 @@ private: { char errStr[100]; qD3DXGetErrorString(hr, 100, errStr ); - MessageBox(NULL,errStr,"D3DX Error",MB_OK); - LocalDebugBreak(); + Con_Printf("%s\n", errStr); +// MessageBox(NULL,errStr,"D3DX Error",MB_OK); +// LocalDebugBreak(); } #ifdef USE_D3DFRAME @@ -1734,10 +1734,6 @@ public: // than we need. int maxStages = deviceCaps.wMaxTextureBlendStages; -#ifdef BUGGYMULTITEXTURE - maxStages=1; -#endif - if ( maxStages > 2 ){ maxStages = 2; } @@ -1779,11 +1775,13 @@ public: void glBegin (GLenum mode){ if ( m_needBeginScene ){ - m_needBeginScene = false; HRESULT hr = m_pD3DDev->BeginScene(); if ( FAILED(hr) ) { InterpretError(hr); + return; } + else + m_needBeginScene = false; } #if 0