diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2010-10-06 11:15:01 -0700 |
|---|---|---|
| committer | Alex Sakhartchouk <alexst@google.com> | 2010-10-06 11:15:01 -0700 |
| commit | 7ffcaf20cbb115326f3d72a983835d6c314a4cef (patch) | |
| tree | dc945857ac944d2e0fb1c3a8008018533ec2c1b6 /rsProgramVertex.cpp | |
| parent | c8fb69e4a3e01501a3d38a6d3ea185e583d3f493 (diff) | |
| download | android_frameworks_rs-7ffcaf20cbb115326f3d72a983835d6c314a4cef.tar.gz android_frameworks_rs-7ffcaf20cbb115326f3d72a983835d6c314a4cef.tar.bz2 android_frameworks_rs-7ffcaf20cbb115326f3d72a983835d6c314a4cef.zip | |
changing vec4 to vec2 for perf reasons.
Change-Id: Ic885a6dc697af4fd82e184158772863673f041bd
Diffstat (limited to 'rsProgramVertex.cpp')
| -rw-r--r-- | rsProgramVertex.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rsProgramVertex.cpp b/rsProgramVertex.cpp index d3dbfb22..a785262a 100644 --- a/rsProgramVertex.cpp +++ b/rsProgramVertex.cpp @@ -242,6 +242,7 @@ ProgramVertexState::~ProgramVertexState() void ProgramVertexState::init(Context *rsc) { const Element *matrixElem = Element::create(rsc, RS_TYPE_MATRIX_4X4, RS_KIND_USER, false, 1); + const Element *f2Elem = Element::create(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 2); const Element *f3Elem = Element::create(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 3); const Element *f4Elem = Element::create(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 4); @@ -256,7 +257,7 @@ void ProgramVertexState::init(Context *rsc) rsc->mStateElement.elementBuilderAdd(f4Elem, "position", 1); rsc->mStateElement.elementBuilderAdd(f4Elem, "color", 1); rsc->mStateElement.elementBuilderAdd(f3Elem, "normal", 1); - rsc->mStateElement.elementBuilderAdd(f4Elem, "texture0", 1); + rsc->mStateElement.elementBuilderAdd(f2Elem, "texture0", 1); const Element *attrElem = rsc->mStateElement.elementBuilderCreate(rsc); Type *inputType = new Type(rsc); @@ -266,7 +267,7 @@ void ProgramVertexState::init(Context *rsc) String8 shaderString(RS_SHADER_INTERNAL); shaderString.append("varying vec4 varColor;\n"); - shaderString.append("varying vec4 varTex0;\n"); + shaderString.append("varying vec2 varTex0;\n"); shaderString.append("void main() {\n"); shaderString.append(" gl_Position = UNI_MVP * ATTRIB_position;\n"); shaderString.append(" gl_PointSize = 1.0;\n"); |
