コード例 #1
0
        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);
        }
コード例 #2
0
 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);
 }
コード例 #3
0
		private void CreateShaderValuesWithBufferMustAlwaysBe16BytesAligned()
		{
			shaderBuffer = new SharpDXBuffer(nativeDevice, 2240, BindFlags.ConstantBuffer);
			shaderValues = new ShaderValues();
		}
コード例 #4
0
 private void CreateShaderValuesWithBufferMustAlwaysBe16BytesAligned()
 {
     shaderBuffer = new SharpDXBuffer(nativeDevice, 2240, BindFlags.ConstantBuffer);
     shaderValues = new ShaderValues();
 }