fix OpenGL erorr bug on XP software renderer; use svn:ignore
git-svn-id: svn://svn.icculus.org/netradiant/trunk@85 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
parent
2978848a28
commit
3c8d97704b
|
|
@ -1,4 +0,0 @@
|
||||||
Debug
|
|
||||||
*.plg
|
|
||||||
*.BAK
|
|
||||||
*.d
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
*.d
|
|
||||||
*.plg
|
|
||||||
*.BAK
|
|
||||||
*.mak
|
|
||||||
*.ncb
|
|
||||||
*.opt
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
version
|
|
||||||
version.h
|
|
||||||
version.new
|
|
||||||
aboutmsg
|
|
||||||
aboutmsg.h
|
|
||||||
aboutmsg.new
|
|
||||||
RADIANT_MAJOR
|
|
||||||
RADIANT_MINOR
|
|
||||||
|
|
@ -1995,7 +1995,7 @@ struct OpenGLBinding
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Asserts that there no OpenGL errors have occurred since the last call to glGetError.
|
/// \brief Asserts that there no OpenGL errors have occurred since the last call to glGetError.
|
||||||
void (*assertNoErrors)();
|
void (*assertNoErrors)(const char *file, int line);
|
||||||
|
|
||||||
GLuint m_font;
|
GLuint m_font;
|
||||||
int m_fontHeight;
|
int m_fontHeight;
|
||||||
|
|
@ -2818,14 +2818,9 @@ inline OpenGLBinding& GlobalOpenGL()
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
inline void GlobalOpenGL_debugAssertNoErrors()
|
#define GlobalOpenGL_debugAssertNoErrors() GlobalOpenGL().assertNoErrors(__FILE__, __LINE__)
|
||||||
{
|
|
||||||
GlobalOpenGL().assertNoErrors();
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
inline void GlobalOpenGL_debugAssertNoErrors()
|
#define GlobalOpenGL_debugAssertNoErrors()
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
.consign
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Debug
Release
*.ncb
*.opt
*.plg
*.001
*.BAK
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
*.ncb
|
|
||||||
*.opt
|
|
||||||
*.plg
|
|
||||||
*.001
|
|
||||||
*.BAK
|
|
||||||
.consign
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
*.plg
|
|
||||||
*.BAK
|
|
||||||
.consign
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
.consign
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
*.d
|
|
||||||
*.plg
|
|
||||||
*.BAK
|
|
||||||
*.mak
|
|
||||||
*.ncb
|
|
||||||
*.opt
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
*.d
|
|
||||||
*.o
|
|
||||||
*.so
|
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
TexTool___Win32_Q3Debug
|
|
||||||
TexTool___Win32_Q3Release
|
|
||||||
*.aps
|
|
||||||
*.plg
|
|
||||||
*.bak
|
|
||||||
*.BAK
|
|
||||||
*.opt
|
|
||||||
*.ncb
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
*.d
|
|
||||||
*.o
|
|
||||||
*.so
|
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
*.aps
|
|
||||||
*.plg
|
|
||||||
*.bak
|
|
||||||
*.BAK
|
|
||||||
*.opt
|
|
||||||
*.ncb
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
radiant
|
|
||||||
*.d
|
|
||||||
*.o
|
|
||||||
*.opt
|
|
||||||
*.ncb
|
|
||||||
*.BAK
|
|
||||||
*.00*
|
|
||||||
*.plg
|
|
||||||
radiant
|
|
||||||
q3map
|
|
||||||
unnamed.map
|
|
||||||
.snprj
|
|
||||||
tools
|
|
||||||
*.gcse
|
|
||||||
|
|
@ -181,8 +181,13 @@ void error_redirect (const gchar *domain, GLogLevelFlags log_level, const gchar
|
||||||
else
|
else
|
||||||
strcat (buf, "\n");
|
strcat (buf, "\n");
|
||||||
|
|
||||||
printf ("%s\n", buf);
|
// spam it...
|
||||||
|
globalErrorStream() << buf << "\n";
|
||||||
|
|
||||||
|
// FIXME why are warnings is_fatal?
|
||||||
|
#ifndef _DEBUG
|
||||||
|
if(is_fatal)
|
||||||
|
#endif
|
||||||
ERROR_MESSAGE("GTK+ error: " << buf);
|
ERROR_MESSAGE("GTK+ error: " << buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1599,6 +1599,7 @@ void QGL_sharedContextCreated(OpenGLBinding& table)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
globalOutputStream() << "No Anisotropic filtering available\n";
|
globalOutputStream() << "No Anisotropic filtering available\n";
|
||||||
|
g_maxTextureAnisotropy = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1608,7 +1609,7 @@ void QGL_sharedContextDestroyed(OpenGLBinding& table)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QGL_assertNoErrors()
|
void QGL_assertNoErrors(const char *file, int line)
|
||||||
{
|
{
|
||||||
GLenum error = GlobalOpenGL().m_glGetError();
|
GLenum error = GlobalOpenGL().m_glGetError();
|
||||||
while (error != GL_NO_ERROR)
|
while (error != GL_NO_ERROR)
|
||||||
|
|
@ -1616,11 +1617,11 @@ void QGL_assertNoErrors()
|
||||||
const char* errorString = reinterpret_cast<const char*>(qgluErrorString(error));
|
const char* errorString = reinterpret_cast<const char*>(qgluErrorString(error));
|
||||||
if (error == GL_OUT_OF_MEMORY)
|
if (error == GL_OUT_OF_MEMORY)
|
||||||
{
|
{
|
||||||
ERROR_MESSAGE("OpenGL out of memory error: " << errorString);
|
ERROR_MESSAGE("OpenGL out of memory error at " << file << ":" << line << ": " << errorString);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ERROR_MESSAGE("OpenGL error: " << errorString);
|
ERROR_MESSAGE("OpenGL error at " << file << ":" << line << ": " << errorString);
|
||||||
}
|
}
|
||||||
error = GlobalOpenGL().m_glGetError();
|
error = GlobalOpenGL().m_glGetError();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,7 @@ void write_stack_trace(TextOutputStream& outputStream)
|
||||||
free(symbol_names);
|
free(symbol_names);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#elif defined (WIN32) && defined (_MSC_VER)
|
||||||
|
|
||||||
#if defined (WIN32) && defined (_MSC_VER) && defined (DEBUG)
|
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "winnt.h"
|
#include "winnt.h"
|
||||||
|
|
@ -308,11 +306,14 @@ void write_stack_trace(TextOutputStream& outputStream)
|
||||||
__try{ RaiseException(0,0,0,0); } __except(write_stack_trace((GetExceptionInformation())->ContextRecord, outputStream), EXCEPTION_CONTINUE_EXECUTION) {}
|
__try{ RaiseException(0,0,0,0); } __except(write_stack_trace((GetExceptionInformation())->ContextRecord, outputStream), EXCEPTION_CONTINUE_EXECUTION) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#elif defined (WIN32)
|
||||||
#if defined (WIN32)
|
|
||||||
void write_stack_trace(TextOutputStream& outputStream)
|
void write_stack_trace(TextOutputStream& outputStream)
|
||||||
{
|
{
|
||||||
outputStream << "\nStacktrace is disabled in release-builds\n";
|
outputStream << "\nStacktrace is disabled on this compiler\n";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void write_stack_trace(TextOutputStream& outputStream)
|
||||||
|
{
|
||||||
|
outputStream << "\nStacktrace is disabled on this platform\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,12 @@ texture_globals_t g_texture_globals(GL_RGBA);
|
||||||
|
|
||||||
void SetTexParameters(ETexturesMode mode)
|
void SetTexParameters(ETexturesMode mode)
|
||||||
{
|
{
|
||||||
|
float maxAniso = QGL_maxTextureAnisotropy();
|
||||||
|
if(maxAniso > 1)
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f);
|
||||||
|
else
|
||||||
|
if(mode == eTextures_MAX_ANISOTROPY)
|
||||||
|
mode = eTextures_LINEAR_MIPMAP_LINEAR;
|
||||||
|
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
|
|
@ -120,7 +125,7 @@ void SetTexParameters(ETexturesMode mode)
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||||
break;
|
break;
|
||||||
case eTextures_MAX_ANISOTROPY:
|
case eTextures_MAX_ANISOTROPY:
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, QGL_maxTextureAnisotropy());
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, maxAniso);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
globalOutputStream() << "invalid texture mode\n";
|
globalOutputStream() << "invalid texture mode\n";
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
q3map
|
|
||||||
*.d
|
|
||||||
*.o
|
|
||||||
*.bak
|
|
||||||
*.BAK
|
|
||||||
*~
|
|
||||||
*.ncb
|
|
||||||
*.plg
|
|
||||||
*.opt
|
|
||||||
*.log
|
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
q3map
|
|
||||||
*.d
|
|
||||||
*.o
|
|
||||||
*.bak
|
|
||||||
*.BAK
|
|
||||||
*~
|
|
||||||
*.ncb
|
|
||||||
*.plg
|
|
||||||
*.opt
|
|
||||||
*.log
|
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
Loading…
Reference in New Issue
Block a user