summaryrefslogtreecommitdiff
path: root/rsComponent.cpp
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-01-28 09:31:47 -0800
committerAlex Sakhartchouk <alexst@google.com>2011-01-31 12:38:34 -0800
commit099d7d33e55afeb3399f6e8cf8d665223ca94939 (patch)
tree77eec1faec127f665d70cc1d058ab3abb7d7c8f0 /rsComponent.cpp
parent6b3422f3d011aa4e20e202a62c358d099074e96d (diff)
downloadrs-099d7d33e55afeb3399f6e8cf8d665223ca94939.tar.gz
Making sure we can build libRS on the host for serialization.
Change-Id: If0a5d77b20c0e1e2d124fa0737643a5dd1d4409a
Diffstat (limited to 'rsComponent.cpp')
-rw-r--r--rsComponent.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/rsComponent.cpp b/rsComponent.cpp
index 81ade5d4..cb3caf80 100644
--- a/rsComponent.cpp
+++ b/rsComponent.cpp
@@ -18,8 +18,6 @@
#ifndef ANDROID_RS_BUILD_FOR_HOST
#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_BUILD_FOR_HOST
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_BUILD_FOR_HOST
return 0;
}
uint32_t Component::getGLFormat() const {
+#ifndef ANDROID_RS_BUILD_FOR_HOST
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_BUILD_FOR_HOST
return 0;
}