Examples of VSSetConstantBuffers()


Examples of d3d11.core.ID3D11DeviceContext.VSSetConstantBuffers()

            // Update rotation matrix for triangle
            D3DXMatrixRotationZ(pointerTo(mat), angle.addAndGet(1) * 0.01f);
            D3D11_MAPPED_SUBRESOURCE mappedData = immediateContext.Map(constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0);
            pointerTo(mat).copyTo(mappedData.pData());
            immediateContext.Unmap(constBuffer, 0);
            immediateContext.VSSetConstantBuffers(0, 1, pointerToPointer(pointerTo(constBuffer)));
           
            // Set primitive topology and draw
            immediateContext.IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
            immediateContext.Draw(3, 0);
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.