Hello,
I've tried to resolve a strange bug in the ShadowMap sample (maybe in others samples using FrameBuffer) about for checking the framebuffer status.
In Scene.cpp ({Adreno_SDK_path}/Samples/OpenGL ES/ShadowMap/):
//-------------------------------------------------------------------------------------- // Name: CheckFrameBufferStatus() // Desc: //-------------------------------------------------------------------------------------- VOID CSample::CheckFrameBufferStatus() { // PGG July 26th 2011 NOTE: On Android (MSM866) the gl function below crashes the application #if 0 GLenum nStatus; nStatus = glCheckFramebufferStatus(GL_FRAMEBUFFER); switch( nStatus ) { ... } #endif }
To solve this this bug, i used a bool flag to know if the application has been already "initialized".
It's seems that the Resize() function has been called before the Initialize() function, maybe a problem with the scheduling calling functions ((i don't investigate on this).
CSample::CSample( const CHAR* strName ) : CFrmApplication( strName ) { ... m_bInitialized = false; } BOOL CSample::Initialize() { m_bInitialized = true; } BOOL CSample::Resize() { if (m_bInitialized) { ... } } VOID CSample::CheckFrameBufferStatus() { #if 1 GLenum nStatus; nStatus = glCheckFramebufferStatus(GL_FRAMEBUFFER); // no problem now :-D ... #endif }
That's it !
YoooOYoOooOo
ps: Tested on Xperia-Play, android 2.3.3