1
0
Fork 0
forked from fte/fteqw

fix for alternate viewports.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@102 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-09-01 00:08:39 +00:00
parent 44f6b09d17
commit bc95321687

View file

@ -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. 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 #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 #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
@ -1444,8 +1443,9 @@ private:
{ {
char errStr[100]; char errStr[100];
qD3DXGetErrorString(hr, 100, errStr ); qD3DXGetErrorString(hr, 100, errStr );
MessageBox(NULL,errStr,"D3DX Error",MB_OK); Con_Printf("%s\n", errStr);
LocalDebugBreak(); // MessageBox(NULL,errStr,"D3DX Error",MB_OK);
// LocalDebugBreak();
} }
#ifdef USE_D3DFRAME #ifdef USE_D3DFRAME
@ -1734,10 +1734,6 @@ public:
// than we need. // than we need.
int maxStages = deviceCaps.wMaxTextureBlendStages; int maxStages = deviceCaps.wMaxTextureBlendStages;
#ifdef BUGGYMULTITEXTURE
maxStages=1;
#endif
if ( maxStages > 2 ){ if ( maxStages > 2 ){
maxStages = 2; maxStages = 2;
} }
@ -1779,11 +1775,13 @@ public:
void glBegin (GLenum mode){ void glBegin (GLenum mode){
if ( m_needBeginScene ){ if ( m_needBeginScene ){
m_needBeginScene = false;
HRESULT hr = m_pD3DDev->BeginScene(); HRESULT hr = m_pD3DDev->BeginScene();
if ( FAILED(hr) ) { if ( FAILED(hr) ) {
InterpretError(hr); InterpretError(hr);
return;
} }
else
m_needBeginScene = false;
} }
#if 0 #if 0