Odd OpenGL-related Errors attempting to run on phone
-
I have a Nokia N8 with Symbian that I'm trying to run a QGLWidget on. I'm gonna preface this by saying that in the Simulator, there are no problems whatsoever. But when I switch to trying to use a Symbian device, I get the following types of errors:
[...]\glwidget.cpp:294: error: 'GL_MODELVIEW' was not declared in this scope
[...]\glwidget.cpp:294: error: 'glMatrixMode' was not declared in this scope
[...]\glwidget.cpp:295: error: 'glLoadIdentity' was not declared in this scope
[...]\glwidget.cpp:296: error: 'GL_PROJECTION' was not declared in this scopeAgain, compiling AND running is perfectly fine in the Qt Simulator, where I'm even able to play the game perfectly fine.
In my pro file, I have:
QT += openglIn my GLWidget.ccp, I originally had:
#include <QtOpenGL>But removing it didn't change any of the errors. Has anyone else encountered this that could point me in the right direction? I can't understand why none of these errors are appearing in the simulator build if they really are problems. Thanks in advance.
-
[quote author="imleet" date="1326144658"]
[quote author="Reptile" date="1324779891"]Okay, I figured it out. This was my first time using OpenGL ES and I didn't realize how different they were.[/quote]hello im having the exact problem how did you fix it?[/quote]
basically, in OpenGL ES, you can't use 90% of the functions you use in regular OpenGL (going the other way is easy, though - OpenGL can process OpenGL ES code just fine.
What you need to do is convert all your rendering code to use shaders instead of what you're currently using and get rid of the helper functions that control the camera, matrices, etc since you'll be doing all that work and passing that in as a variable to the shaders.