From b598363c9c16d9fb9a22cf7b0b6a5077dc2723e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 7 May 2012 18:58:38 +0200 Subject: [PATCH] Doc: removed unneeded indentation. --- src/AbstractShaderProgram.h | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/AbstractShaderProgram.h b/src/AbstractShaderProgram.h index e27db2fd2..c57caaf44 100644 --- a/src/AbstractShaderProgram.h +++ b/src/AbstractShaderProgram.h @@ -43,26 +43,26 @@ typedef Attribute<2, Vector2> TextureCoords; - **Constructor**, which attaches particular shaders, links the program, binds attribute locations and gets uniform locations, for example: @code - // Load shaders from file and attach them to the program - Shader* vertexShader = Shader::fromFile(Shader::Vertex, "PhongShader.vert"); - Shader* fragmentShader = Shader::fromFile(Shader::Fragment, "PhongShader.frag"); - attachShader(vertexShader); - attachShader(fragmentShader); - - // Bind attribute names to IDs - bindAttribute(Vertex::Location, "vertex"); - bindAttribute(Normal::Location, "normal"); - bindAttribute(TextureCoords::Location, "textureCoords"); - - // Link, then delete now uneeded shaders - link(); - delete vertexShader; - delete fragmentShader; - - // Get locations of uniforms - transformationMatrixUniform = uniformLocation("transformationMatrix"); - projectionMatrixUniform = uniformLocation("projectionMatrix"); - // more uniforms like light location, colors etc. +// Load shaders from file and attach them to the program +Shader* vertexShader = Shader::fromFile(Shader::Vertex, "PhongShader.vert"); +Shader* fragmentShader = Shader::fromFile(Shader::Fragment, "PhongShader.frag"); +attachShader(vertexShader); +attachShader(fragmentShader); + +// Bind attribute names to IDs +bindAttribute(Vertex::Location, "vertex"); +bindAttribute(Normal::Location, "normal"); +bindAttribute(TextureCoords::Location, "textureCoords"); + +// Link, then delete now uneeded shaders +link(); +delete vertexShader; +delete fragmentShader; + +// Get locations of uniforms +transformationMatrixUniform = uniformLocation("transformationMatrix"); +projectionMatrixUniform = uniformLocation("projectionMatrix"); +// more uniforms like light location, colors etc. @endcode - **Uniform binding functions**, which set shader uniforms using setUniform() and setUniformArray() functions. Example: