maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Open GL ES 2 (https://talk.maemo.org/showthread.php?t=43682)

staser12 2010-02-07 19:09

Open GL ES 2
 
I am trying to compile hellogl_es2 example in scratchbox (qt 4.5.3) but it is not working. I am getting the following errors:

Code:

glwidget.cpp: In member function 'void GLWidget::paintQtLogo()':
glwidget.cpp:213: error: 'glVertexAttribPointer' was not declared in this scope
glwidget.cpp:214: error: 'glEnableVertexAttribArray' was not declared in this scope
glwidget.cpp:218: error: 'glDisableVertexAttribArray' was not declared in this scope
glwidget.cpp: In member function 'void GLWidget::paintTexturedCube()':
glwidget.cpp:242: error: 'glVertexAttribPointer' was not declared in this scope
glwidget.cpp:243: error: 'glEnableVertexAttribArray' was not declared in this scope
glwidget.cpp:284: error: 'glUniform1i' was not declared in this scope
glwidget.cpp:288: error: 'glDisableVertexAttribArray' was not declared in this scope
glwidget.cpp: In function 'void reportCompileErrors(GLuint, const char*)':
glwidget.cpp:296: error: 'glGetShaderiv' was not declared in this scope
glwidget.cpp:303: error: 'glGetShaderInfoLog' was not declared in this scope
glwidget.cpp: In function 'void reportLinkErrors(GLuint, const char*, const char*)':
glwidget.cpp:313: error: 'glGetProgramiv' was not declared in this scope
glwidget.cpp:320: error: 'glGetProgramInfoLog' was not declared in this scope
glwidget.cpp: In member function 'virtual void GLWidget::initializeGL()':
glwidget.cpp:337: error: 'glCreateShader' was not declared in this scope
glwidget.cpp:353: error: 'glShaderSource' was not declared in this scope
glwidget.cpp:354: error: 'glCompileShader' was not declared in this scope
glwidget.cpp:369: error: 'glCreateProgram' was not declared in this scope
glwidget.cpp:370: error: 'glAttachShader' was not declared in this scope
glwidget.cpp:372: error: 'glLinkProgram' was not declared in this scope
glwidget.cpp:375: error: 'glGetAttribLocation' was not declared in this scope
glwidget.cpp:377: error: 'glGetUniformLocation' was not declared in this scope
glwidget.cpp: In member function 'virtual void GLWidget::paintGL()':
glwidget.cpp:466: error: 'glUseProgram' was not declared in this scope
glwidget.cpp:467: error: 'glUniformMatrix4fv' was not declared in this scope
glwidget.cpp:471: error: 'glUseProgram' was not declared in this scope
glwidget.cpp:472: error: 'glUniformMatrix4fv' was not declared in this scope
make: *** [glwidget.o] Error 1

What is the problem? The other Qt opengl examples are compiled w/o any problems: hellogl and hellogl_es

the libgles2-dev library is installed. Maybe I am missing something?

Any help is appreciated!

danielwilms 2010-02-08 08:56

Re: Open GL ES 2
 
Hi,

have you added the lib to your *.pro file? You can do it like:

Code:

CONFIG      += link_pkgconfig
PKGCONFIG  += <libname>

Daniel

staser12 2010-02-08 10:03

Re: Open GL ES 2
 
I found this page: http://wiki.maemo.org/OpenGL_ES_Libraries. And added the following line to the .pro file: LIBS += -lGLESv2 -lQtOpenGL

But I'm still getting the same result. And it seems that problem is not in the library but in the header -> the compiler can't find declarations of those functions...


All times are GMT. The time now is 05:41.

vBulletin® Version 3.8.8