Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Odd OpenGL-related Errors attempting to run on phone
QtWS25 Last Chance

Odd OpenGL-related Errors attempting to run on phone

Scheduled Pinned Locked Moved Game Development
8 Posts 3 Posters 4.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Reptile
    wrote on last edited by
    #1

    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 scope

    Again, 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 += opengl

    In 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.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Reptile
      wrote on last edited by
      #2

      Okay, I figured it out. This was my first time using OpenGL ES and I didn't realize how different they were.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        matti-
        wrote on last edited by
        #3

        Yep I recently took the leap myself, having worked with OpenGL the previous time in around 1999, OpenGL ES 2.0 was rather.. different :P

        (but so much better since you can now control everything!)

        • m

        Author of <a href="http://mmark.777-team.org/">MMark13</a>

        1 Reply Last reply
        0
        • I Offline
          I Offline
          imleet
          wrote on last edited by
          #4

          [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?

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Reptile
            wrote on last edited by
            #5

            [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.

            1 Reply Last reply
            0
            • I Offline
              I Offline
              imleet
              wrote on last edited by
              #6

              thanks, but this is really bad news for me, if i have to use shaders ill have to rewrite a lot of code that is already done using opengl es 1.1 (which is supported on android, iphone, bada..) to 2.0 =(

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Reptile
                wrote on last edited by
                #7

                haha, I totally understand

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  matti-
                  wrote on last edited by
                  #8

                  The good news is that once you familiarize yourself with the programmable pipeline you'll never look back!

                  Author of <a href="http://mmark.777-team.org/">MMark13</a>

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved