diff options
Diffstat (limited to 'libs/hwui/Program.cpp')
-rw-r--r-- | libs/hwui/Program.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp index 841b6c842f9a..6e608084f5bb 100644 --- a/libs/hwui/Program.cpp +++ b/libs/hwui/Program.cpp @@ -33,6 +33,8 @@ namespace uirenderer { #include "shaders/drawTexture.vert" #include "shaders/drawTexture.frag" +#include "shaders/drawText.frag" + #include "shaders/drawLinearGradient.vert" #include "shaders/drawLinearGradient.frag" @@ -169,6 +171,12 @@ DrawTextureProgram::DrawTextureProgram(): sampler = addUniform("sampler"); } +DrawTextureProgram::DrawTextureProgram(const char* vertex, const char* fragment): + DrawColorProgram(vertex, fragment) { + texCoords = addAttrib("texCoords"); + sampler = addUniform("sampler"); +} + void DrawTextureProgram::use() { DrawColorProgram::use(); glActiveTexture(GL_TEXTURE0); @@ -182,6 +190,14 @@ void DrawTextureProgram::remove() { } /////////////////////////////////////////////////////////////////////////////// +// Draw text +/////////////////////////////////////////////////////////////////////////////// + +DrawTextProgram::DrawTextProgram(): + DrawTextureProgram(gDrawTextureVertexShader, gDrawTextFragmentShader) { +} + +/////////////////////////////////////////////////////////////////////////////// // Draw linear gradient /////////////////////////////////////////////////////////////////////////////// |