×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    3

    Problem compiling the OpenGL es2 example code

    I am trying to compile the "hellogl_es2" sample code in FREMANTLE target with the following errors. I am not sure if my setup is missing or with out dated header files? These functions seem missing from "gl2.h".

    src/glwidget.cpp: In member function 'void GLWidget:aintQtLogo()':
    src/glwidget.cpp:84: error: 'GL_VERTEX_ARRAY' was not declared in this scope
    src/glwidget.cpp:84: error: 'glEnableClientState' was not declared in this scope
    src/glwidget.cpp:85: error: 'glVertexPointer' was not declared in this scope
    ...


    I have following declare in my .pro file
    QT += opengl
    LIBS += -lGLESv2 -lQtOpenGL

    I have been struggling with this for a couple of days! please any help would be appreciated.
    thx,

  2. #2
    Registered User
    Join Date
    Dec 2009
    Posts
    5

    Re: Problem compiling the OpenGL es2 example code

    I have the same problem but it's normal. OpenGL ES v2 doesn't include these functions (GL_VERTEX_ARRAY, glEnableClientState...).
    It's possible to compile a project with OpenGL ES 1 adding lGLES_CM to LIBS.
    But I dont' know if it's possible to execute a such program on N900.

  3. #3
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Problem compiling the OpenGL es2 example code

    hellogl_es2 example from Qt 4.6 compiles with Qt 4.6 fine:
    http://qt.gitorious.org/qt/qt/trees/...gl/hellogl_es2
    You can notice the source is different from what you are trying to compile.

  4. #4
    Registered User
    Join Date
    Jan 2010
    Posts
    3

    Re: Problem compiling the OpenGL es2 example code

    Thanks, the sample code in your link is indeed different, and looks a lot more promising.
    However, I am missing some header files: <qvector3d.h> <qmartix4x4.h> <gglshaderprogram.h>.
    Are these included in the qtcore or qtui lib? They are not in my qt4.6 lib/inc?

    In case some else has the same problem, the wiki page blow has a link to the wrong hollegl_es code.
    http://wiki.maemo.org/OpenGL_ES_Libraries

  5. #5
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Problem compiling the OpenGL es2 example code

    Quote Originally Posted by wacol View Post
    Thanks, the sample code in your link is indeed different, and looks a lot more promising.
    However, I am missing some header files: <qvector3d.h> <qmartix4x4.h> <gglshaderprogram.h>.
    Are these included in the qtcore or qtui lib?
    Code:
    $ rpm -ql qt-devel-4.6.0-3.fc13.x86_64 | grep -E "(qmatrix4x4|qvector3d|qglshaderprogram)"
    /usr/include/Qt/qglshaderprogram.h
    /usr/include/Qt/qmatrix4x4.h
    /usr/include/Qt/qvector3d.h
    /usr/include/QtGui/qmatrix4x4.h
    /usr/include/QtGui/qvector3d.h
    /usr/include/QtOpenGL/qglshaderprogram.h
    Quote Originally Posted by wacol View Post
    In case some else has the same problem, the wiki page blow has a link to the wrong hollegl_es code.
    http://wiki.maemo.org/OpenGL_ES_Libraries
    This is Qt 4.5.x example, so it has to be compiled with Qt 4.5.x.

  6. #6
    Registered User
    Join Date
    Jan 2010
    Posts
    3

    Re: Problem compiling the OpenGL es2 example code

    Thanks, what .deb package this is in? I am a linux newbie using Ubuntu


    This is Qt 4.5.x example, so it has to be compiled with Qt 4.5.x.
    I am just trying to lean something, so correct me if I'm wrong. The 'glEnableClientState' is OpenGL ES 1.x api, I thought this is incompatible with ESv2. How does Qt 4.5 or 4.6 affect the compiler error?

  7. #7
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Problem compiling the OpenGL es2 example code

    Quote Originally Posted by wacol View Post
    Thanks, what .deb package this is in? I am a linux newbie using Ubuntu
    If you are using Ubuntu, then this is offtopic as this sub-forum is about Maemo. The same command on Maemo:
    Code:
    dpkg -L libqt4-maemo5-dev | grep -E "(qmatrix4x4|qvector3d|qglshaderprogram)"
    /opt/qt4-maemo5/include/Qt/qmatrix4x4.h
    /opt/qt4-maemo5/include/Qt/qvector3d.h
    /opt/qt4-maemo5/include/Qt/qglshaderprogram.h
    /opt/qt4-maemo5/include/QtGui/qmatrix4x4.h
    /opt/qt4-maemo5/include/QtGui/qvector3d.h
    /opt/qt4-maemo5/include/QtOpenGL/qglshaderprogram.h

    Quote Originally Posted by wacol View Post
    I am just trying to lean something, so correct me if I'm wrong. The 'glEnableClientState' is OpenGL ES 1.x api, I thought this is incompatible with ESv2. How does Qt 4.5 or 4.6 affect the compiler error?
    It's in Open GL since version 1.1. Different versions are using different includes.

Similar Threads

  1. STLPort namespace issue
    By yickhong in forum Open C/C++
    Replies: 0
    Last Post: 2009-04-09, 08:54
  2. Another OpenGL ES problem
    By rvhaasen in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2006-08-16, 22:48
  3. problems displaying video
    By gorsken in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2006-06-21, 17:18
  4. Bluetooth problem in Symbian C++ code
    By vardhman in forum Bluetooth Technology
    Replies: 0
    Last Post: 2005-01-02, 08:17
  5. problem with Nokia Toolkit 3.1 and binary code for MMS
    By alinesimon in forum General Messaging
    Replies: 1
    Last Post: 2002-08-09, 06:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •