From aa7d2884cb563f87294003981e03e37a1abeb961 Mon Sep 17 00:00:00 2001 From: Alex Sakhartchouk Date: Fri, 21 May 2010 12:53:13 -0700 Subject: Removed unnecessary change based on comments. Now using android utils lib. collada_to_a3d seems to work with android util libs. Integrating old changelist Changing assert to rsAssrt in VertexArray making context compile. Change-Id: I33890defa777f09253bfab630d97782359ec49d7 Added serialization code to rsLib Integrated old changelist Change-Id: Ie4746113f6d1817fbb3264f97fdddde25b779311 Added serialization code to rsLib Change-Id: Ie4746113f6d1817fbb3264f97fdddde25b779311 --- libs/rs/rsVertexArray.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'libs/rs/rsVertexArray.cpp') diff --git a/libs/rs/rsVertexArray.cpp b/libs/rs/rsVertexArray.cpp index 6c2002d..b42d1c4 100644 --- a/libs/rs/rsVertexArray.cpp +++ b/libs/rs/rsVertexArray.cpp @@ -14,10 +14,15 @@ * limitations under the License. */ +#ifndef ANDROID_RS_BUILD_FOR_HOST #include "rsContext.h" - #include #include +#else +#include "rsContextHostStub.h" +#include +#endif + using namespace android; using namespace android::renderscript; @@ -77,7 +82,7 @@ void VertexArray::clear(uint32_t n) void VertexArray::addUser(const Attrib &a, uint32_t stride) { - assert(mCount < RS_MAX_ATTRIBS); + rsAssert(mCount < RS_MAX_ATTRIBS); mAttribs[mCount].set(a); mAttribs[mCount].buffer = mActiveBuffer; mAttribs[mCount].stride = stride; @@ -87,7 +92,7 @@ void VertexArray::addUser(const Attrib &a, uint32_t stride) void VertexArray::addLegacy(uint32_t type, uint32_t size, uint32_t stride, RsDataKind kind, bool normalized, uint32_t offset) { - assert(mCount < RS_MAX_ATTRIBS); + rsAssert(mCount < RS_MAX_ATTRIBS); mAttribs[mCount].clear(); mAttribs[mCount].type = type; mAttribs[mCount].size = size; @@ -117,7 +122,9 @@ void VertexArray::setupGL(const Context *rsc, class VertexArrayState *state) con glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); +#ifndef ANDROID_RS_BUILD_FOR_HOST // GLES only glDisableClientState(GL_POINT_SIZE_ARRAY_OES); +#endif //ANDROID_RS_BUILD_FOR_HOST for (uint32_t ct=0; ct < mCount; ct++) { switch(mAttribs[ct].kind) { @@ -160,7 +167,7 @@ void VertexArray::setupGL(const Context *rsc, class VertexArrayState *state) con mAttribs[ct].stride, (void *)mAttribs[ct].offset); break; - +#ifndef ANDROID_RS_BUILD_FOR_HOST // GLES only case RS_KIND_POINT_SIZE: //logAttrib(POINT_SIZE); glEnableClientState(GL_POINT_SIZE_ARRAY_OES); @@ -169,6 +176,7 @@ void VertexArray::setupGL(const Context *rsc, class VertexArrayState *state) con mAttribs[ct].stride, (void *)mAttribs[ct].offset); break; +#endif //ANDROID_RS_BUILD_FOR_HOST default: rsAssert(0); -- cgit v1.1