From 47e6646181f4c3f926030b1783ef64dd0ba43a35 Mon Sep 17 00:00:00 2001 From: namespace Date: Wed, 25 Apr 2007 18:54:37 +0000 Subject: [PATCH] - Fixed texcompression being disabled after each restart git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@163 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- CHANGES | 4 ++ radiant/GtkRadiant.vcproj | 2 +- radiant/textures.cpp | 107 +++++++++++++++++--------------- setup/win32/components/gtk2.xml | 8 +++ 4 files changed, 69 insertions(+), 52 deletions(-) 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" /> 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 @@ + + @@ -20,6 +22,7 @@ + @@ -45,6 +48,11 @@ + + + + + -- 2.39.2