Skip to main content
gamedev.net
🔒 Locked

Mesh Loading Problem

Started by crgkrug Jan 7, 2005 at 10:46 PM 2 replies 550+ views
Original Post
crgkrug
crgkrug
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
fproto
fproto
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.
function(prototype);
crgkrug
crgkrug
thank you very much, that worked perfectly.
Appreciate it.
fproto
fproto
np. :)
function(prototype);

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.