Browse Source

Fixed missing CheckFeatureSupport() & missing PrepareDraw() in instanced draw call.

Lasse Öörni 10 years ago
parent
commit
cf5f5e4a18
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

+ 4 - 0
Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

@@ -686,6 +686,8 @@ void Graphics::DrawInstanced(PrimitiveType type, unsigned indexStart, unsigned i
     if (!indexCount || !instanceCount)
     if (!indexCount || !instanceCount)
         return;
         return;
     
     
+    PrepareDraw();
+
     unsigned primitiveCount;
     unsigned primitiveCount;
     D3D_PRIMITIVE_TOPOLOGY d3dPrimitiveType;
     D3D_PRIMITIVE_TOPOLOGY d3dPrimitiveType;
     
     
@@ -2049,6 +2051,8 @@ bool Graphics::CreateDevice(int width, int height, int multisample)
             LOGERROR("Failed to create D3D11 device");
             LOGERROR("Failed to create D3D11 device");
             return false;
             return false;
         }
         }
+
+        CheckFeatureSupport();
     }
     }
 
 
     // Create swap chain. Release old if necessary
     // Create swap chain. Release old if necessary