Ver Fonte

added drawIndexedInstanced

Nicolas Cannasse há 6 anos atrás
pai
commit
f826963059
3 ficheiros alterados com 9 adições e 1 exclusões
  1. 5 0
      libs/directx/directx.cpp
  2. 3 0
      libs/directx/dx/Driver.hx
  3. 1 1
      libs/directx/haxelib.json

+ 5 - 0
libs/directx/directx.cpp

@@ -292,6 +292,10 @@ HL_PRIM void HL_NAME(draw_indexed)( int count, int start, int baseVertex ) {
 	driver->context->DrawIndexed(count,start,baseVertex);
 	driver->context->DrawIndexed(count,start,baseVertex);
 }
 }
 
 
+HL_PRIM void HL_NAME(draw_indexed_instanced)( int indexCountPerInstance, int instanceCount, int startIndexLocation, int baseVertexLocation, int startInstanceLocation ) {
+	driver->context->DrawIndexedInstanced(indexCountPerInstance, instanceCount, startIndexLocation, baseVertexLocation, startInstanceLocation);
+}
+
 HL_PRIM void HL_NAME(draw_indexed_instanced_indirect)( dx_resource *r, int offset ) {
 HL_PRIM void HL_NAME(draw_indexed_instanced_indirect)( dx_resource *r, int offset ) {
 	driver->context->DrawIndexedInstancedIndirect((ID3D11Buffer*)r, (UINT)offset);
 	driver->context->DrawIndexedInstancedIndirect((ID3D11Buffer*)r, (UINT)offset);
 }
 }
@@ -463,6 +467,7 @@ DEFINE_PRIM(_BYTES, disassemble_shader, _BYTES _I32 _I32 _BYTES _REF(_I32));
 DEFINE_PRIM(_POINTER, create_vertex_shader, _BYTES _I32);
 DEFINE_PRIM(_POINTER, create_vertex_shader, _BYTES _I32);
 DEFINE_PRIM(_POINTER, create_pixel_shader, _BYTES _I32);
 DEFINE_PRIM(_POINTER, create_pixel_shader, _BYTES _I32);
 DEFINE_PRIM(_VOID, draw_indexed, _I32 _I32 _I32);
 DEFINE_PRIM(_VOID, draw_indexed, _I32 _I32 _I32);
+DEFINE_PRIM(_VOID, draw_indexed_instanced, _I32 _I32 _I32 _I32 _I32);
 DEFINE_PRIM(_VOID, draw_indexed_instanced_indirect, _RESOURCE _I32);
 DEFINE_PRIM(_VOID, draw_indexed_instanced_indirect, _RESOURCE _I32);
 DEFINE_PRIM(_VOID, vs_set_shader, _POINTER);
 DEFINE_PRIM(_VOID, vs_set_shader, _POINTER);
 DEFINE_PRIM(_VOID, vs_set_constant_buffers, _I32 _I32 _REF(_RESOURCE));
 DEFINE_PRIM(_VOID, vs_set_constant_buffers, _I32 _I32 _REF(_RESOURCE));

+ 3 - 0
libs/directx/dx/Driver.hx

@@ -558,6 +558,9 @@ class Driver {
 	public static function drawIndexed( indexCount : Int, startIndex : Int, baseVertex : Int ) : Void {
 	public static function drawIndexed( indexCount : Int, startIndex : Int, baseVertex : Int ) : Void {
 	}
 	}
 
 
+	public static function drawIndexedInstanced( indexCountPerInstance : Int, instanceCount : Int, startIndexLocation : Int, baseVertexLocation : Int, startInstanceLocation : Int ) {
+	}
+
 	public static function drawIndexedInstancedIndirect( buffer : Resource, offset : Int ) : Void {
 	public static function drawIndexedInstancedIndirect( buffer : Resource, offset : Int ) : Void {
 	}
 	}
 
 

+ 1 - 1
libs/directx/haxelib.json

@@ -4,7 +4,7 @@
 	"license" : "BSD",
 	"license" : "BSD",
 	"contributors" : ["ncannasse"],
 	"contributors" : ["ncannasse"],
 	"description" : "DirectX support for Haxe/HL.",
 	"description" : "DirectX support for Haxe/HL.",
-	"version" : "1.9.0",
+	"version" : "1.10.0",
 	"releasenote" : "",
 	"releasenote" : "",
 	"dependencies": { "hlopenal" : "" }
 	"dependencies": { "hlopenal" : "" }
 }
 }