diff options
| author | 2009-12-23 14:35:29 -0800 | |
|---|---|---|
| committer | 2009-12-23 14:35:29 -0800 | |
| commit | 718cd1f322ee5b62b6a49cb36195bcb18a5ab711 (patch) | |
| tree | f2f8c9db5a8141eafa2f1547634d7586fdc6ef04 /libs/rs/rsContext.cpp | |
| parent | ceedafacdb87307234c84196a12eeb6e657d6220 (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/rsContext.cpp')
| -rw-r--r-- | libs/rs/rsContext.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 8f56efa28e71..11f26b9cb56e 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -142,6 +142,13 @@ uint32_t Context::runScript(Script *s, uint32_t launchID) return ret; } +void Context::checkError(const char *msg) const +{ + GLenum err = glGetError(); + if (err != GL_NO_ERROR) { + LOGE("GL Error, 0x%x, from %s", err, msg); + } +} uint32_t Context::runRootScript() { @@ -169,11 +176,7 @@ uint32_t Context::runRootScript() mStateFragmentStore.mLast.clear(); uint32_t ret = runScript(mRootScript.get(), 0); - GLenum err = glGetError(); - if (err != GL_NO_ERROR) { - LOGE("Pending GL Error, 0x%x", err); - } - + checkError("runRootScript"); return ret; } @@ -340,10 +343,6 @@ void * Context::threadProc(void *vrsc) rsc->mObjDestroy.mNeedToEmpty = true; rsc->objDestroyOOBRun(); - glClearColor(0,0,0,0); - glClear(GL_COLOR_BUFFER_BIT); - eglSwapBuffers(rsc->mEGL.mDisplay, rsc->mEGL.mSurface); - pthread_mutex_lock(&gInitMutex); rsc->deinitEGL(); pthread_mutex_unlock(&gInitMutex); |