summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsProgramRaster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsProgramRaster.cpp')
-rw-r--r--libs/rs/rsProgramRaster.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/libs/rs/rsProgramRaster.cpp b/libs/rs/rsProgramRaster.cpp
index 13887d1..66f6ef8 100644
--- a/libs/rs/rsProgramRaster.cpp
+++ b/libs/rs/rsProgramRaster.cpp
@@ -14,11 +14,17 @@
* limitations under the License.
*/
+#ifndef ANDROID_RS_BUILD_FOR_HOST
#include "rsContext.h"
-#include "rsProgramRaster.h"
-
#include <GLES/gl.h>
#include <GLES/glext.h>
+#else
+#include "rsContextHostStub.h"
+#include <OpenGL/gl.h>
+#include <OpenGl/glext.h>
+#endif //ANDROID_RS_BUILD_FOR_HOST
+
+#include "rsProgramRaster.h"
using namespace android;
using namespace android::renderscript;
@@ -76,11 +82,13 @@ void ProgramRaster::setupGL(const Context *rsc, ProgramRasterState *state)
}
if (rsc->checkVersion1_1()) {
+#ifndef ANDROID_RS_BUILD_FOR_HOST
if (mPointSprite) {
glEnable(GL_POINT_SPRITE_OES);
} else {
glDisable(GL_POINT_SPRITE_OES);
}
+#endif //ANDROID_RS_BUILD_FOR_HOST
}
}
@@ -92,7 +100,15 @@ void ProgramRaster::setupGL2(const Context *rsc, ProgramRasterState *state)
state->mLast.set(this);
}
+void ProgramRaster::serialize(OStream *stream) const
+{
+
+}
+ProgramRaster *ProgramRaster::createFromStream(Context *rsc, IStream *stream)
+{
+ return NULL;
+}
ProgramRasterState::ProgramRasterState()
{
@@ -102,7 +118,7 @@ ProgramRasterState::~ProgramRasterState()
{
}
-void ProgramRasterState::init(Context *rsc, int32_t w, int32_t h)
+void ProgramRasterState::init(Context *rsc)
{
ProgramRaster *pr = new ProgramRaster(rsc, false, false, false);
mDefault.set(pr);