Meshes are clearing out textures

dallasstar

New member
I just learned how to load a mesh into D3D, and I can get it to render the mesh properly, but the problem is that every time I load the mesh, it clears out all of the textures of the other objects in the screen (non-mesh) and everything gets the same texture as the mesh.

When I tried to use a non-textured mesh, all objects became white :bleh:.....:(


Do you guys know what I might be doing wrong?


note: I AM already using the device.settexture function before rendering the objects that need textures, so that's not the problem.
 
The only other obvious thing I can think of is that you're loading the texture into the same pointer as other textures are stored in.
I usually store all my meshes in a different class (VirtualObject) and let the class deal with its own media.
Also, are you changing any texture stage states?

btw, did you add that note after I replied or was I just blind and not noticing it?
 
fasterthanjesus said:
The only other obvious thing I can think of is that you're loading the texture into the same pointer as other textures are stored in.
I usually store all my meshes in a different class (VirtualObject) and let the class deal with its own media.
Also, are you changing any texture stage states?

btw, did you add that note after I replied or was I just blind and not noticing it?

you just weren't noticing it :)

I am not using the same object for both textures, so I know that's not the problem

I guess I'll have to come up with some strange creative solution to this problem. Thanx for trying tho :).
 
Back
Top