From: namespace <namespace@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Date: Wed, 25 Apr 2007 18:54:37 +0000 (+0000)
Subject: - Fixed texcompression being disabled after each restart
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3b6edbcad003ea989209fdb758278e1f1d266ea8;p=xonotic%2Fnetradiant.git

- Fixed texcompression being disabled after each restart

git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@163 8a3a26a2-13c4-0310-b231-cf6edde360e5
---

diff --git a/CHANGES b/CHANGES
index 0e205b72..638b1d44 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
 This is the changelog for developers, != changelog for the end user 
 that we distribute with the binaries. (see changelog)
 
+25/04/2007
+- Fixed texcompression beeing disabled after each restart
+- Fixed gtk-searchpopup in treeviews
+
 15/03/2007
 namespace
 - Fixed brushexport2 output float-format (Shaderman)
diff --git a/radiant/GtkRadiant.vcproj b/radiant/GtkRadiant.vcproj
index 42ec7ee2..366a4187 100644
--- a/radiant/GtkRadiant.vcproj
+++ b/radiant/GtkRadiant.vcproj
@@ -54,7 +54,7 @@
 				BrowseInformation="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
+				DebugInformationFormat="4"
 				DisableSpecificWarnings="4610;4510;4512;4505;4100;4127;4996"
 			/>
 			<Tool
diff --git a/radiant/textures.cpp b/radiant/textures.cpp
index ec5c4f59..cb445e4e 100644
--- a/radiant/textures.cpp
+++ b/radiant/textures.cpp
@@ -534,7 +534,6 @@ TexturesCache& GetTexturesCache()
 
 void Textures_Realise()
 {
-  SetTexParameters(g_texture_mode);
   g_texturesmap->realise();
 }
 
@@ -564,7 +563,6 @@ void Textures_ModeChanged()
     }
 
     glBindTexture( GL_TEXTURE_2D, 0 );
-    //qglFinish();
   }
   g_texturesModeChangedNotify();
 }
@@ -593,55 +591,62 @@ void Textures_UpdateTextureCompressionFormat()
 {
   GLint texture_components = GL_RGBA;
 
-  if (g_texture_globals.bTextureCompressionSupported)
-  {
-    if(g_texture_globals.m_nTextureCompressionFormat != TEXTURECOMPRESSION_NONE
-      && g_texture_globals.m_nTextureCompressionFormat != TEXTURECOMPRESSION_RGBA
-      && !g_texture_globals.m_bS3CompressionSupported)
-    {
-      globalOutputStream() << "OpenGL extension GL_EXT_texture_compression_s3tc not supported by current graphics drivers\n";
-      g_texture_globals.m_nTextureCompressionFormat = TEXTURECOMPRESSION_RGBA; // if this is not supported either, see below
-    }
-    if (g_texture_globals.m_nTextureCompressionFormat == TEXTURECOMPRESSION_RGBA && !g_texture_globals.m_bOpenGLCompressionSupported)
-    {
-      globalOutputStream() << "OpenGL extension GL_ARB_texture_compression not supported by current graphics drivers\n";
-      g_texture_globals.m_nTextureCompressionFormat = TEXTURECOMPRESSION_NONE;
-    }
-
-    switch (g_texture_globals.m_nTextureCompressionFormat)
-    {
-    case (TEXTURECOMPRESSION_NONE):
-      {
-        texture_components = GL_RGBA;
-        break;
-      }
-    case (TEXTURECOMPRESSION_RGBA):
-      {
-        texture_components = GL_COMPRESSED_RGBA_ARB;
-        break;
-      }
-    case (TEXTURECOMPRESSION_RGBA_S3TC_DXT1):
-      {
-        texture_components = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
-        break;
-      }
-    case (TEXTURECOMPRESSION_RGBA_S3TC_DXT3):
-      {
-        texture_components = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
-        break;
-      }
-    case (TEXTURECOMPRESSION_RGBA_S3TC_DXT5):
-      {
-        texture_components = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
-        break;
-      }
-    }
-  }
-  else
-  {
-    texture_components = GL_RGBA;
-    g_texture_globals.m_nTextureCompressionFormat = TEXTURECOMPRESSION_NONE;
-  }
+	if(!g_texturesmap->realised())
+	{
+		texture_components = g_texture_globals.m_nTextureCompressionFormat;
+	}
+	else
+	{
+		if (g_texture_globals.bTextureCompressionSupported)
+		{
+			if(g_texture_globals.m_nTextureCompressionFormat != TEXTURECOMPRESSION_NONE
+				&& g_texture_globals.m_nTextureCompressionFormat != TEXTURECOMPRESSION_RGBA
+				&& !g_texture_globals.m_bS3CompressionSupported)
+			{
+				globalOutputStream() << "OpenGL extension GL_EXT_texture_compression_s3tc not supported by current graphics drivers\n";
+				g_texture_globals.m_nTextureCompressionFormat = TEXTURECOMPRESSION_RGBA; // if this is not supported either, see below
+			}
+			if (g_texture_globals.m_nTextureCompressionFormat == TEXTURECOMPRESSION_RGBA && !g_texture_globals.m_bOpenGLCompressionSupported)
+			{
+				globalOutputStream() << "OpenGL extension GL_ARB_texture_compression not supported by current graphics drivers\n";
+				g_texture_globals.m_nTextureCompressionFormat = TEXTURECOMPRESSION_NONE;
+			}
+
+			switch (g_texture_globals.m_nTextureCompressionFormat)
+			{
+			case (TEXTURECOMPRESSION_NONE):
+				{
+					texture_components = GL_RGBA;
+					break;
+				}
+			case (TEXTURECOMPRESSION_RGBA):
+				{
+					texture_components = GL_COMPRESSED_RGBA_ARB;
+					break;
+				}
+			case (TEXTURECOMPRESSION_RGBA_S3TC_DXT1):
+				{
+					texture_components = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
+					break;
+				}
+			case (TEXTURECOMPRESSION_RGBA_S3TC_DXT3):
+				{
+					texture_components = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
+					break;
+				}
+			case (TEXTURECOMPRESSION_RGBA_S3TC_DXT5):
+				{
+					texture_components = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
+					break;
+				}
+			}
+		}
+		else
+		{
+			texture_components = GL_RGBA;
+			g_texture_globals.m_nTextureCompressionFormat = TEXTURECOMPRESSION_NONE;
+		}
+	}
 
   Textures_setTextureComponents(texture_components);
 }
diff --git a/setup/win32/components/gtk2.xml b/setup/win32/components/gtk2.xml
index c8e61387..91cec39a 100644
--- a/setup/win32/components/gtk2.xml
+++ b/setup/win32/components/gtk2.xml
@@ -13,6 +13,8 @@
       <dir name="2.10.0">
         <dir name="engines">
           <file name="libwimp.dll"/>
+          <file name="libclearlooks.dll"/>
+          <file name="libpixmap.dll"/>
         </dir>
         <dir name="immodules">
           <file name="im-ipa.dll"/>
@@ -20,6 +22,7 @@
         <dir name="loaders">
           <file name="libpixbufloader-bmp.dll"/>
           <file name="libpixbufloader-xpm.dll"/>
+          <file name="libpixbufloader-png.dll"/>
         </dir>
       </dir>
     </dir>
@@ -45,6 +48,11 @@
           <file name="gtkrc"/>
         </dir>
       </dir>
+	<dir name="Clearlooks">
+        <dir name="gtk-2.0">
+          <file name="gtkrc"/>
+        </dir>
+      </dir>
     </dir>
   </dir>
 </component>