Ask Experts Questions for FREE Help !
Ask
    albear's Avatar
    albear Posts: 1,594, Reputation: 222
    Ultra Member
     
    #1

    Jun 25, 2012, 02:57 PM
    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.

Check out some similar questions!

C directx picking ray is not working [ 0 Answers ]

so I'm working with my picking in directx but it didn't work :/ I have no idea why. here is my code BOOL D3dDevice::Picking(HWND hWnd, LPDIRECT3DDEVICE9 d3ddev, CXFileEntity *entity, int z) { POINT ptCursor; GetCursorPos( &ptCursor ); ScreenToClient( hWnd, &ptCursor ); D3DXMATRIX...

Installing directx 9c [ 1 Answers ]

How do I install directx 9c in service pack 2

Directx upgrade [ 2 Answers ]

What would be the appropriate Microsoft-Directx download for a computer running windows 2000 professional.

Directx 7 Problems on Win 2K [ 8 Answers ]

I installed a game requiring Directx 6.0 and recommending 7.0a. Every time I try to load it to play I get an error stating "ddraw init failed" I am running Windows 2000 with NT tech. on a Pentium 2 processor. When I try installing 6.0 or 7.0a, I get a message stating those service packs are...

DirectX Help [ 2 Answers ]

I run dxdiag and it shows that direct3d is not there. I thought that it installs with directx (I have just installed the latest version from microsoft) but I seem to be wrong. I checked Microsoft help but they were no help. So, my question is where or how can I install direct3d? Thanks


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search