- added new ini entry for totalnoob to try to see if it fixes his stick trees?

PerspectiveFarPlane=1000
is what he should try when using this svn version
This commit is contained in:
Mark Vejvoda 2011-05-01 22:48:44 +00:00
parent c8bb5e6fce
commit fb79bce5ab
3 changed files with 6 additions and 7 deletions

View File

@ -128,7 +128,7 @@ const float Renderer::magicCircleRadius= 1.f;
const float Renderer::perspFov= 60.f;
const float Renderer::perspNearPlane= 1.f;
//const float Renderer::perspFarPlane= 50.f;
const float Renderer::perspFarPlane= 1000000.f;
float Renderer::perspFarPlane= 1000000.f;
const float Renderer::ambFactor= 0.7f;
const Vec4f Renderer::fowColor= Vec4f(0.0f, 0.0f, 0.0f, 1.0f);
@ -180,9 +180,12 @@ Renderer::Renderer() {
FactoryRepository &fr= FactoryRepository::getInstance();
Config &config= Config::getInstance();
Renderer::perspFarPlane = config.getFloat("PerspectiveFarPlane",floatToStr(Renderer::perspFarPlane).c_str());
this->no2DMouseRendering = config.getBool("No2DMouseRendering","false");
this->maxConsoleLines= config.getInt("ConsoleMaxLines");
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Renderer::perspFarPlane [%f] this->no2DMouseRendering [%d] this->maxConsoleLines [%d]\n",__FILE__,__FUNCTION__,__LINE__,Renderer::perspFarPlane,this->no2DMouseRendering,this->maxConsoleLines);
gi.setFactory(fr.getGraphicsFactory(config.getString("FactoryGraphics")));
GraphicsFactory *graphicsFactory= GraphicsInterface::getInstance().getFactory();

View File

@ -173,7 +173,7 @@ public:
//perspective values
static const float perspFov;
static const float perspNearPlane;
static const float perspFarPlane;
static float perspFarPlane;
//default values
static const float ambFactor;

View File

@ -59,8 +59,6 @@ void ModelRendererGl::begin(bool renderNormals, bool renderTextures, bool render
glEnable(GL_BLEND);
glEnable(GL_POLYGON_OFFSET_FILL);
//glEnable(GL_POLYGON_OFFSET_LINE);
//glEnable(GL_POLYGON_OFFSET_POINT);
glPolygonOffset(0.005f, 0.0f);
glEnableClientState(GL_VERTEX_ARRAY);
@ -96,8 +94,6 @@ void ModelRendererGl::end() {
glPolygonOffset( 0.0f, 0.0f );
glDisable(GL_POLYGON_OFFSET_FILL);
//glDisable(GL_POLYGON_OFFSET_LINE);
//glDisable(GL_POLYGON_OFFSET_POINT);
//pop
glPopAttrib();
@ -147,7 +143,7 @@ void ModelRendererGl::renderMesh(Mesh *mesh) {
//assertions
assertGl();
glPolygonOffset(0.05f, 0.0f);
//glPolygonOffset(0.05f, 0.0f);
//set cull face
if(mesh->getTwoSided()) {
glDisable(GL_CULL_FACE);