Results 1 to 3 of 3

Thread: moving in opengl

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Posts
    18
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy moving in opengl

    hi ,

    i'm drawing a square in opengl using lines(0,0),(0,10),(10,10)(10,0). A seperate line should be moved from starting point (0,0) to draw like a:confused square.

    help me regarding this...

    regards

    hussain

  2. #2
    Join Date
    Apr 2009
    Posts
    32
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: moving in opengl

    For basic OpenGL functionality, look here

    http://www.glprogramming.com/red

    In particular, chapter 2 provides several examples on drawing line primitives.

    Best regards,

    Mads

  3. #3
    Join Date
    Jan 2009
    Posts
    18
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Angry Re: moving in opengl

    hi


    ex:

    I had draw the square using lines..

    glBegin(GL_LINES);
    //first line
    glVertex2f(0, 0);
    glVertex2f(0, 0);

    //2nd line
    glVertex2f(0, 0);
    glVertex2f(0,10);

    //3rd line
    glVertex2f(0,10;
    glVertex2f(10,10);

    //4th line
    glVertex2f(10,10);
    glVertex2f(10,0);
    glEnd();

    I need a ball to move around the square..
    my question is how to move the ball or line along the square ....

Similar Threads

  1. OpenGL and Qt Question
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2009, 18:04
  2. QT + OpenGL + Thread => aaaahhhhh !
    By anthibug in forum Qt Programming
    Replies: 7
    Last Post: 26th July 2008, 13:36
  3. openGL in Qtopia core
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 18th July 2008, 11:26
  4. Qtopia Core & OpenGL ES?
    By zelko in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th May 2007, 07:21
  5. OpenGL ES, Qt/11 - Qtopia Core?
    By zelko in forum Qt Programming
    Replies: 0
    Last Post: 3rd May 2007, 10:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.