Examples of IASetInputLayout()


Examples of d3d11.core.ID3D11DeviceContext.IASetInputLayout()

            // Set vertex buffer
            int stride = (int) (sizeOf(Float.class) * 3);
            immediateContext.IASetVertexBuffers(0, 1, pointerToPointer(pointerTo(vertexBuffer)), pointerToInt(stride), pointerToInt(0));
           
            // Set shaders and input layout
            immediateContext.IASetInputLayout(layout);
            immediateContext.VSSetShader(pointerTo(vs), null, 0);
            immediateContext.PSSetShader(pointerTo(ps), null, 0);
           
            // Update rotation matrix for triangle
            D3DXMatrixRotationZ(pointerTo(mat), angle.addAndGet(1) * 0.01f);
 
View Full Code Here

Examples of d3d11.core.ID3D11DeviceContext.IASetInputLayout()

    ID3D10Blob code = D3DCompile(shaders, null, null, null, "VS", "vs_5_0", 0, 0);
   
    // Create input layout
    D3D11_INPUT_ELEMENT_DESC layoutDesc = new D3D11_INPUT_ELEMENT_DESC("POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0);
    final ID3D11InputLayout layout = device.CreateInputLayout(new D3D11_INPUT_ELEMENT_DESC[] { layoutDesc }, code);
    immediateContext.IASetInputLayout(layout);
   
    // Creating vertex shader
    final ID3D11VertexShader vs = device.CreateVertexShader(code, null);
    code.Release();
   
View Full Code Here

Examples of d3d11.core.ID3D11DeviceContext.IASetInputLayout()

            immediateContext.ClearRenderTargetView(pointerTo(rtView), pointerToFloats(0.0f, 0.125f, 0.3f, 1.0f));
           
            int stride = (int) (sizeOf(Float.class) * 3);
            immediateContext.IASetVertexBuffers(0, 1, pointerToPointer(pointerTo(vertexBuffer)), pointerToInt(stride), pointerToInt(0));
           
            immediateContext.IASetInputLayout(layout);
            immediateContext.VSSetShader(pointerTo(vs), null, 0);
            immediateContext.PSSetShader(pointerTo(ps), null, 0);
           
            immediateContext.IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
            immediateContext.Draw(3, 0);
View Full Code Here

Examples of d3d11.core.ID3D11DeviceContext.IASetInputLayout()

    ID3D10Blob code = D3DCompile(shaders, null, null, null, "VS", "vs_5_0", 0, 0);
   
    // Create input layout
    D3D11_INPUT_ELEMENT_DESC layoutDesc = new D3D11_INPUT_ELEMENT_DESC("POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0);
    final ID3D11InputLayout layout = device.CreateInputLayout(new D3D11_INPUT_ELEMENT_DESC[] { layoutDesc }, code);
    immediateContext.IASetInputLayout(layout);
   
    // Creating vertex shader
    final ID3D11VertexShader vs = device.CreateVertexShader(code, null);
    code.Release();
   
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.