diff --git a/hecl/blender/BlenderConnection.cpp b/hecl/blender/BlenderConnection.cpp index 53da76747..978faf3e3 100644 --- a/hecl/blender/BlenderConnection.cpp +++ b/hecl/blender/BlenderConnection.cpp @@ -192,7 +192,6 @@ void BlenderConnection::_blenderDied() BlenderConnection::BlenderConnection(int verbosityLevel) { BlenderLog.report(logvisor::Info, "Establishing BlenderConnection..."); - signal(SIGPIPE, SIG_IGN); /* Put hecl_blendershell.py in temp dir */ #ifdef _WIN32 @@ -201,6 +200,7 @@ BlenderConnection::BlenderConnection(int verbosityLevel) TMPDIR = (wchar_t*)L"\\Temp"; m_startupBlend = hecl::WideToUTF8(TMPDIR); #else + signal(SIGPIPE, SIG_IGN); char* TMPDIR = getenv("TMPDIR"); if (!TMPDIR) TMPDIR = (char*)"/tmp"; @@ -345,7 +345,7 @@ BlenderConnection::BlenderConnection(int verbosityLevel) #endif /* Stash error path an unlink existing file */ - m_errPath = hecl::SystemString(TMPDIR) + hecl::Format(_S("/hecl_%016llX.derp"), (unsigned long long)m_blenderProc); + m_errPath = hecl::SystemString(TMPDIR) + hecl::SysFormat(_S("/hecl_%016llX.derp"), (unsigned long long)m_blenderProc); hecl::Unlink(m_errPath.c_str()); /* Handle first response */ diff --git a/hecl/lib/Backend/HLSL.cpp b/hecl/lib/Backend/HLSL.cpp index 575f9bd90..983d5b067 100644 --- a/hecl/lib/Backend/HLSL.cpp +++ b/hecl/lib/Backend/HLSL.cpp @@ -186,12 +186,9 @@ std::string HLSL::makeFrag(bool alphaTest, const ShaderFunction& lighting) const if (lighting.m_source) lightingSrc = lighting.m_source; else - lightingSrc = "cbuffer LightingUniform : register(b2)\n" - "{\n" - " float4 colorReg0;\n" - " float4 colorReg1;\n" - " float4 colorReg2;\n" - "};\n"; + lightingSrc = "static const float4 colorReg0 = float4(1.0, 1.0, 1.0, 1.0);\n" + "static const float4 colorReg1 = float4(1.0, 1.0, 1.0, 1.0);\n" + "static const float4 colorReg2 = float4(1.0, 1.0, 1.0, 1.0);\n"; std::string texMapDecl; if (m_texMapEnd) @@ -236,12 +233,9 @@ std::string HLSL::makeFrag(bool alphaTest, const ShaderFunction& lighting, if (lighting.m_source) lightingSrc = lighting.m_source; else - lightingSrc = "cbuffer LightingUniform : register(b2)\n" - "{\n" - " float4 colorReg0;\n" - " float4 colorReg1;\n" - " float4 colorReg2;\n" - "};\n"; + lightingSrc = "static const float4 colorReg0 = float4(1.0, 1.0, 1.0, 1.0);\n" + "static const float4 colorReg1 = float4(1.0, 1.0, 1.0, 1.0);\n" + "static const float4 colorReg2 = float4(1.0, 1.0, 1.0, 1.0);\n"; std::string postSrc; if (post.m_source)