mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 15:48:09 -05:00
Fix default light position
This commit is contained in:
parent
c9db98c4c3
commit
57589c082c
1 changed files with 3 additions and 3 deletions
|
@ -137,8 +137,8 @@ BOOL LegoView1::Create(const TglSurface::CreateStruct& rCreateStruct, Tgl::Rende
|
||||||
pRenderer->CreateLight(Tgl::Directional, g_directionalLightRGB, g_directionalLightRGB, g_directionalLightRGB);
|
pRenderer->CreateLight(Tgl::Directional, g_directionalLightRGB, g_directionalLightRGB, g_directionalLightRGB);
|
||||||
m_pAmbientLight = pRenderer->CreateLight(Tgl::Ambient, g_ambientLightRGB, g_ambientLightRGB, g_ambientLightRGB);
|
m_pAmbientLight = pRenderer->CreateLight(Tgl::Ambient, g_ambientLightRGB, g_ambientLightRGB, g_ambientLightRGB);
|
||||||
|
|
||||||
Mx3DPointFloat direction(0.0, 0.0, 0.0);
|
Mx3DPointFloat position(0.0, 0.0, 0.0);
|
||||||
Mx3DPointFloat position(0.0, -1.0, 0.0);
|
Mx3DPointFloat direction(0.0, -1.0, 0.0);
|
||||||
Mx3DPointFloat up(1.0, 0.0, 0.0);
|
Mx3DPointFloat up(1.0, 0.0, 0.0);
|
||||||
|
|
||||||
Tgl::FloatMatrix4 matrix;
|
Tgl::FloatMatrix4 matrix;
|
||||||
|
@ -149,7 +149,7 @@ BOOL LegoView1::Create(const TglSurface::CreateStruct& rCreateStruct, Tgl::Rende
|
||||||
SETMAT4(in, transform);
|
SETMAT4(in, transform);
|
||||||
m_pDirectionalLight->SetTransformation(matrix);
|
m_pDirectionalLight->SetTransformation(matrix);
|
||||||
|
|
||||||
direction[0] = 0, direction[1] = 150, direction[2] = -150;
|
position[0] = 0, position[1] = 150, position[2] = -150;
|
||||||
CalcLocalTransform(position, direction, up, transform);
|
CalcLocalTransform(position, direction, up, transform);
|
||||||
SETMAT4(in, transform);
|
SETMAT4(in, transform);
|
||||||
m_pSunLight->SetTransformation(matrix);
|
m_pSunLight->SetTransformation(matrix);
|
||||||
|
|
Loading…
Reference in a new issue