Jump to content
  • Advertisement
Sign in to follow this  
crgkrug

Mesh Loading Problem

This topic is 4972 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 pretty new to direct development and have run into a problem that I can't pinpoint. When I load a mesh object with a sample program and the sample framework included with the 9.0 sdk, the mesh looks fine and the materials are smooth. But when I load the same mesh into a program that a wrote from scratch without the sample framework, the mesh materials appear distorted or with blocks and are not clear. Below are links to the two different images. The first is the good one. The second is bad one. Any help would be greatly appreciated. http://summitinnovations.com/downloads/good.JPG http://summitinnovations.com/downloads/bad.JPG

Share this post


Link to post
Share on other sites
Advertisement
Texture filters.

device->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR ); // texture sizing operations
device->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
device->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR ); // texture smoothing operations

Add that to your initialization code.
That should do it.
Of course you can change the D3DTEXF_LINEAR to whatever suits you, and
also you can change the 0 to whatever texture pass you're on.

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!