diff options
Diffstat (limited to 'libs/rs/rsComponent.cpp')
-rw-r--r-- | libs/rs/rsComponent.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/rs/rsComponent.cpp b/libs/rs/rsComponent.cpp index 81ade5d..4c4987a 100644 --- a/libs/rs/rsComponent.cpp +++ b/libs/rs/rsComponent.cpp @@ -16,10 +16,8 @@ #include "rsComponent.h" -#ifndef ANDROID_RS_BUILD_FOR_HOST +#ifndef ANDROID_RS_SERIALIZE #include <GLES/gl.h> -#else -#include <OpenGL/gl.h> #endif using namespace android; @@ -183,6 +181,7 @@ bool Component::isReference() const { } 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; @@ -196,11 +195,12 @@ uint32_t Component::getGLType() const { 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; @@ -209,6 +209,7 @@ uint32_t Component::getGLFormat() const { case RS_KIND_PIXEL_RGBA: return GL_RGBA; default: break; } +#endif //ANDROID_RS_SERIALIZE return 0; } |