summaryrefslogtreecommitdiff
path: root/libs/rs/rsVertexArray.cpp
diff options
context:
space:
mode:
author Jason Sams <rjsams@android.com> 2009-12-23 14:35:29 -0800
committer Jason Sams <rjsams@android.com> 2009-12-23 14:35:29 -0800
commit718cd1f322ee5b62b6a49cb36195bcb18a5ab711 (patch)
treef2f8c9db5a8141eafa2f1547634d7586fdc6ef04 /libs/rs/rsVertexArray.cpp
parentceedafacdb87307234c84196a12eeb6e657d6220 (diff)
Element restructuring. Add support for new basic Element types including the RS objects and vectors(2-4). In theory this paves the way for maintaining type info for RS objects, passing elements for GLSL uiforms/attribs/varyings, and supporting nested structures.
This will break some apps, checkings for other projects will follow to unbreak them.
Diffstat (limited to 'libs/rs/rsVertexArray.cpp')
-rw-r--r--libs/rs/rsVertexArray.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/rs/rsVertexArray.cpp b/libs/rs/rsVertexArray.cpp
index 34d42ed8b01e..2ba0ef96c5e0 100644
--- a/libs/rs/rsVertexArray.cpp
+++ b/libs/rs/rsVertexArray.cpp
@@ -96,15 +96,16 @@ void VertexArray::setTexture(uint32_t size, uint32_t type, uint32_t stride, uint
}
void VertexArray::logAttrib(uint32_t idx) const {
- LOGE("va %i: buf=%i size=%i type=0x%x stride=0x%x offset=0x%x", idx,
+ LOGE("va %i: buf=%i size=%i type=0x%x stride=0x%x norm=%i offset=0x%x", idx,
mAttribs[idx].buffer,
mAttribs[idx].size,
mAttribs[idx].type,
mAttribs[idx].stride,
+ mAttribs[idx].normalized,
mAttribs[idx].offset);
}
-void VertexArray::setupGL(class VertexArrayState *state) const
+void VertexArray::setupGL(const Context *rsc, class VertexArrayState *state) const
{
if (mAttribs[POSITION].size) {
//logAttrib(POSITION);
@@ -168,9 +169,10 @@ void VertexArray::setupGL(class VertexArrayState *state) const
} else {
glDisableClientState(GL_POINT_SIZE_ARRAY_OES);
}
+ rsc->checkError("VertexArray::setupGL");
}
-void VertexArray::setupGL2(class VertexArrayState *state, ShaderCache *sc) const
+void VertexArray::setupGL2(const Context *rsc, class VertexArrayState *state, ShaderCache *sc) const
{
for (int ct=1; ct < _LAST; ct++) {
glDisableVertexAttribArray(ct);
@@ -194,6 +196,7 @@ void VertexArray::setupGL2(class VertexArrayState *state, ShaderCache *sc) const
rsAssert(ct);
}
}
+ rsc->checkError("VertexArray::setupGL2");
}
////////////////////////////////////////////