+++ /dev/null
-Debug
-*.plg
-*.BAK
-*.d
+++ /dev/null
-Debug
-Release
-*.d
-*.plg
-*.BAK
-*.mak
-*.ncb
-*.opt
+++ /dev/null
-version
-version.h
-version.new
-aboutmsg
-aboutmsg.h
-aboutmsg.new
-RADIANT_MAJOR
-RADIANT_MINOR
}
/// \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;
int m_fontHeight;
}
#if defined(_DEBUG)
-inline void GlobalOpenGL_debugAssertNoErrors()
-{
- GlobalOpenGL().assertNoErrors();
-}
+#define GlobalOpenGL_debugAssertNoErrors() GlobalOpenGL().assertNoErrors(__FILE__, __LINE__)
#else
-inline void GlobalOpenGL_debugAssertNoErrors()
-{
-}
+#define GlobalOpenGL_debugAssertNoErrors()
#endif
+++ /dev/null
-Debug\rRelease\r*.ncb\r*.opt\r*.plg\r*.001\r*.BAK\r
\ No newline at end of file
+++ /dev/null
-Debug
-Release
-*.ncb
-*.opt
-*.plg
-*.001
-*.BAK
-.consign
+++ /dev/null
-Debug
-Release
-*.plg
-*.BAK
-.consign
+++ /dev/null
-Debug
-Release
-*.d
-*.plg
-*.BAK
-*.mak
-*.ncb
-*.opt
+++ /dev/null
-*.d
-*.o
-*.so
-Debug
-Release
-TexTool___Win32_Q3Debug
-TexTool___Win32_Q3Release
-*.aps
-*.plg
-*.bak
-*.BAK
-*.opt
-*.ncb
\ No newline at end of file
+++ /dev/null
-*.d
-*.o
-*.so
-Debug
-Release
-*.aps
-*.plg
-*.bak
-*.BAK
-*.opt
-*.ncb
+++ /dev/null
-Debug
-Release
-radiant
-*.d
-*.o
-*.opt
-*.ncb
-*.BAK
-*.00*
-*.plg
-radiant
-q3map
-unnamed.map
-.snprj
-tools
-*.gcse
else
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);
}
else
{
globalOutputStream() << "No Anisotropic filtering available\n";
+ g_maxTextureAnisotropy = 0;
}
}
}
-void QGL_assertNoErrors()
+void QGL_assertNoErrors(const char *file, int line)
{
GLenum error = GlobalOpenGL().m_glGetError();
while (error != GL_NO_ERROR)
const char* errorString = reinterpret_cast<const char*>(qgluErrorString(error));
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
{
- ERROR_MESSAGE("OpenGL error: " << errorString);
+ ERROR_MESSAGE("OpenGL error at " << file << ":" << line << ": " << errorString);
}
error = GlobalOpenGL().m_glGetError();
}
free(symbol_names);
}
}
-#endif
-
-#if defined (WIN32) && defined (_MSC_VER) && defined (DEBUG)
+#elif defined (WIN32) && defined (_MSC_VER)
#include "windows.h"
#include "winnt.h"
__try{ RaiseException(0,0,0,0); } __except(write_stack_trace((GetExceptionInformation())->ContextRecord, outputStream), EXCEPTION_CONTINUE_EXECUTION) {}
}
+#elif defined (WIN32)
+void write_stack_trace(TextOutputStream& outputStream)
+{
+ outputStream << "\nStacktrace is disabled on this compiler\n";
+}
#else
-#if defined (WIN32)
void write_stack_trace(TextOutputStream& outputStream)
{
- outputStream << "\nStacktrace is disabled in release-builds\n";
+ outputStream << "\nStacktrace is disabled on this platform\n";
}
#endif
-#endif
void SetTexParameters(ETexturesMode mode)
{
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f);
+ float maxAniso = QGL_maxTextureAnisotropy();
+ if(maxAniso > 1)
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f);
+ else
+ if(mode == eTextures_MAX_ANISOTROPY)
+ mode = eTextures_LINEAR_MIPMAP_LINEAR;
switch (mode)
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
break;
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;
default:
globalOutputStream() << "invalid texture mode\n";
+++ /dev/null
-q3map
-*.d
-*.o
-*.bak
-*.BAK
-*~
-*.ncb
-*.plg
-*.opt
-*.log
-Debug
-Release
+++ /dev/null
-q3map
-*.d
-*.o
-*.bak
-*.BAK
-*~
-*.ncb
-*.plg
-*.opt
-*.log
-Debug
-Release