- Timestamp:
- Jun 6, 2006, 6:34:22 PM (18 years ago)
- Location:
- branches/atmospheric_engine/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/shader.cc
r7221 r8176 220 220 } 221 221 222 void Shader::bindShader(const char* name, const float* value, size_t size) 223 { 224 if (likely (this->shaderProgram != 0)) { 225 glUseProgramObjectARB(this->shaderProgram); 226 227 unsigned int location = glGetUniformLocationARB(this->shaderProgram, name); 228 /* This is EXPENSIVE and should be avoided. */ 229 230 if (size == 1) glUniform1fvARB(location, 1, value); 231 else if (size == 2) glUniform2fvARB(location, 1, value); 232 else if (size == 3) glUniform3fvARB(location, 1, value); 233 else if (size == 4) glUniform4fvARB(location, 1, value); 234 else if (size == 9) glUniformMatrix3fvARB(location, 1, false, value); 235 else if (size == 16) glUniformMatrix4fvARB(location, 1, false, value); 236 237 } 238 } 239 222 240 void Shader::deactivateShader() 223 241 { -
branches/atmospheric_engine/src/lib/graphics/shader.h
r7785 r8176 34 34 bool loadShaderProgramm(SHADER_TYPE type, const std::string& fileName); 35 35 void activateShader(); 36 void bindShader(const char* name, const float* value, size_t size); 36 37 static void deactivateShader(); 37 38 void deleteProgram(SHADER_TYPE type); -
branches/atmospheric_engine/src/world_entities/effects/billboard.cc
r8050 r8176 92 92 this->sizeY = sizeY; 93 93 94 PRINTF(0)("sizeX: %f sizeY: %f ", sizeX, sizeY);94 PRINTF(0)("sizeX: %f sizeY: %f\n", sizeX, sizeY); 95 95 } 96 96
Note: See TracChangeset
for help on using the changeset viewer.