Forums - [Solved] Problem with checking the FrameBuffer status (Adreno SDK - OpenGL ES)

1 post / 0 new
[Solved] Problem with checking the FrameBuffer status (Adreno SDK - OpenGL ES)
ATTY_Lionel
Join Date: 31 Jan 12
Posts: 12
Posted: Thu, 2012-04-26 03:07

 

 

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

 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.