- Timestamp:
- Oct 9, 2005, 12:11:23 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/shader.cc
r5323 r5333 283 283 } 284 284 285 285 bool Shader::checkShaderAbility() 286 { 287 if (GLEW_ARB_shader_objects && 288 GLEW_ARB_shading_language_100 && 289 GLEW_ARB_vertex_shader && 290 GLEW_ARB_fragment_shader) 291 return true; 292 else 293 return false; 294 } 286 295 287 296 void Shader::debug() const -
trunk/src/world_entities/npc2.cc
r5325 r5333 32 32 33 33 this->loadModelWithScale("models/ships/bolido.obj", 3); 34 this->shader = Shader::getShader("shaders/toon.vert", "shaders/toon.frag"); 34 this->shader = NULL; 35 if (likely(Shader::checkShaderAbility())) 36 this->shader = Shader::getShader("shaders/toon.vert", "shaders/toon.frag"); 35 37 36 38 this->obj = gluNewQuadric(); … … 85 87 86 88 if (this->shader != NULL && this->shader != Shader::getActiveShader()) 87 {88 89 shader->activateShader(); 89 }90 90 gluSphere(this->obj, 3, 10, 10); 91 //shader->deactivateShader();91 shader->deactivateShader(); 92 92 93 93
Note: See TracChangeset
for help on using the changeset viewer.