Jump to content
  • Advertisement
Sign in to follow this  

[.net] ID3D10Mesh cant draw every thing or misses some thing.

This topic is 3484 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

o7 i am currently developing a mesh loding class for me to use when i need one! but! there is a problem, the problem is that my mesh renders only some triangle, and messed up? ea. for exp this code gives me one triangel. wich should give me a quad.
vertexData[0].vtxPos = D3DXVECTOR3(1.0f,1.0f,0.0f); 
vertexData[1].vtxPos = D3DXVECTOR3(-1.0f,1.0f,0.0f); 
vertexData[2].vtxPos = D3DXVECTOR3(1.0f,-1.0f,0.0f); 
vertexData[3].vtxPos = D3DXVECTOR3(-1.0f,-1.0f,0.0f); 
and i cant understand why, or wich code to post, so you have to ask about it or come with sugestions. oh yeah, you can have my drawing code!
void DX10Mesh::Render(D3DXMATRIX cView, D3DXMATRIX cProj,DirectX10Device d3d) 
    D3D10_TECHNIQUE_DESC techDesc; 
    g_pTechnique->GetDesc( &techDesc );  
    D3DXMATRIX mWorld; 
    D3DXMATRIX mTemp; 
    ID3D10EffectMatrixVariable* mtWorld; 
    mtWorld = g_Effect->GetVariableByName("WorldViewProjection")->AsMatrix(); 
    for( UINT p = 0; p < techDesc.Passes; p++ ) 
        //apply technique 
        g_pTechnique->GetPassByIndex( p )->Apply( 0 ); 
if that help! and here is my index data { 0,1,2 2,1,3 } <-- not coded like that just wrote em so you can understand how they are placed. i am loading the vertexdata and the vertexIndex from a file on the HD thrue the typical fstream type. coverting the input to some floats and ints and there you go, the mesh is set and it is nothing wrong with the vertexdata since it got every thing it should and the mesh allso contains all the vertexdata it should.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!