summaryrefslogtreecommitdiff
path: root/libs/hwui/Program.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Program.h')
-rw-r--r--libs/hwui/Program.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h
index edd12093f474..9e59621eef30 100644
--- a/libs/hwui/Program.h
+++ b/libs/hwui/Program.h
@@ -33,6 +33,11 @@ namespace uirenderer {
*/
class Program {
public:
+ enum ShaderBindings {
+ kBindingPosition,
+ kBindingTexCoords
+ };
+
/**
* Creates a new program with the specified vertex and fragment
* shaders sources.
@@ -107,6 +112,11 @@ protected:
int addAttrib(const char* name);
/**
+ * Binds the specified attribute name to the specified slot.
+ */
+ int bindAttrib(const char* name, ShaderBindings bindingSlot);
+
+ /**
* Adds a uniform with the specified name.
*
* @return The OpenGL name of the uniform.
@@ -121,8 +131,10 @@ private:
*/
GLuint buildShader(const char* source, GLenum type);
- // Name of the OpenGL program
+ // Name of the OpenGL program and shaders
GLuint mProgramId;
+ GLuint mVertexShader;
+ GLuint mFragmentShader;
// Keeps track of attributes and uniforms slots
KeyedVector<const char*, int> mAttributes;