Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#211 Bug in QT framework?

alpha 4
open
nobody
2012-06-23
2012-06-23
trementina
No

I have compiled OpenSceneGraph 3.0.1 for Android, and i have used Necessitas to compile the "cow" example, using OGLES1.1. I got many EGL errors, and spent many days to solve the problem. I have recompile the Ncessitas QT Framework to do some debugging, and finally i have been succesfull with two mods:

in qandroideglplatformcontext.ccp
//m_eglContext = eglCreateContext(m_eglDisplay,config,EGL_NO_CONTEXT, attribList);
m_eglContext = eglCreateContext(m_eglDisplay,config,EGL_NO_CONTEXT, 0);

In qeglconvenience.cpp
//EGLConfig cfg = 0;
// QVector<EGLint> configureAttributes =
//q_createConfigAttributesFromFormat(format);
//[...]
//configureAttributes.append(EGL_OPENGL_ES2_BIT);
//configureAttributes.append(EGL_NONE);

EGLConfig cfg = 0;
QVector<EGLint> configureAttributes =
q_createConfigAttributesFromFormat(format);
[...]
configureAttributes.append(EGL_OPENGL_ES_BIT);
configureAttributes.append(EGL_NONE);

I have not enough skills to understand if this is a bug (probably it is my mistake), anyway Necessitas was initializing OpenGLES2, regardless my configuration was for OGLES1.1 :

DEFINES += \ QT_OPENGL_ES \ EGL_OPENGL_ES_API \ OSG_GLES1_AVAILABLE \ OSG_GL_MATRICES_AVAILABLE \ OSG_GL_VERTEX_FUNCS_AVAILABLE \ OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE \ OSG_GL_FIXED_FUNCTION_AVAILABLE \ OSG_B UILD_PLATFORM_ANDROID \ OSG_LIBRARY_STATIC

cow

Discussion

  • trementina
    trementina
    2012-06-23

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -31,3 +31,5 @@
          OSG_GL_FIXED_FUNCTION_AVAILABLE \
          OSG_B UILD_PLATFORM_ANDROID \
          OSG_LIBRARY_STATIC 
    +
    +![cow](http://img17.imageshack.us/img17/7555/p6082164.jpg)