'plugins/model/model.vcproj',
'plugins/imagepng/imagepng.vcproj',
'plugins/imagewal/imagewal.vcproj',
+ 'plugins/imagehl/imagehl.vcproj',
'plugins/imagem8/imagem8.vcproj',
'plugins/spritemodel/spritemodel.vcproj',
'plugins/textool/textool.vcproj',
; hlimage.def : Declares the module parameters for the DLL.
LIBRARY "ImageHL"
-DESCRIPTION 'ImageHL Windows Dynamic Link Library'
EXPORTS
; Explicit exports can go here
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="9.00"\r
+ Name="imagehl"\r
+ ProjectGUID="{BA1BC409-744B-4270-8E47-BA10872313AD}"\r
+ Keyword="Win32Proj"\r
+ TargetFrameworkVersion="0"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="$(SolutionDir)\install\modules"\r
+ IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"\r
+ ConfigurationType="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories=""$(SolutionDir)\libs";"$(SolutionDir)\include";"$(SolutionDir)\..\STLport-5.2.1\stlport";"$(SolutionDir)\..\gtk-2.16.6\include\glib-2.0";"$(SolutionDir)\..\gtk-2.16.6\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2-2.7.3\include\libxml2""\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMAGEHL_EXPORTS;"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ DebugInformationFormat="4"\r
+ DisableSpecificWarnings="4996;4101"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib libxml2.lib synapse.lib"\r
+ AdditionalLibraryDirectories=""$(SolutionDir)\..\gtk-2.16.6\lib";"$(SolutionDir)\..\libxml2-2.7.3\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs""\r
+ ModuleDefinitionFile="imagehl.def"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="$(SolutionDir)\install\modules"\r
+ IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"\r
+ ConfigurationType="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""$(SolutionDir)\libs";"$(SolutionDir)\include";"$(SolutionDir)\..\STLport-5.2.1\stlport";"$(SolutionDir)\..\gtk-2.16.6\include\glib-2.0";"$(SolutionDir)\..\gtk-2.16.6\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2-2.7.3\include\libxml2""\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMAGEHL_EXPORTS;"\r
+ RuntimeLibrary="2"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ DebugInformationFormat="3"\r
+ DisableSpecificWarnings="4996;4101"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib libxml2.lib synapse.lib"\r
+ AdditionalLibraryDirectories=""$(SolutionDir)\..\gtk-2.16.6\lib";"$(SolutionDir)\..\libxml2-2.7.3\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs""\r
+ ModuleDefinitionFile="imagehl.def"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="2"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="src"\r
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+ >\r
+ <File\r
+ RelativePath=".\imagehl.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\imagehl.def"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\lbmlib.cpp"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" ?><VisualStudioProject Name="imagehl" ProjectGUID="{65D02375-63EE-4A8A-9F8E-504B1D5A1D02}" ProjectType="Visual C++" RootNamespace="imagehl" Version="8.00">
- <Platforms>
- <Platform Name="Win32"/>
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration CharacterSet="2" ConfigurationType="1" IntermediateDirectory="$(ConfigurationName)" Name="Debug|Win32" OutputDirectory="$(SolutionDir)\install\modules">
- <Tool Name="VCPreBuildEventTool"/>
- <Tool Name="VCCustomBuildTool"/>
- <Tool Name="VCXMLDataGeneratorTool"/>
- <Tool Name="VCWebServiceProxyGeneratorTool"/>
- <Tool Name="VCMIDLTool"/>
- <Tool AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2\include"" BasicRuntimeChecks="3" DebugInformationFormat="4" Detect64BitPortabilityProblems="true" DisableSpecificWarnings="4996;4244;4267" MinimalRebuild="true" Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="3" WarningLevel="3"/>
- <Tool Name="VCManagedResourceCompilerTool"/>
- <Tool Name="VCResourceCompilerTool"/>
- <Tool Name="VCPreLinkEventTool"/>
- <Tool GenerateDebugInformation="true" Name="VCLinkerTool" TargetMachine="1"/>
- <Tool Name="VCALinkTool"/>
- <Tool Name="VCManifestTool"/>
- <Tool Name="VCXDCMakeTool"/>
- <Tool Name="VCBscMakeTool"/>
- <Tool Name="VCFxCopTool"/>
- <Tool Name="VCAppVerifierTool"/>
- <Tool Name="VCWebDeploymentTool"/>
- <Tool Name="VCPostBuildEventTool"/>
- </Configuration>
- <Configuration CharacterSet="2" ConfigurationType="1" IntermediateDirectory="$(ConfigurationName)" Name="Release|Win32" OutputDirectory="$(SolutionDir)\install\modules">
- <Tool Name="VCPreBuildEventTool"/>
- <Tool Name="VCCustomBuildTool"/>
- <Tool Name="VCXMLDataGeneratorTool"/>
- <Tool Name="VCWebServiceProxyGeneratorTool"/>
- <Tool Name="VCMIDLTool"/>
- <Tool AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2\include"" DebugInformationFormat="3" Detect64BitPortabilityProblems="true" DisableSpecificWarnings="4996;4244;4267" Name="VCCLCompilerTool" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="2" WarningLevel="3"/>
- <Tool Name="VCManagedResourceCompilerTool"/>
- <Tool Name="VCResourceCompilerTool"/>
- <Tool Name="VCPreLinkEventTool"/>
- <Tool EnableCOMDATFolding="2" GenerateDebugInformation="true" Name="VCLinkerTool" OptimizeReferences="2" TargetMachine="1"/>
- <Tool Name="VCALinkTool"/>
- <Tool Name="VCManifestTool"/>
- <Tool Name="VCXDCMakeTool"/>
- <Tool Name="VCBscMakeTool"/>
- <Tool Name="VCFxCopTool"/>
- <Tool Name="VCAppVerifierTool"/>
- <Tool Name="VCWebDeploymentTool"/>
- <Tool Name="VCPostBuildEventTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;f90;for;f;fpp" Name="Source Files">
- <File RelativePath=".\imagehl.cpp">
- </File>
- <File RelativePath=".\imagehl.def">
- </File>
- <File RelativePath=".\lbmlib.cpp">
- </File>
- </Filter>
- <Filter Filter="h;hpp;hxx;hm;inl;fi;fd" Name="Header Files">
- <File RelativePath=".\imagehl.h">
- </File>
- <File RelativePath=".\lbmlib.h">
- </File>
- </Filter>
- <Filter Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;txt" Name="Resource Files">
- <File RelativePath=".\imagehl.txt">
- </File>
- </Filter>
- <File RelativePath=".\Conscript">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
\ No newline at end of file
{E13CCFB0-A366-4EF3-A66F-C374B563E4DF} = {E13CCFB0-A366-4EF3-A66F-C374B563E4DF}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imagehl", "plugins\imagehl\imagehl.vcproj", "{BA1BC409-744B-4270-8E47-BA10872313AD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E13CCFB0-A366-4EF3-A66F-C374B563E4DF} = {E13CCFB0-A366-4EF3-A66F-C374B563E4DF}
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imagem8", "plugins\imagem8\imagem8.vcproj", "{C6FA63AA-5F37-4D43-BE6B-09903E70C9E1}"
ProjectSection(ProjectDependencies) = postProject
{E13CCFB0-A366-4EF3-A66F-C374B563E4DF} = {E13CCFB0-A366-4EF3-A66F-C374B563E4DF}
{8D3160AB-B386-4970-8146-826BC293CCB1}.Debug|Win32.Build.0 = Debug|Win32
{8D3160AB-B386-4970-8146-826BC293CCB1}.Release|Win32.ActiveCfg = Release|Win32
{8D3160AB-B386-4970-8146-826BC293CCB1}.Release|Win32.Build.0 = Release|Win32
+ {BA1BC409-744B-4270-8E47-BA10872313AD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BA1BC409-744B-4270-8E47-BA10872313AD}.Debug|Win32.Build.0 = Debug|Win32
+ {BA1BC409-744B-4270-8E47-BA10872313AD}.Release|Win32.ActiveCfg = Release|Win32
+ {BA1BC409-744B-4270-8E47-BA10872313AD}.Release|Win32.Build.0 = Release|Win32
{C6FA63AA-5F37-4D43-BE6B-09903E70C9E1}.Debug|Win32.ActiveCfg = Debug|Win32
{C6FA63AA-5F37-4D43-BE6B-09903E70C9E1}.Debug|Win32.Build.0 = Debug|Win32
{C6FA63AA-5F37-4D43-BE6B-09903E70C9E1}.Release|Win32.ActiveCfg = Release|Win32
char *libgl, *ptr;
int i, j, k;
- /*
- Rambetter on Fri Jan 21, 2011:
-
- People with recent NVIDIA cards and Windows 7 (Aero) are complaining about "hall of mirrors"
- effect in the OpenGL viewports. The code below is borrowed from NetRadiant to address
- this issue. This change turns off desktop compositing (globally) while Radiant is running.
- It's a real hack but the "correct" fix is very involving, so until the underlying problem
- is addressed we need this code here. I don't know for sure what the underlying problem is,
- but I have a hunch it's the version of gtkglext.dll we're using.
- */
-
-#ifdef _WIN32
- HMODULE lib;
- lib = LoadLibrary("dwmapi.dll");
- if (lib != 0)
- {
- void (WINAPI *qDwmEnableComposition) (bool bEnable) =
- (void (WINAPI *) (bool bEnable)) GetProcAddress(lib, "DwmEnableComposition");
- if (qDwmEnableComposition)
- {
- qDwmEnableComposition(FALSE);
- }
- FreeLibrary(lib);
- }
-#endif
-
/*
Rambetter on Sat Nov 13, 2010:
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][1] = 0.0f;
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 0.0f;
+ g_PrefsDlg.SavePrefs();
Sys_UpdateWindows (W_ALL);
}
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][1] = 0.0f;
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 0.0f;
+ g_PrefsDlg.SavePrefs();
Sys_UpdateWindows (W_ALL);
}
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][1] = 0.0f;
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 0.0f;
+ g_PrefsDlg.SavePrefs();
Sys_UpdateWindows (W_ALL);
}
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][1] = 0.0f;
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 0.0f;
+ g_PrefsDlg.SavePrefs();
Sys_UpdateWindows (W_ALL);
}
#define TEXTURECOMPRESSIONFORMAT_KEY "TextureCompressionFormat"
#define LIGHTRADIUS_KEY "LightRadiuses"
#define Q3MAP2TEX_KEY "Q3Map2Tex"
+
+#ifdef ATIHACK_812
#define ATIHACK_KEY "ATIHack"
+#endif
+
+#ifdef NVIDIA_AERO_HACK
+#define NVAEROHACK_KEY "NvidiaAeroHack"
+#endif
// window stuff
#define ENTITYSPLIT1_KEY "EntitySplit1"
m_nLightRadiuses = 1;
m_bQ3Map2Texturing = TRUE;
#ifdef ATIHACK_812
- m_bGlATIHack = FALSE;
+ m_bGlATIHack = FALSE;
+#endif
+#ifdef NVIDIA_AERO_HACK
+ m_bGlNvidiaAeroHack = TRUE;
+ m_bGlNvidiaAeroHackPrevState = -1; // -1 is uninitialized, 0 is FALSE, 1 is TRUE
#endif
}
g_list_free (combo_list);
#ifdef ATIHACK_812
- // ATI bugs
- check = gtk_check_button_new_with_label (_("ATI cards with broken drivers - bug #802"));
- gtk_widget_show(check);
- gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
- AddDialogData(check, &m_bGlATIHack, DLG_CHECK_BOOL);
+ // ATI bugs
+ check = gtk_check_button_new_with_label (_("ATI and Intel cards w/ buggy drivers (disappearing polygons)"));
+ gtk_widget_show(check);
+ gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
+ AddDialogData(check, &m_bGlATIHack, DLG_CHECK_BOOL);
+#endif
+
+#ifdef NVIDIA_AERO_HACK
+ check = gtk_check_button_new_with_label (_("NVIDIA/Aero bug - disable Windows composition"));
+ gtk_widget_show(check);
+ gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
+ AddDialogData(check, &m_bGlNvidiaAeroHack, DLG_CHECK_BOOL);
#endif
// Add the page to the notebook
}
#endif
+#ifdef NVIDIA_AERO_HACK
+void PrefsDlg::UpdateNvidiaAeroHack() {
+ if (m_bGlNvidiaAeroHack && m_bGlNvidiaAeroHackPrevState == 1) { return; }
+ if ((!m_bGlNvidiaAeroHack) && m_bGlNvidiaAeroHackPrevState == 0) { return; }
+ if ((!m_bGlNvidiaAeroHack) && m_bGlNvidiaAeroHackPrevState < 0) {
+ // The hack state is uninitialized, meaning that this is the first call
+ // to this function. I prefer not to explicitly enable composition because
+ // the user may have set the application to disable it, and I don't want to
+ // override that. Leave the state of composition as-is if the hack checkbox
+ // isn't checked.
+ m_bGlNvidiaAeroHackPrevState = 0;
+ return;
+ }
+ HMODULE lib = LoadLibrary("dwmapi.dll");
+ if (lib) {
+ void (WINAPI *qDwmEnableComposition) (bool bEnable) =
+ (void (WINAPI *) (bool bEnable)) GetProcAddress(lib, "DwmEnableComposition");
+ if (qDwmEnableComposition) {
+ if (m_bGlNvidiaAeroHack) {
+ Sys_Printf("Disabling Windows composition\n");
+ qDwmEnableComposition(0);
+ m_bGlNvidiaAeroHackPrevState = 1;
+ }
+ else {
+ Sys_Printf("Enabling Windows composition\n");
+ qDwmEnableComposition(1);
+ m_bGlNvidiaAeroHackPrevState = 0;
+ }
+ }
+ FreeLibrary(lib);
+ }
+}
+#endif
+
// TTimo: m_strEnginePath has a special status, if not found in registry we need to
// initiliaze it for sure. It is not totally failsafe but we can use the same
// code than in q3map, expecting to find some "quake" above us. If not, we prompt
mLocalPrefs.GetPref(ATIHACK_KEY, &m_bGlATIHack, FALSE);
#endif
+#ifdef NVIDIA_AERO_HACK
+ mLocalPrefs.GetPref(NVAEROHACK_KEY, &m_bGlNvidiaAeroHack, TRUE);
+#endif
+
Undo_SetMaxSize(m_nUndoLevels); // set it internally as well / FIXME: why not just have one global value?
UpdateTextureCompression();
UpdateATIHack();
#endif
+#ifdef NVIDIA_AERO_HACK
+ UpdateNvidiaAeroHack();
+#endif
+
if (mLocalPrefs.mbEmpty)
{
mLocalPrefs.mbEmpty = false;
SavePrefs();
// make sure the logfile is ok
Sys_LogFile();
- #ifdef ATIHACK_812
- UpdateATIHack();
- #endif
+#ifdef ATIHACK_812
+ UpdateATIHack();
+#endif
+#ifdef NVIDIA_AERO_HACK
+ UpdateNvidiaAeroHack();
+#endif
if (g_pParentWnd)
g_pParentWnd->SetGridStatus();
Sys_UpdateWindows(W_ALL);
#include "gtkr_list.h"
//#include "profile.h"
+#ifdef _WIN32
+#define NVIDIA_AERO_HACK
+#endif
+
#define MAX_TEXTURE_QUALITY 3
enum PrefTypes_t
void UpdateATIHack();
#endif
+#ifdef NVIDIA_AERO_HACK
+ void UpdateNvidiaAeroHack();
+#endif
+
void LoadPrefs();
void SavePrefs();
void LoadTexdefPref(texdef_t* pTexdef, char* pName);
bool m_bQ3Map2Texturing;
#ifdef ATIHACK_812
- bool m_bGlATIHack;
+ bool m_bGlATIHack;
+#endif
+
+#ifdef NVIDIA_AERO_HACK
+ bool m_bGlNvidiaAeroHack;
+ int m_bGlNvidiaAeroHackPrevState;
#endif
void UpdateData (bool retrieve);
of Visual C++:</p>
<blockquote>
<pre width="80" style="background: #CCCCCC; padding: 2mm; border-style: ridge">radiant - 0 error(s), 0 warning(s)
-========== Build: 37 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
+========== Build: 38 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
</pre>
</blockquote>
<hr />