diff options
Diffstat (limited to 'libs/rs/rsComponent.cpp')
-rw-r--r-- | libs/rs/rsComponent.cpp | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/libs/rs/rsComponent.cpp b/libs/rs/rsComponent.cpp index e2ae04367436..e65febb4d464 100644 --- a/libs/rs/rsComponent.cpp +++ b/libs/rs/rsComponent.cpp @@ -16,11 +16,6 @@ #include "rsComponent.h" -#ifndef ANDROID_RS_SERIALIZE -#include <GLES/gl.h> -#include <GLES2/gl2.h> -#endif - using namespace android; using namespace android::renderscript; @@ -181,40 +176,6 @@ bool Component::isReference() const { return (mType >= RS_TYPE_ELEMENT); } -uint32_t Component::getGLType() const { -#ifndef ANDROID_RS_SERIALIZE - switch (mType) { - case RS_TYPE_UNSIGNED_5_6_5: return GL_UNSIGNED_SHORT_5_6_5; - case RS_TYPE_UNSIGNED_5_5_5_1: return GL_UNSIGNED_SHORT_5_5_5_1; - case RS_TYPE_UNSIGNED_4_4_4_4: return GL_UNSIGNED_SHORT_4_4_4_4; - - //case RS_TYPE_FLOAT_16: return GL_HALF_FLOAT; - case RS_TYPE_FLOAT_32: return GL_FLOAT; - case RS_TYPE_UNSIGNED_8: return GL_UNSIGNED_BYTE; - case RS_TYPE_UNSIGNED_16: return GL_UNSIGNED_SHORT; - case RS_TYPE_SIGNED_8: return GL_BYTE; - case RS_TYPE_SIGNED_16: return GL_SHORT; - default: break; - } -#endif //ANDROID_RS_SERIALIZE - return 0; -} - -uint32_t Component::getGLFormat() const { -#ifndef ANDROID_RS_SERIALIZE - switch (mKind) { - case RS_KIND_PIXEL_L: return GL_LUMINANCE; - case RS_KIND_PIXEL_A: return GL_ALPHA; - case RS_KIND_PIXEL_LA: return GL_LUMINANCE_ALPHA; - case RS_KIND_PIXEL_RGB: return GL_RGB; - case RS_KIND_PIXEL_RGBA: return GL_RGBA; - case RS_KIND_PIXEL_DEPTH: return GL_DEPTH_COMPONENT16; - default: break; - } -#endif //ANDROID_RS_SERIALIZE - return 0; -} - String8 Component::getGLSLType() const { if (mType == RS_TYPE_SIGNED_32) { switch (mVectorSize) { @@ -244,6 +205,7 @@ String8 Component::getGLSLType() const { return String8(); } + static const char * gTypeBasicStrings[] = { "NONE", "F16", |