]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
fix OpenGL erorr bug on XP software renderer; use svn:ignore
authorrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Thu, 18 Sep 2008 06:57:13 +0000 (06:57 +0000)
committerrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Thu, 18 Sep 2008 06:57:13 +0000 (06:57 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@85 61c419a2-8eb2-4b30-bcec-8cead039b335

19 files changed:
contrib/gtkgensurf/.cvsignore [deleted file]
contrib/prtview/.cvsignore [deleted file]
include/.cvsignore [deleted file]
include/igl.h
libs/.cvsignore [deleted file]
libs/cmdlib/.cvsignore [deleted file]
libs/jpeg6/.cvsignore [deleted file]
libs/l_net/.cvsignore [deleted file]
libs/splines/.cvsignore [deleted file]
plugins/image/.cvsignore [deleted file]
plugins/textool/.cvsignore [deleted file]
plugins/vfspk3/.cvsignore [deleted file]
radiant/.cvsignore [deleted file]
radiant/main.cpp
radiant/qgl.cpp
radiant/stacktrace.cpp
radiant/textures.cpp
tools/quake3/q3data/.cvsignore [deleted file]
tools/quake3/q3map2/.cvsignore [deleted file]

diff --git a/contrib/gtkgensurf/.cvsignore b/contrib/gtkgensurf/.cvsignore
deleted file mode 100644 (file)
index 7320b21..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Debug
-*.plg
-*.BAK
-*.d
diff --git a/contrib/prtview/.cvsignore b/contrib/prtview/.cvsignore
deleted file mode 100644 (file)
index 66d25b1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Debug
-Release
-*.d
-*.plg
-*.BAK
-*.mak
-*.ncb
-*.opt
diff --git a/include/.cvsignore b/include/.cvsignore
deleted file mode 100644 (file)
index 3659408..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-version
-version.h
-version.new
-aboutmsg
-aboutmsg.h
-aboutmsg.new
-RADIANT_MAJOR
-RADIANT_MINOR
index 8cd81f8664c44db723a66dfda9615000a494f615..29bf5f802805a1eef0758a55ac269b3fe5d93faf 100644 (file)
@@ -1995,7 +1995,7 @@ struct OpenGLBinding
   }
 
   /// \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;
@@ -2818,14 +2818,9 @@ inline OpenGLBinding& GlobalOpenGL()
 }
 
 #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
 
 
diff --git a/libs/.cvsignore b/libs/.cvsignore
deleted file mode 100644 (file)
index 62555de..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.consign
diff --git a/libs/cmdlib/.cvsignore b/libs/cmdlib/.cvsignore
deleted file mode 100644 (file)
index b5ee5ae..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Debug\rRelease\r*.ncb\r*.opt\r*.plg\r*.001\r*.BAK\r
\ No newline at end of file
diff --git a/libs/jpeg6/.cvsignore b/libs/jpeg6/.cvsignore
deleted file mode 100644 (file)
index face6ad..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Debug
-Release
-*.ncb
-*.opt
-*.plg
-*.001
-*.BAK
-.consign
diff --git a/libs/l_net/.cvsignore b/libs/l_net/.cvsignore
deleted file mode 100644 (file)
index 877bc8c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Debug
-Release
-*.plg
-*.BAK
-.consign
diff --git a/libs/splines/.cvsignore b/libs/splines/.cvsignore
deleted file mode 100644 (file)
index 62555de..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.consign
diff --git a/plugins/image/.cvsignore b/plugins/image/.cvsignore
deleted file mode 100644 (file)
index 66d25b1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Debug
-Release
-*.d
-*.plg
-*.BAK
-*.mak
-*.ncb
-*.opt
diff --git a/plugins/textool/.cvsignore b/plugins/textool/.cvsignore
deleted file mode 100644 (file)
index 5d257e7..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-*.d
-*.o
-*.so
-Debug
-Release
-TexTool___Win32_Q3Debug
-TexTool___Win32_Q3Release
-*.aps
-*.plg
-*.bak
-*.BAK
-*.opt
-*.ncb
\ No newline at end of file
diff --git a/plugins/vfspk3/.cvsignore b/plugins/vfspk3/.cvsignore
deleted file mode 100644 (file)
index af3ce37..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-*.d
-*.o
-*.so
-Debug
-Release
-*.aps
-*.plg
-*.bak
-*.BAK
-*.opt
-*.ncb
diff --git a/radiant/.cvsignore b/radiant/.cvsignore
deleted file mode 100644 (file)
index 72b49b5..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Debug
-Release
-radiant
-*.d
-*.o
-*.opt
-*.ncb
-*.BAK
-*.00*
-*.plg
-radiant
-q3map
-unnamed.map
-.snprj
-tools
-*.gcse
index a1e39bad6833d61b74e83b43d745e3d612fb4655..ad3d4314b9217ad3a190968bad7f065950422603 100644 (file)
@@ -181,8 +181,13 @@ void error_redirect (const gchar *domain, GLogLevelFlags log_level, const gchar
   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);
 }
 
index 18fe053260e8d9b25312ac4fdba7634b75d1ceca..ae55e9ff956d0a2e2ee531ef358cf6578b9a574e 100644 (file)
@@ -1599,6 +1599,7 @@ void QGL_sharedContextCreated(OpenGLBinding& table)
   else
   {
     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();
   while (error != GL_NO_ERROR)
@@ -1616,11 +1617,11 @@ void QGL_assertNoErrors()
     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();
   }
index 7c75db423597a7afd6b90dc64cc5169264ae9d86..18a70462f3164cdc5dbbd94fcf2181cbf3182633 100644 (file)
@@ -49,9 +49,7 @@ void write_stack_trace(TextOutputStream& outputStream)
      free(symbol_names);
   }
 }      
-#endif
-
-#if defined (WIN32) && defined (_MSC_VER) && defined (DEBUG)
+#elif defined (WIN32) && defined (_MSC_VER)
 
 #include "windows.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) {}
 }
 
+#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
index 76a79704679d380a37b190da3724af4e66798be1..ff7d27db39fdcd73f787bbb794fb35e066a7b9cc 100644 (file)
@@ -91,7 +91,12 @@ texture_globals_t g_texture_globals(GL_RGBA);
 
 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)
   {
@@ -120,7 +125,7 @@ void SetTexParameters(ETexturesMode 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";
diff --git a/tools/quake3/q3data/.cvsignore b/tools/quake3/q3data/.cvsignore
deleted file mode 100644 (file)
index e70c49e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-q3map
-*.d
-*.o
-*.bak
-*.BAK
-*~
-*.ncb
-*.plg
-*.opt
-*.log
-Debug
-Release
diff --git a/tools/quake3/q3map2/.cvsignore b/tools/quake3/q3map2/.cvsignore
deleted file mode 100644 (file)
index e70c49e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-q3map
-*.d
-*.o
-*.bak
-*.BAK
-*~
-*.ncb
-*.plg
-*.opt
-*.log
-Debug
-Release