Posts: 3 | Thanked: 0 times | Joined on Feb 2010
#1
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!
 
Posts: 5 | Thanked: 2 times | Joined on Feb 2010
#2
Make sure you include the libs with -lQtOpenGL -lGLESv2 in your make file.
 
Posts: 5 | Thanked: 2 times | Joined on Feb 2010
#3
I got the example compile but unable to run on N900. any helps?
 
Posts: 119 | Thanked: 110 times | Joined on Sep 2009 @ Prague
#4
-l options wouldn't help in case of missing declarations... as for the not-running-on-n900 problem, do you have the same version of libraries installed on n900? did you cross-compile for arm?
 
Posts: 7 | Thanked: 0 times | Joined on May 2010
#5
I have similar problem. I can run hellogl_es2 and hellogl_es is not working. I think that you can compile only opengles 1.1 program and I can compile only opengles 2.0. How to change opengles version used by compilator?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 03:23.