aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/graphics/shaders/je_shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/graphics/shaders/je_shader.h')
-rw-r--r--src/libjin/graphics/shaders/je_shader.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/libjin/graphics/shaders/je_shader.h b/src/libjin/graphics/shaders/je_shader.h
index 9056d51..6a2db9c 100644
--- a/src/libjin/graphics/shaders/je_shader.h
+++ b/src/libjin/graphics/shaders/je_shader.h
@@ -132,7 +132,7 @@ namespace JinEngine
/// @param stride Byte offset between consecutive generic vertex attributes.
/// @param pointers Pointer to the first component of the first generic vertex attribute in the array.
///
- void uploadVertices(int n, GLenum type, GLsizei stride, const GLvoid * pointers);
+ void uploadVertices(int n, GLenum type, GLsizei stride, const GLvoid * pointers, GLboolean normalized = GL_FALSE);
///
/// Set texture UV coordinates.
@@ -142,12 +142,27 @@ namespace JinEngine
/// @param stride Byte offset between consecutive generic vertex attributes.
/// @param pointers Pointer to the first component of the first generic vertex attribute in the array.
///
- void uploadUV(int n, GLenum type, GLsizei stride, const GLvoid * pointers);
+ void uploadUV(int n, GLenum type, GLsizei stride, const GLvoid * pointers, GLboolean normalized = GL_FALSE);
+
+ ///
+ /// Upload vertex color array.
+ ///
+ void uploadColor(int n, GLenum type, GLsizei stride, const GLvoid * pointers, GLboolean normalized = GL_FALSE);
///
/// Set attribute.
///
- void uploadAttribute(const String& name, int n, GLenum type, GLsizei stride, const GLvoid * pointers);
+ void uploadAttribute(const String& name, int n, GLenum type, GLsizei stride, const GLvoid * pointers, GLboolean normalized = GL_FALSE);
+
+ ///
+ /// Reset attribute index.
+ ///
+ void beginUploadAttributes();
+
+ ///
+ /// Reset attribute index.
+ ///
+ void endUploadAttributes();
///
/// Program ID.
@@ -174,6 +189,7 @@ namespace JinEngine
GLuint mPID;
GLint mCurrentTextureUnit;
std::map<std::string, GLint> mTextureUnits;
+ GLint mAttributeIndex;
};