Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Programming (https://www.askmehelpdesk.com/forumdisplay.php?f=437)
-   -   DirectX 10, HLSL, no picture displaying (https://www.askmehelpdesk.com/showthread.php?t=675154)

  • Jun 25, 2012, 02:57 PM
    albear
    DirectX 10, HLSL, no picture displaying
    Im following some tutorials for creating 3D graphics using DirectX10

    but I'm up to a point where I'm supposed to have a 3D rotating cube(*) but when I compile it all that displays is a window and I can't seem to figure out what I'm missing or what I've done wrong.

    there is a stage which states:

    o If you do not get C++ compilation errors but no picture is displayed when you run the program, you should check that the statement for displaying the backbuffer is in your code for the D3DApplication::render() function (as instructed in 2.2.4), you should also check that the shaders actually compile at run-time. For example, shaders may fail to compile when the shader profiles (as specified in 2.1.1(c) for example) are not appropriate for your platform or have been deprecated.

    now I'm pretty sure I've called the render function in the right place:

    void D3DApplication::render()
    {
    // Clear the back buffer
    float ClearColor[4] = { 0.0f, 0.125f, 0.3f, 1.0f }; // red,green,blue,alpha
    m_pd3dDevice->ClearRenderTargetView( m_pRenderTargetView, ClearColor );

    // Set update matrices of transformation pipeline
    setTransfPipe();

    // Render graphics object
    m_threeDobject.render();

    // Present back buffer to front buffer
    m_pSwapChain->Present( 0, 0 );
    }

    Ive tried moving the render call to different parts of the method but it hasn't caused any change, and I've tried changing the camera position and making sure its pointed at where the cube should be.

    (* or so I believe as I've looked at the next tutorial and it says I should have a spinning cube being displayed after completing the previous tutorial))

    I know its not as much information as you'd like but I don't know which parts to post so that you could get a better understanding of the layout(without posting the entire project).

    but I will post more segments if you want them or would like to check them.

    Any help would be greatly appreciated, thanks.

  • All times are GMT -7. The time now is 11:35 PM.