mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-12 08:11:10 +02:00
Fixed crash in release build.
This commit is contained in:
@@ -248,6 +248,7 @@
|
||||
<AdditionalLibraryDirectories>openal\lib;sys\win32\dongle;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>../Doom3.exe</OutputFile>
|
||||
<AdditionalDependencies>d3d12.lib;nafxcw.lib;libcmt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
|
||||
@@ -42,5 +42,6 @@
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>+set r_fullscreen 0 +set r_mode 6</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>D:\projects\Doom3</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerCommandArgumentsHistory>+set r_fullscreen 0 +set r_mode 6|</LocalDebuggerCommandArgumentsHistory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -253,6 +253,7 @@
|
||||
</PreBuildEvent>
|
||||
<Link>
|
||||
<OutputFile>../gamex64.dll</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
|
||||
@@ -9567,8 +9567,29 @@ static std::unordered_map<HPBUFFERARB, QD3D12Pbuffer*> g_qd3d12Pbuffers;
|
||||
|
||||
static void QD3D12_RegisterWindowDC(QD3D12Window* w)
|
||||
{
|
||||
if (w && w->hdc)
|
||||
g_qd3d12DcToWindow[w->hdc] = w;
|
||||
if (w == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
const HDC hdc = w->hdc;
|
||||
if (hdc == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the HDC is already registered, only update the pointer.
|
||||
// This avoids insert/rehash for the common case.
|
||||
std::unordered_map<HDC, QD3D12Window*>::iterator it = g_qd3d12DcToWindow.find(hdc);
|
||||
if (it != g_qd3d12DcToWindow.end()) {
|
||||
it->second = w;
|
||||
return;
|
||||
}
|
||||
|
||||
// Avoid tiny-map rehash behavior in release builds.
|
||||
if (g_qd3d12DcToWindow.bucket_count() < 256) {
|
||||
g_qd3d12DcToWindow.reserve(256);
|
||||
}
|
||||
|
||||
g_qd3d12DcToWindow.emplace(hdc, w);
|
||||
}
|
||||
|
||||
static void QD3D12_UnregisterWindowDC(HDC dc)
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>streamline/include</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
<EnableEnhancedInstructionSet>AdvancedVectorExtensions102</EnableEnhancedInstructionSet>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
||||
@@ -1618,13 +1618,16 @@ idImage *idImageManager::ImageFromFile( const char *_name, textureFilter_t filte
|
||||
}
|
||||
|
||||
|
||||
if (depth == TD_BUMP)
|
||||
if (image->texnum != idImage::TEXTURE_NOT_LOADED)
|
||||
{
|
||||
glTextureNormalMap(image->texnum, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
glTextureNormalMap(image->texnum, false);
|
||||
if (depth == TD_BUMP)
|
||||
{
|
||||
glTextureNormalMap(image->texnum, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
glTextureNormalMap(image->texnum, false);
|
||||
}
|
||||
}
|
||||
|
||||
return image;
|
||||
|
||||
Reference in New Issue
Block a user