diff options
| author | Romain Guy <romainguy@google.com> | 2011-12-12 16:47:48 -0800 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2011-12-12 16:47:48 -0800 |
| commit | 3e263fac8c9c0e0fb242186b514a7af8efb40961 (patch) | |
| tree | c4333a2489886c933172a5cd271c8bda0796324a /libs/hwui/Program.h | |
| parent | 6752d0ab029a185a42e34e7a933b669e6ed19e89 (diff) | |
| download | frameworks_base-3e263fac8c9c0e0fb242186b514a7af8efb40961.zip frameworks_base-3e263fac8c9c0e0fb242186b514a7af8efb40961.tar.gz frameworks_base-3e263fac8c9c0e0fb242186b514a7af8efb40961.tar.bz2 | |
Keep shaders to render properly
I don't know who's to blame, SGX or Tegra2 but one of those two GPUs is not
following the OpenGL ES 2.0 spec.
Change-Id: I2624e0efbc9c57d571c55c8b440a5e43f08a54f2
Diffstat (limited to 'libs/hwui/Program.h')
| -rw-r--r-- | libs/hwui/Program.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h index edd1209..9e59621 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; |
