Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Direct3D mesh problem...

This topic is 5325 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

I''m getting a really strange problem. I''m rendering two objects, a mesh and an index buffer (both have different textures). But, for some reason, the index buffer object has just a black texture, although if I just comment out ''m_mesh->DrawSubset(i);'' the texture displays fine on the index buffer objects. I am not apply material propertise to either, and I also have lighting disabled. Changing the order that I render the objects doesn''t help. Does rendering a mesh set any states that I''m not aware of? regards, bangz. http://www.bangz.co.uk

Share this post

Link to post
Share on other sites
Could you post your render code? It should look something like this:

for(DWORD i = 0; i < dwNumMaterials; i++)
m_pd3dDevice->SetTexture(0,pMeshTextures[ i ]);

m_pd3dDevice->SetTexture(0, pTexture);


[edited by - neneboricua19 on February 26, 2004 11:52:08 PM]

Share this post

Link to post
Share on other sites
Ahhh, cheers!

Your code reminded me that I wasn''t setting m_pd3dDevice->SetFVF(....); when I rendered my index buffer. Obviously when rendering the mesh it will change the vertex format. Doh!


Share this post

Link to post
Share on other sites

  • 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!