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.
diff --git a/libs/rs/rsVertexArray.cpp b/libs/rs/rsVertexArray.cpp
index 34d42ed..2ba0ef9 100644
--- a/libs/rs/rsVertexArray.cpp
+++ b/libs/rs/rsVertexArray.cpp
@@ -96,15 +96,16 @@
}
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 @@
} 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 @@
rsAssert(ct);
}
}
+ rsc->checkError("VertexArray::setupGL2");
}
////////////////////////////////////////////