Jump to content
  • Advertisement
Sign in to follow this  
FocusedWolf

Trouble with a book's sample's mesh...it renders white...but it has color info?

This topic is 4920 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 reading this book "Sams Managed DirectX 9 Kick Start Graphics And Game Programming" And in the chapter 6 example...which is a 3d car game. The car .X file renders as plain white, textureless i believe. However, when i view the mesh in the sdk "Mesh Viewer" program it is fully colored. I have two questions...first is how do i get this thing to render the embeded color info (my stock LoadMesh function doesn't consider it a material or something), and second what kind of .X file is this...or the name of the technique that embeds the color information. here's the .X file http://web.njit.edu/~jah4/car.x

Share this post


Link to post
Share on other sites
Advertisement
Close! i get this feeling this happend to you to :P

anyway...i figured it out...this is sorta my old vid cards fault.

If i run the authors completed version of the sample, the car is white...when inspecting the line where he checks if the device supports directional lights, he also makes sure MaxActiveLights is > 1. I guess my card is pretty old cause it returns -1...i'm not sure... anyway i took out the max lights check cause my card doesn't crash when i use a light so it must support some amount of lights...and done. the car is colored :P

Another thing...if i comment out the lights and do this: device.RenderState.Lighting = false;

the car is white...but the road is colored like before...i asked some other people and they said something like it calculates the color from the lights or something...anyway problem solved.

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!