Archived

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

Kaviar

Problem with light in Jim Adams RPG book

Recommended Posts

I only get the ambient light to work and nothing happens if I try to use directional/point/spot Init { m_Graphics.EnableLighting(TRUE); m_Graphics.SetAmbientLight(50,50,50); m_Light.SetRange(1000.0f); } render { m_Light.Move(player->XPos, player->YPos+600.0f, player->ZPos); m_Graphics.SetLight(0, &m_Light); m_Graphics.EnableLight(0, TRUE); } How hard should it be to get the light to work? Does the x file need to contain info about the normals or is that figured out in the code? since I can''t find anything about D3DFVF_NORMAL but I do find m_VertexFVF = LoadMesh->GetFVF(); /thanks

Share this post


Link to post
Share on other sites