Skip to main content
gamedev.net
🔒 Locked

Direct3D issues...

Started by The C modest god Oct 14, 2003 at 4:54 PM 0 replies 300+ views
Original Post
The C modest god
The C modest god
I begin the scene, enable one light, draw a mesh, disable the light, enable a second light, disable the second light then end the scene. I get the mesh drawed with the first light. I begin the scene, enable one light, draw a mesh, disable the light, enable a second light, DRAW A SECOND MESH, disable the second light then end the scene. I get both the first and second mesh with the second light. Why is that? Do I have to draw in different scenes (begin and end scene) for different light configuration?
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower. Quote: Original post by Toolmaker Quote:
jollyjeffers
jollyjeffers
what you are doing should be okay... but there is potential for slip up when you use the SetLight( ) and LightEnable( ) calls...

if you are using 2 distinct lights, make sure you use the correct indices - 0 && 1 - for each call (SetLight(0) and LightEnable(0) for example)..

alternatively, you''re getting muddled across multiple frames - the first frame might be correct, but it is overwritten straight away by incorrect ones. If you "leave" light 2 enabled at the end of the frame, then it''ll also be enabled at the start of the next frame, so the next time you draw Mesh1 it''ll have the 2nd light enabled - even if you didn''t think you had...

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.