Lighting Objects in Vertex Buffer

Started by
1 comment, last by canonind 13 years, 3 months ago
Hey Guys,

I have a question about lighting. When I am using D3DXCreateTeapot function and light it using ambient and directional lighting, everything is fine. But when it comes to lighting the objects which are in my vertex buffer, it doesn't work. For example I had a cube in my vertex buffer and it appears always totally black when I use the same methods as I did with the teapot. Do I have to do something else or is there no way to light objects in the vertex buffer?

Thanks
Advertisement
Did you specify normal vectors for your vertices? They are required for lighting.
[size=2]My Projects:
[size=2]Portfolio Map for Android - Free Visual Portfolio Tracker
[size=2]Electron Flux for Android - Free Puzzle/Logic Game
No I didn't. Thanks for your reply.

This topic is closed to new replies.

Advertisement