mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
VertexBuffer, VertexLayout and GeometryBinding improvements
- VertexBuffer: Added constructor that takes stride instead of type - VertexLayout: Added Refcounting to VertexLayout and ownership parameters for VertexElements - Fixed: GeometryBinding using stride and offset from buffer instead of buffer binding
This commit is contained in:
@@ -40,8 +40,8 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
nativeBuffers[slot] = vertexBuffer.nativeBuffer..AddRef();
|
||||
|
||||
bufferStrides[slot] = vertexBuffer.Binding.Stride;
|
||||
bufferOffsets[slot] = vertexBuffer.Binding.Offset;
|
||||
bufferStrides[slot] = binding.Stride;
|
||||
bufferOffsets[slot] = binding.Offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -13,12 +13,13 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
public ID3DBlob* nativeShaderCode ~ _?.Release();
|
||||
|
||||
public this(GraphicsContext context, VertexElement[] elements, VertexShader vertexShader)
|
||||
public this(GraphicsContext context, VertexElement[] elements, bool ownsElements, VertexShader vertexShader)
|
||||
{
|
||||
nativeShaderCode = vertexShader.nativeCode..AddRef();
|
||||
|
||||
_context = context..AddRef();
|
||||
_elements = elements;
|
||||
_ownsElements = ownsElements;
|
||||
|
||||
CreateNativeLayout();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user