Permalink
Browse files

ofFbo: fix android

  • Loading branch information...
1 parent b950e7a commit 4e53c1df995b90514be86d11c760e015eb2c0839 @arturoc arturoc committed May 27, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 libs/openFrameworks/gl/ofFbo.cpp
@@ -109,7 +109,9 @@
#ifdef GL_DEPTH_COMPONENT32_OES
#define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES
#endif
- #define GL_UNSIGNED_INT GL_UNSIGNED_INT_OES
+ #ifdef TARGET_OF_IPHONE
+ #define GL_UNSIGNED_INT GL_UNSIGNED_INT_OES
+ #endif
#endif
@@ -388,13 +390,14 @@ void ofFbo::allocate(int width, int height, int internalformat, int numSamples)
settings.internalformat = internalformat;
settings.numSamples = numSamples;
-#ifdef TARGET_OS_IPHONE
+#ifdef TARGET_OPENGLES
settings.useDepth = false;
settings.useStencil = false;
+ //we do this as the fbo and the settings object it contains could be created before the user had the chance to disable or enable arb rect.
+ settings.textureTarget = GL_TEXTURE_2D;
#else
settings.useDepth = true;
settings.useStencil = true;
-
//we do this as the fbo and the settings object it contains could be created before the user had the chance to disable or enable arb rect.
settings.textureTarget = ofGetUsingArbTex() ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D;
#endif

0 comments on commit 4e53c1d

Please sign in to comment.