Browse Source

Renamed AbstractShaderProgram::{load -> attach}Shader().

vectorfields
Vladimír Vondruš 16 years ago
parent
commit
1d5d4ddcb4
  1. 4
      examples/triangle/IdentityShader.cpp
  2. 2
      src/AbstractShaderProgram.cpp
  3. 4
      src/AbstractShaderProgram.h

4
examples/triangle/IdentityShader.cpp

@ -21,8 +21,8 @@ IdentityShader::IdentityShader() {
Shader* vertexShader = Shader::fromFile(Shader::Vertex, "identity.vert");
Shader* fragmentShader = Shader::fromFile(Shader::Fragment, "identity.frag");
loadShader(vertexShader);
loadShader(fragmentShader);
attachShader(vertexShader);
attachShader(fragmentShader);
bindAttribute(Vertex, "vertex");
bindAttribute(Color, "color");

2
src/AbstractShaderProgram.cpp

@ -41,7 +41,7 @@ bool AbstractShaderProgram::use() {
return true;
}
bool AbstractShaderProgram::loadShader(Shader* shader) {
bool AbstractShaderProgram::attachShader(Shader* shader) {
if(!shader) return false;
GLuint _shader = shader->compile();

4
src/AbstractShaderProgram.h

@ -32,7 +32,7 @@ namespace Magnum {
This class is designed to be used via subclassing. Subclasses define these
functions and properties:
- @b Constructor, which loads particular shaders, links the program, binds
- @b Constructor, which attaches particular shaders, links the program, binds
attribute locations and gets uniform locations.
- <strong>Attribute location</strong> enum with indexes where the particular
attribute is bound, for example:
@ -103,7 +103,7 @@ class AbstractShaderProgram {
* linking.
* @note The shader should be deleted by caller after linking.
*/
bool loadShader(Shader* shader);
bool attachShader(Shader* shader);
/**
* @brief Bind attribute to given location

Loading…
Cancel
Save