Archived

This topic is now archived and is closed to further replies.

Direct3D issues...

This topic is 5179 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 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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites