소스 검색

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

Lasse Öörni 10 년 전
부모
커밋
cf5f5e4a18
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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)
         return;
     
+    PrepareDraw();
+
     unsigned primitiveCount;
     D3D_PRIMITIVE_TOPOLOGY d3dPrimitiveType;
     
@@ -2049,6 +2051,8 @@ bool Graphics::CreateDevice(int width, int height, int multisample)
             LOGERROR("Failed to create D3D11 device");
             return false;
         }
+
+        CheckFeatureSupport();
     }
 
     // Create swap chain. Release old if necessary