#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/math/rect.h>
#include <dali/public-api/math/vector4.h>
+#include <dali/public-api/rendering/renderer.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/gl-abstraction.h>
#include <dali/integration-api/gl-defines.h>
-#include <dali/devel-api/rendering/renderer.h>
#include <dali/internal/render/common/performance-monitor.h>
#include <dali/internal/render/gl-resources/texture-units.h>
#include <dali/internal/render/gl-resources/frame-buffer-state-cache.h>
}
/**
+ * Wrapper for OpenGL ES 2.0 glBindTexture( target )
+ */
+ void BindTexture( int target, GLuint texture )
+ {
+ if (mBound2dTextureId[ mActiveTextureUnit ] != texture)
+ {
+ mBound2dTextureId[ mActiveTextureUnit ] = texture;
+
+ LOG_GL("BindTexture target(%d) %d\n", target, texture);
+ CHECK_GL( mGlAbstraction, mGlAbstraction.BindTexture(target, texture) );
+ }
+ }
+
+ /**
* Wrapper for OpenGL ES 2.0 glBindTexture(GL_TEXTURE_CUBE_MAP)
*/
void BindCubeMapTexture( GLuint texture )
*/
void DepthMask(GLboolean flag)
{
+ bool booleanFlag = flag != GL_FALSE;
// only change state if needed
- if( flag != mDepthMaskEnabled )
+ if( booleanFlag != mDepthMaskEnabled )
{
- mDepthMaskEnabled = flag;
- LOG_GL("DepthMask %s\n", flag ? "True" : "False");
+ mDepthMaskEnabled = booleanFlag;
+ LOG_GL("DepthMask %s\n", booleanFlag ? "True" : "False");
CHECK_GL( mGlAbstraction, mGlAbstraction.DepthMask( mDepthMaskEnabled ) );
}
}