VBGamer |
|
RE: D3DIM Lighting Question Martin (0 replies, 0 views) (2000-Aug-27) This is in my init sub
<pre>
dev.SetRenderState D3DRENDERSTATE_AMBIENT, Dx.CreateColorRGB(0.5, 0.5, 0.5)
Call AddLights
dev.SetRenderState D3DRENDERSTATE_LIGHTING, True
dev.SetRenderState D3DRENDERSTATE_SHADEMODE, D3DSHADE_GOURAUD
</pre>
this is the addlights sub
<pre>
Private Sub AddLights()
Dim light As D3DLIGHT7
light.Ambient.a = 1
light.Ambient.r = 1
light.Ambient.g = 1
light.Ambient.b = 1
light.diffuse.a = 1
light.diffuse.r = 1
light.diffuse.g = 1
light.diffuse.b = 1
light.Position = MakeVector(10, 15, 10)
light.dltType = D3DLIGHT_POINT
dev.SetLight 0, light
dev.LightEnable 0, True
End Sub
</pre>
can you see anything missing? :) |