diff options
author | Johannes Schickel | 2016-03-04 00:14:22 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-03-16 20:29:31 +0100 |
commit | 39100b613272523c2e36be213cc827857a08f824 (patch) | |
tree | 975c372986e91cd3f5f35b506e674466eb321fb6 /backends/graphics/opengl/shader.h | |
parent | baca885cfce10acaa7a9892133aaa5b82c7183f7 (diff) | |
download | scummvm-rg350-39100b613272523c2e36be213cc827857a08f824.tar.gz scummvm-rg350-39100b613272523c2e36be213cc827857a08f824.tar.bz2 scummvm-rg350-39100b613272523c2e36be213cc827857a08f824.zip |
OPENGL: Do not hardcode any uniform/attribute handling in Shader.
Diffstat (limited to 'backends/graphics/opengl/shader.h')
-rw-r--r-- | backends/graphics/opengl/shader.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/backends/graphics/opengl/shader.h b/backends/graphics/opengl/shader.h index 1aee8ed681..f219861244 100644 --- a/backends/graphics/opengl/shader.h +++ b/backends/graphics/opengl/shader.h @@ -33,12 +33,6 @@ namespace OpenGL { -enum { - kPositionAttribLocation = 0, - kTexCoordAttribLocation = 1, - kColorAttribLocation = 2 -}; - /** * A generic uniform value interface for a shader program. */ @@ -127,6 +121,14 @@ public: void deactivate(); /** + * Return location for attribute with given name. + * + * @param name Name of the attribute to look up in the shader. + * @return The loctaion of -1 if attribute was not found. + */ + GLint getAttributeLocation(const char *name) const; + + /** * Return location for uniform with given name. * * @param name Name of the uniform to look up in the shader. |