OSDN Git Service

Merged rev 4884
[skyscrapersim/skyscraper.git] / ogre_fixes.patch
1 diff -urN orig/OgreMain/src/OgreScriptCompiler.cpp new/OgreMain/src/OgreScriptCompiler.cpp
2 --- orig/OgreMain/src/OgreScriptCompiler.cpp    2012-09-02 00:27:15.000000000 -0500
3 +++ new/OgreMain/src/OgreScriptCompiler.cpp     2013-10-23 10:04:19.914107738 -0500
4 @@ -1459,7 +1459,7 @@
5                  }
6                  else
7                  {
8 -                    mCompiler->addError(CE_UNEXPECTEDTOKEN, impl->file, impl->line, "token class, " + impl->cls + ", unrecognized.");
9 +                    //mCompiler->addError(CE_UNEXPECTEDTOKEN, impl->file, impl->line, "token class, " + impl->cls + ", unrecognized.");
10                  }
11  
12                                 asn = AbstractNodePtr(impl);
13 diff -urN orig/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp new/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp
14 --- orig/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp 2012-09-02 00:27:15.000000000 -0500
15 +++ new/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp  2013-10-23 10:04:19.918107781 -0500
16 @@ -549,7 +549,7 @@
17  
18  
19                         UINT deviceFlags = 0;
20 -                       if (D3D11Device::D3D_NO_EXCEPTION != D3D11Device::getExceptionsErrorLevel())
21 +                       if (D3D11Device::D3D_NO_EXCEPTION != D3D11Device::getExceptionsErrorLevel() && OGRE_DEBUG_MODE)
22                         {
23                                 deviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
24                         }
25 diff -urN orig/RenderSystems/Direct3D9/src/OgreD3D9GpuProgram.cpp new/RenderSystems/Direct3D9/src/OgreD3D9GpuProgram.cpp
26 --- orig/RenderSystems/Direct3D9/src/OgreD3D9GpuProgram.cpp     2012-09-02 00:27:15.000000000 -0500
27 +++ new/RenderSystems/Direct3D9/src/OgreD3D9GpuProgram.cpp      2013-10-23 10:03:36.357635192 -0500
28 @@ -204,7 +204,7 @@
29                 // Create the shader
30                 // Assemble source into microcode
31                 LPD3DXBUFFER microcode;
32 -               LPD3DXBUFFER errors;
33 +               LPD3DXBUFFER errors = 0;
34                 HRESULT hr = D3DXAssembleShader(
35                         mSource.c_str(),
36                         static_cast<UINT>(mSource.length()),
37 @@ -216,9 +216,17 @@
38  
39                 if (FAILED(hr))
40                 {
41 -                       String message = "Cannot assemble D3D9 shader " + mName + " Errors:\n" +
42 -                               static_cast<const char*>(errors->GetBufferPointer());
43 -                       errors->Release();
44 +                       String message;
45 +                       if (errors)
46 +                       {
47 +                               message = "Cannot assemble D3D9 shader " + mName + " Errors:\n" +
48 +                                       static_cast<const char*>(errors->GetBufferPointer());
49 +                               errors->Release();
50 +                       }
51 +                       else
52 +                       {
53 +                               message = "Cannot assemble D3D9 shader " + mName + " - DirectX update needed";
54 +                       }
55                         OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, message,
56                                 "D3D9GpuProgram::loadFromSource");
57                 }