Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hi anyone

now i want to make my first GLES program on BMP.

but there are some link errors. the GL and EGL functions couldn't be linked(include EGL_Init() and GLES_Init()).

i have searched in the SDK folder, but i couldn't find GL or EGL lib files.

so i want to know how to make a GLES project on BMP.

i also want some sample codes about GLES .

Awaiting Reply

 

Thanks

Joe

Please refer https://developer.brewmp.com/resources/how-to/using-opengl-brew-mobile-p...
I think from Brew MP 1.0.2 onwards, opengl include files and library is moved to UI family (previously it was in Media family). Also, library name changed from OGLExtension.lib to OpenGraphics.lib. But this doc still has old references.
Include  files: ..\Program Files\Qualcomm\Brew MP SDK\Platforms\1.0.2.513\platform\ui\inc\gles
Library: ..\Program Files\Qualcomm\Brew MP SDK\Platforms\1.0.2.513\platform\ui\lib

Please refer https://developer.brewmp.com/resources/how-to/using-opengl-brew-mobile-p...
I think from Brew MP 1.0.2 onwards, opengl include files and library is moved to UI family (previously it was in Media family). Also, library name changed from OGLExtension.lib to OpenGraphics.lib. But this doc still has old references.
Include  files: ..\Program Files\Qualcomm\Brew MP SDK\Platforms\1.0.2.513\platform\ui\inc\gles
Library: ..\Program Files\Qualcomm\Brew MP SDK\Platforms\1.0.2.513\platform\ui\lib

Thank you very much.
now i can compile successfully.
but there is another error. the function eglChooseConfig() failed.
the code:
......
anAttribList[0] = EGL_RED_SIZE;  anAttribList[1] = 5; anAttribList[2] = EGL_GREEN_SIZE; anAttribList[3] = 6; anAttribList[4] = EGL_BLUE_SIZE; anAttribList[5] = 5; anAttribList[6] = EGL_DEPTH_SIZE; anAttribList[7] = 16; anAttribList[8] = EGL_STENCIL_SIZE; anAttribList[9] = 0; anAttribList[10] = EGL_NONE;
 // Check Display if( EGL_NO_DISPLAY == (stDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY)) )  goto ERR_HANDLER;  // Check Initialization if( EGL_TRUE != (eglInitialize(stDisplay, NULL, NULL)) )  goto ERR_HANDLER;
 // Check EGL Config if( EGL_TRUE != (eglChooseConfig(stDisplay, anAttribList, &stConfig, 1, &nNumConfigs)) )  goto ERR_HANDLER;......
the error is:
Emulator failure: Could not initialized WGL entry point: wglGetPixelFormatAttribivARB.
 
my simulator version is 6.0.19.997.
the target is CandyBar(1.0.2.481 PRO)
Awaiting Reply
 
Thanks
Joe

Thank you very much.
now i can compile successfully.
but there is another error. the function eglChooseConfig() failed.
the code:
......
anAttribList[0] = EGL_RED_SIZE;  anAttribList[1] = 5; anAttribList[2] = EGL_GREEN_SIZE; anAttribList[3] = 6; anAttribList[4] = EGL_BLUE_SIZE; anAttribList[5] = 5; anAttribList[6] = EGL_DEPTH_SIZE; anAttribList[7] = 16; anAttribList[8] = EGL_STENCIL_SIZE; anAttribList[9] = 0; anAttribList[10] = EGL_NONE;
 // Check Display if( EGL_NO_DISPLAY == (stDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY)) )  goto ERR_HANDLER;  // Check Initialization if( EGL_TRUE != (eglInitialize(stDisplay, NULL, NULL)) )  goto ERR_HANDLER;
 // Check EGL Config if( EGL_TRUE != (eglChooseConfig(stDisplay, anAttribList, &stConfig, 1, &nNumConfigs)) )  goto ERR_HANDLER;......
the error is:
Emulator failure: Could not initialized WGL entry point: wglGetPixelFormatAttribivARB.
 
my simulator version is 6.0.19.997.
the target is CandyBar(1.0.2.481 PRO)
Awaiting Reply
 
Thanks
Joe

Thanks adhudase
I updated the driver and this issue had been fixed.
 
But now I have another question.
I debug the BMP program on simulator.
The code:
// find out how many configurations are supported
if ( eglGetConfigs( pMe->m_eglDisplay, NULL, 0, &nNumConfigs) == EGL_FALSE || eglGetError() != EGL_SUCCESS )
{
     DBGPRINTF("Error, EGL Initialization FAILED");
}
stConfig = malloc(nNumConfigs * sizeof(EGLConfig));
// Get Configuration
eglGetConfigs( pMe->m_eglDisplay, &stConfig, nNumConfigs, &nNumConfigs );
// Check to see if pixmap rendering is supported
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_SURFACE_TYPE, &nConfig);
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_BLUE_SIZE, &nConfig);
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_GREEN_SIZE, &nConfig);
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_RED_SIZE, &nConfig);
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_DEPTH_SIZE, &nConfig);
 
The nNumConfigs returned is 4 , I guess it’s not correct.
And I want to get configurations that the EGL_SURFACE_TYPE is EGL_PIXMAP_BIT.
But I couldn’t get it.
The code:
     EGLint anAttrib[] = {     //request at least a 16 bit (565) framebuffer and 16 bit Z-buffer
         EGL_SURFACE_TYPE,   EGL_PIXMAP_BIT,
         EGL_NONE
     };
if (eglChooseConfig(pMe->m_eglDisplay, anAttrib, NULL, 0, &nNumConfigs) == EGL_FALSE)
     {
         return eglGetError();
     }
     stConfig = malloc(nNumConfigs * sizeof(EGLConfig));
     if (stConfig == (EGLConfig *)0)
         return eglGetError();
     // Check EGL Config
if( EGL_TRUE != (eglChooseConfig(pMe->m_eglDisplay, anAttrib, &stConfig, nNumConfigs, &nNumConfigs)) )
     {
         DBGPRINTF("Error, EGL Config FAILED");
         return eglGetError();
     }
The EGL_SURFACE_TYPE just support EGL_WINDOW_BIT.
If GLES couldn’t be debugged on simulator or I need to do some other settings?
Awaiting Reply
 
Thanks
Joe

Thanks adhudase
I updated the driver and this issue had been fixed.
 
But now I have another question.
I debug the BMP program on simulator.
The code:
// find out how many configurations are supported
if ( eglGetConfigs( pMe->m_eglDisplay, NULL, 0, &nNumConfigs) == EGL_FALSE || eglGetError() != EGL_SUCCESS )
{
     DBGPRINTF("Error, EGL Initialization FAILED");
}
stConfig = malloc(nNumConfigs * sizeof(EGLConfig));
// Get Configuration
eglGetConfigs( pMe->m_eglDisplay, &stConfig, nNumConfigs, &nNumConfigs );
// Check to see if pixmap rendering is supported
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_SURFACE_TYPE, &nConfig);
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_BLUE_SIZE, &nConfig);
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_GREEN_SIZE, &nConfig);
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_RED_SIZE, &nConfig);
eglGetConfigAttrib(pMe->m_eglDisplay, stConfig, EGL_DEPTH_SIZE, &nConfig);
 
The nNumConfigs returned is 4 , I guess it’s not correct.
And I want to get configurations that the EGL_SURFACE_TYPE is EGL_PIXMAP_BIT.
But I couldn’t get it.
The code:
     EGLint anAttrib[] = {     //request at least a 16 bit (565) framebuffer and 16 bit Z-buffer
         EGL_SURFACE_TYPE,   EGL_PIXMAP_BIT,
         EGL_NONE
     };
if (eglChooseConfig(pMe->m_eglDisplay, anAttrib, NULL, 0, &nNumConfigs) == EGL_FALSE)
     {
         return eglGetError();
     }
     stConfig = malloc(nNumConfigs * sizeof(EGLConfig));
     if (stConfig == (EGLConfig *)0)
         return eglGetError();
     // Check EGL Config
if( EGL_TRUE != (eglChooseConfig(pMe->m_eglDisplay, anAttrib, &stConfig, nNumConfigs, &nNumConfigs)) )
     {
         DBGPRINTF("Error, EGL Config FAILED");
         return eglGetError();
     }
The EGL_SURFACE_TYPE just support EGL_WINDOW_BIT.
If GLES couldn’t be debugged on simulator or I need to do some other settings?
Awaiting Reply
 
Thanks
Joe