Sign in to follow this  

problem with textures + lighting

This topic is 3633 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 had a mini 3D world, 2 textured boxes, and a floor. but when i finished implementing the lighting and materials, i finally got the lights to work, but now the textures don't show. i'm wondering if it has anything to do with the order i set my FVF in , it goes XYZ|texture|normal and i'm wondering if the normal should go before the texture? if anyone has any idea if this is the problem, or on any other solutions, it'd help alot, thanks.

Share this post


Link to post
Share on other sites
"order i set my FVF in , it goes XYZ|texture|normal "

Have you set your vertx struct data in the same order as your FVF?
eg. for that FVF i think you would have something like:

struct Vertex
{
float x, y, z;//cooords
float u, v; // tex coords
float nx, ny, nz; //normals
}

PS: plz correct me if im wrong.

Share this post


Link to post
Share on other sites
No. Bitwise OR is independant of order. A | B is exactly the same as B | A.

However, vertices declared with FVF's do have to be in a certain order. There's an image somewhere that showed the required order. It used to be in the DirectX SDK documentation, but I think they removed it for some reason.

Share this post


Link to post
Share on other sites

This topic is 3633 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this