Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] Creating a textured sphere in QtOpenGL ES 2.0.

[Solved] Creating a textured sphere in QtOpenGL ES 2.0.

Scheduled Pinned Locked Moved Mobile and Embedded
10 Posts 2 Posters 6.7k 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.
  • S Offline
    S Offline
    sleam
    wrote on last edited by
    #1

    I am totaly new to shader programming, but I spent the last few days trying to port this example: http://learningwebgl.com/blog/?p=1253 to Qt. It has resulted in a bunch of jagged spinning triangles with a view that is not the correct size. Part of my port uses code from opengl_es2 Qt example.

    Is there any examples like this out there that works with QtOpenGL ?

    "Here":https://sites.google.com/site/tmshag1/GLES2.zip?attredirects=0 is my source if anyone wants a stab at it.

    1 Reply Last reply
    0
    • U Offline
      U Offline
      ucomesdag
      wrote on last edited by
      #2

      I managed to create something like that some time ago. You can download the source here: "globe.tar.gz":http://ucomesdag.googlecode.com/files/globe.tar.gz Hope it is of some help.

      Write “Qt”, not “QT” (QuickTime).

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sleam
        wrote on last edited by
        #3

        Thank you so much for sharing that ucomesdag! :)
        I tried to run it on my N900, but all I get is the sliders, the title and the fps numbers. There is no globe :( "Show outline" does nothing too.. Have I done something wrong, or is this expected? Again, thank you for sharing! :D

        1 Reply Last reply
        0
        • U Offline
          U Offline
          ucomesdag
          wrote on last edited by
          #4

          It should run on your N900 cause it runs on mine without a problem ;)

          Write “Qt”, not “QT” (QuickTime).

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sleam
            wrote on last edited by
            #5

            Oh, okay, good to know that it is supposed to work :) Hum, what Qt version do you compile with?
            I use 4.7.0.

            1 Reply Last reply
            0
            • U Offline
              U Offline
              ucomesdag
              wrote on last edited by
              #6

              Sorry forgot to down size the earth.png. Just resize it to 1024 or lower. (Fixed the archive "globe.tar.gz":http://ucomesdag.googlecode.com/files/globe.tar.gz)

              Write “Qt”, not “QT” (QuickTime).

              1 Reply Last reply
              0
              • U Offline
                U Offline
                ucomesdag
                wrote on last edited by
                #7

                [quote author="sleam" date="1294670328"]"Show outline" does nothing too..[/quote]
                Never implemented it, so it's normal ;)

                Write “Qt”, not “QT” (QuickTime).

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sleam
                  wrote on last edited by
                  #8

                  Oh, I see! Thank you for locating that error :) It runs great now :) This was just what I was looking for. I cannot thank you enough, you saved me a lot of headache with that code :) Great work, thanks for sharing!

                  1 Reply Last reply
                  0
                  • U Offline
                    U Offline
                    ucomesdag
                    wrote on last edited by
                    #9

                    [quote author="sleam" date="1294671258"]Oh, I see! Thank you for locating that error :) It runs great now :) This was just what I was looking for. I cannot thank you enough, you saved me a lot of headache with that code :) Great work, thanks for sharing![/quote]
                    No problem the headaches where all mine ;) It took me quite some time to get it working. Keep me updated if you get something more fancy done!

                    Write “Qt”, not “QT” (QuickTime).

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sleam
                      wrote on last edited by
                      #10

                      :) I will report back if I make something fancy :)

                      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