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. Beginning in Qt with OpenGL
Forum Updated to NodeBB v4.3 + New Features

Beginning in Qt with OpenGL

Scheduled Pinned Locked Moved Game Development
27 Posts 4 Posters 15.7k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    Chuck Gao
    wrote on last edited by
    #2

    As you asked in another thread(http://developer.qt.nokia.com/forums/viewthread/6068/) before, do you try other exmaples? You can just make a QGLWidget yourself, and build to see what happen with your SDK or environment. By the way, which platform you are working with?

    Chuck

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Dinesh Balu
      wrote on last edited by
      #3

      bq. As you asked in another thread(http://developer.qt.nokia.com/forums/viewthread/6068/) before, do you try other exmaples? You can just make a QGLWidget yourself, and build to see what happen with your SDK or enviorment.

      Yeah , this is not the same project , I have started a fresh project myself and added basic codes to IntializeGL,ResizeGL,paintGL and to draw a triangle...

      but the errors haven't changed...

      bq. By the way, which platform you are working with?

      I'm working in Windows Xp with Nokia's QT SDK for Nokia N97 mini

      :)

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Chuck Gao
        wrote on last edited by
        #4

        Do you build for desktop or symbian device ? Can you send your code to me, i can try it on my computer for you. Email: chuckgao.cg@gmail.com

        Chuck

        1 Reply Last reply
        1
        • D Offline
          D Offline
          Dinesh Balu
          wrote on last edited by
          #5

          Sure,... Thank you Chuck.Gao

          :)

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Chuck Gao
            wrote on last edited by
            #6

            [quote author="Dinesh Balu" date="1306132718"]Sure,... Thank you Chuck.Gao[/quote]

            The code have some wrong syntax. right one is modified

            1. GamePlay::InitializeGL() --> GamePlay::initializeGL() in both header and source file
            2. glViewPort --> glViewport
            3. draw() --> GamePlay::draw()

            I can build it on both Desktop(also simulator) and Symbian device, but it'll crash some where.

            Chuck

            1 Reply Last reply
            1
            • D Offline
              D Offline
              Dinesh Balu
              wrote on last edited by
              #7

              k, I have change it as you said... but still the same errors are there...

              did you get the output?

              :)

              1 Reply Last reply
              0
              • C Offline
                C Offline
                Chuck Gao
                wrote on last edited by
                #8

                no, it's OK for me. Maybe there have some problem with your environment or SDK, i'm not sure. You can paste the log on this thread, i think someone can resolve your problem

                Chuck

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  Dinesh Balu
                  wrote on last edited by
                  #9

                  how to get the log? I couldn't copy the error, it's disabled...!
                  There is no log file in the debug directory..

                  Is it would work if I re-install the SDK

                  :)

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    ZapB
                    wrote on last edited by
                    #10

                    Have you added #include <gl.h> yourself? If so there is no need, QGLWidget takes care of all that for you. I seem to think there can be issues if OpenGL headers and Windows headers are #include'd in the wrong order.

                    Nokia Certified Qt Specialist
                    Interested in hearing about Qt related work

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      Dinesh Balu
                      wrote on last edited by
                      #11

                      No, I didn't add them... now I'm re-installing the Qt SDK...

                      :)

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        Chuck Gao
                        wrote on last edited by
                        #12

                        [quote author="Dinesh Balu" date="1306142398"]No, I didn't add them... now I'm re-installing the Qt SDK...[/quote]

                        Good luck :-)

                        Chuck

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          Dinesh Balu
                          wrote on last edited by
                          #13

                          Um.... Let's see... what if it's still not working :(

                          :)

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            Dinesh Balu
                            wrote on last edited by
                            #14

                            I have re-installed the SDK... Now the errors are gone ,.. and application is running successfully.. except I'm not getting the exact output....

                            @Chuck.Gao : what was the output you got with the project?

                            The Project type is Qt Mobile Application , doesn't it support OpenGL and should I go for OpenGL ES...

                            :)

                            1 Reply Last reply
                            0
                            • C Offline
                              C Offline
                              Chuck Gao
                              wrote on last edited by
                              #15

                              The mobile use OpenGL ES, but not OpenGL.
                              Output for what ? Sorry, i can't see anything until the application crash.

                              Chuck

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                Dinesh Balu
                                wrote on last edited by
                                #16

                                [quote author="Chuck.Gao" date="1306134308"]no, it's OK for me. Maybe there have some problem with your environment or SDK, i'm not sure. You can paste the log on this thread, i think someone can resolve your problem[/quote]

                                You said that you got my app running on your sdk... right?
                                did you get any output in that?

                                I have drawn a triangle in that app...

                                how to use OpenGL ES with QT

                                :)

                                1 Reply Last reply
                                0
                                • C Offline
                                  C Offline
                                  Chuck Gao
                                  wrote on last edited by
                                  #17

                                  I can build it on both Desktop(also simulator) and Symbian device, but it’ll crash some where.
                                  Qt will use OpenGL ES automatically if you build Symbian based application.

                                  Chuck

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    Dinesh Balu
                                    wrote on last edited by
                                    #18

                                    [quote author="Chuck.Gao" date="1306221357"]I can build it on both Desktop(also simulator) and Symbian device, but it’ll crash some where.
                                    [/quote]

                                    You mean the application that I sent you will crash somewhere,...

                                    [quote author="Chuck.Gao" date="1306221357"]Qt will use OpenGL ES automatically if you build Symbian based application.
                                    [/quote]

                                    Then why is it not working.... I got the simulator window opened but the triangle is not drawn on the screen...

                                    :)

                                    1 Reply Last reply
                                    0
                                    • Z Offline
                                      Z Offline
                                      ZapB
                                      wrote on last edited by
                                      #19

                                      That's for you to debug. It's your app. Run it in the debugger and see why it crashes.

                                      Nokia Certified Qt Specialist
                                      Interested in hearing about Qt related work

                                      1 Reply Last reply
                                      0
                                      • D Offline
                                        D Offline
                                        Dinesh Balu
                                        wrote on last edited by
                                        #20

                                        When I started debugging...
                                        A Warning is shown..
                                        It says..

                                        bq. The preferred debugger engine for debugging binaries of type 'x86-windows-msvc2008-pe-32bit' is not available.
                                        The debugger engine 'Gdb engine' will be used as a fallback.
                                        Details:There is no CDB binary available for binaries in format 'x86-windows-msvc2008-pe-32bit'

                                        What does that mean?

                                        :)

                                        1 Reply Last reply
                                        0
                                        • Z Offline
                                          Z Offline
                                          ZapB
                                          wrote on last edited by
                                          #21

                                          Which build are you trying to debug? Desktop/simulator/symbian? I would try getting it working on the desktop first.

                                          Nokia Certified Qt Specialist
                                          Interested in hearing about Qt related work

                                          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