private void CreateBuffers() { int vertexDataSize = NumberOfVertices * Format.Stride; vertexBuffer = new SharpDXBuffer(nativeDevice, vertexDataSize, BindFlags.VertexBuffer); int indexDataSize = NumberOfIndices * sizeof(short); indexBuffer = new SharpDXBuffer(nativeDevice, indexDataSize, BindFlags.IndexBuffer); }
protected override void CreateNative() { sharpDXDevice = (SharpDXDevice)device; nativeDevice = sharpDXDevice.NativeDevice; deviceContext = sharpDXDevice.Context; nativeVertexBuffer = new SharpDXBuffer(nativeDevice, maxNumberOfVertices * vertexSize, BindFlags.VertexBuffer); nativeIndexBuffer = new SharpDXBuffer(nativeDevice, maxNumberOfIndices * indexSize, BindFlags.IndexBuffer); }
private void CreateShaderValuesWithBufferMustAlwaysBe16BytesAligned() { shaderBuffer = new SharpDXBuffer(nativeDevice, 2240, BindFlags.ConstantBuffer); shaderValues = new ShaderValues(); }