From d20adb868fe02e9e7aa8a262b3cd4c5dd01d5eea Mon Sep 17 00:00:00 2001 From: Evan Goers Date: Tue, 24 Jan 2012 04:36:42 +0000 Subject: Got rid of r_diffuse/r_specular/r_ambient. --- src/render/draw.cc | 8 ++++---- src/render/render.cc | 13 ------------- src/render/render.h | 6 ------ 3 files changed, 4 insertions(+), 23 deletions(-) (limited to 'src/render') diff --git a/src/render/draw.cc b/src/render/draw.cc index f60ba1a..e40e3cc 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -90,7 +90,7 @@ void pass_prepare(float seconds) // zone ambient light GLfloat zone_ambient[4]; for (size_t i = 0; i < 3; i++) { - zone_ambient[i] = core::localplayer()->zone()->ambient_color()[i] * r_ambient->value(); + zone_ambient[i] = core::localplayer()->zone()->ambient_color()[i]; } zone_ambient[3] = 1.0f; glLightModelfv(GL_LIGHT_MODEL_AMBIENT, zone_ambient); @@ -123,9 +123,9 @@ void pass_prepare(float seconds) for (size_t i = 0; i < 3; i++) { zone_light[i] = globe->location()[i]; zone_color[i] = globe->color()[i]; - ambient_light[i] = globe->color()[i] * (r_ambient->value() * 0.1); - diffuse_light[i] = globe->color()[i] * (r_diffuse->value() * 0.8); - specular_light[i] = globe->color()[i] * (r_specular->value() * 0.4); + ambient_light[i] = globe->color()[i] * 0.1; + diffuse_light[i] = globe->color()[i] * 0.8; + specular_light[i] = globe->color()[i] * 0.4; } zone_light[3] = 1.0f; ambient_light[3] = 1.0f; diff --git a/src/render/render.cc b/src/render/render.cc index dae1cf5..45d3fda 100644 --- a/src/render/render.cc +++ b/src/render/render.cc @@ -41,10 +41,6 @@ core::Cvar *r_physics = 0; core::Cvar *r_normals = 0; core::Cvar *r_normalize = 0; -core::Cvar *r_ambient = 0; -core::Cvar *r_diffuse = 0; -core::Cvar *r_specular = 0; - void func_list_textures(std::string const &args) { Textures::list(); @@ -102,15 +98,6 @@ void init(int width, int height) r_lights = core::Cvar::get("r_lights", "1", core::Cvar::Archive); r_lights->set_info("[bool] render lights"); - r_ambient = core::Cvar::get("r_ambient", "1.0", core::Cvar::Archive); - r_ambient->set_info("[float] ambient light intensity"); - - r_diffuse = core::Cvar::get("r_diffuse", "1.0", core::Cvar::Archive); - r_diffuse->set_info("[float] diffuse light intensity"); - - r_specular = core::Cvar::get("r_specular", "1.0", core::Cvar::Archive); - r_specular->set_info("[float] specular light intensity"); - r_physics = core::Cvar::get("r_physics", "0", core::Cvar::Archive); r_physics->set_info("[bool] render physics (local game only)"); diff --git a/src/render/render.h b/src/render/render.h index 53a40dc..2162457 100644 --- a/src/render/render.h +++ b/src/render/render.h @@ -67,12 +67,6 @@ extern core::Cvar *r_physics; extern core::Cvar *r_mipmap; /// use GL_NORMALIZE instead of GL_RESCALE_NORMAL extern core::Cvar *r_normalize; -/// ambient light intensity -extern core::Cvar *r_ambient; -/// diffuse light intensity -extern core::Cvar *r_diffuse; -/// specular light intensity -extern core::Cvar *r_specular; inline RenderExt *ext_render(const core::Entity *entity) { -- cgit v1.2.3