From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/render/state.cc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/render/state.cc') diff --git a/src/render/state.cc b/src/render/state.cc index 96c7c0a..1a345c7 100644 --- a/src/render/state.cc +++ b/src/render/state.cc @@ -1,7 +1,7 @@ /* render/state.cc - This file is part of the Osirion project and is distributed under - the terms of the GNU General Public License version 2 + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 */ #include @@ -11,7 +11,8 @@ #include "render/gl.h" #include "render/render.h" -namespace render { +namespace render +{ int State::render_width = 0; int State::render_height = 0; @@ -23,9 +24,9 @@ void State::init(int width, int height) resize(width, height); render_has_generate_mipmaps = false; - + std::string version(gl::version()); - for (size_t i =0; i < version.size(); i++) { + for (size_t i = 0; i < version.size(); i++) { if (version[i] == '.') version[i] = ' '; } @@ -54,12 +55,12 @@ void State::resize(int width, int height) { render_width = width; render_height = height; - + render_aspect = (float) width / (float) height; - + clear(); } - + void State::clear() { // set viewport @@ -80,9 +81,9 @@ void State::clear() //gl::shademodel(GL_FLAT); // color tracking - glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE); + glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE); - // material settings + // material settings GLfloat specular_reflectance[] = { 0.2f, 0.2f, 0.2f, 1.0f }; glMaterialfv(GL_FRONT, GL_SPECULAR, specular_reflectance); glMateriali(GL_FRONT, GL_SHININESS, 128); // shininess 1-128 @@ -97,7 +98,7 @@ void State::clear() gl::frontface(GL_CCW); gl::disable(GL_CULL_FACE); gl::disable(GL_DEPTH_TEST); - gl::disable(GL_BLEND); + gl::disable(GL_BLEND); gl::disable(GL_TEXTURE_2D); } -- cgit v1.2.3