mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 10:19:55 +02:00
- small change to the view co-ordinates of shadows
This commit is contained in:
@@ -2720,7 +2720,9 @@ void Renderer::renderShadowsToTexture(const int renderFps){
|
|||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
if(game->getGameCamera()->getState()==GameCamera::sGame){
|
if(game->getGameCamera()->getState()==GameCamera::sGame){
|
||||||
glOrtho(-35, 5, -15, 15, -1000, 1000);
|
//glOrtho(-35, 5, -15, 15, -1000, 1000);
|
||||||
|
//glOrtho(-30, 30, -20, 20, -1000, 1000);
|
||||||
|
glOrtho(-30, 5, -20, 20, -1000, 1000);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
glOrtho(-30, 30, -20, 20, -1000, 1000);
|
glOrtho(-30, 30, -20, 20, -1000, 1000);
|
||||||
@@ -2738,7 +2740,6 @@ void Renderer::renderShadowsToTexture(const int renderFps){
|
|||||||
const Vec3f &pos= game->getGameCamera()->getPos();
|
const Vec3f &pos= game->getGameCamera()->getPos();
|
||||||
|
|
||||||
glTranslatef(static_cast<int>(-pos.x), 0, static_cast<int>(-pos.z));
|
glTranslatef(static_cast<int>(-pos.x), 0, static_cast<int>(-pos.z));
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//non directional light
|
//non directional light
|
||||||
@@ -2747,7 +2748,10 @@ void Renderer::renderShadowsToTexture(const int renderFps){
|
|||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
gluPerspective(150, 1.f, perspNearPlane, perspFarPlane);
|
gluPerspective(perspFov, 1.f, perspNearPlane, perspFarPlane);
|
||||||
|
//const Metrics &metrics= Metrics::getInstance();
|
||||||
|
//gluPerspective(perspFov, metrics.getAspectRatio(), perspNearPlane, perspFarPlane);
|
||||||
|
|
||||||
|
|
||||||
//push modelview
|
//push modelview
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
Reference in New Issue
Block a user