Using pre-lit vertices in D3D 7

Started by
1 comment, last by Cthulhu 24 years, 5 months ago
Disable D3D's lighting engine by setting D3DRENDERSTATE_LIGHTING to FALSE.
Advertisement
I want to draw triangles that consist of D3DLVERTEX'es (pre-lit but untransformed). I'm having problems with lighting, I can't draw triangles with different colored vertices (whole triangle will be gouraud shaded with those colors, of course). Only color applied to triangles is ambient lighting color. If it's 0, the triangle is black.

I've tried to assign different values and 0's to different lighting settings (material, ambient, vertex diffuse and specular). I'm using D3DFVF_LVERTEX as vertex type when calling DrawPrimitive(), is that ok?

Strange thing is I can draw triangles with per-vertex lighting with D3DLTVERTEX'es but I don't want to do transformations myself. Please help!

------------------
"Tank, I need an exit. Fast!"

Thank you! I was instead checking it was TRUE ;D

------------------
"Tank, I need an exit. Fast!"

This topic is closed to new replies.

Advertisement