Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: To swing a swing

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2011
    Posts
    9

    To swing a swing

    hello sir , now i am doing a mini project for my 6th sem on opengl,
    and i did my own project,, in my project i drawn one person standing
    on a road, and beside him one swing is tightened to the tree, and i
    want to swing that swing,, but i am getting only the swinging of that
    swing and all pictures are disappearing,,, so i need help from you
    such that i want to swing the swing only and all pictures should
    constant....
    please will you help me soon within two days i want,, kindly requesting you,,

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2011
    Posts
    9

    Re: To swing a swing

    hello sir , now i am doing a mini project for my 6th sem on opengl,
    and i did my own project,, in my project i drawn one person standing
    on a road, and beside him one swing is tightened to the tree, and i
    want to swing that swing,, but i am getting only the swinging of that
    swing and all pictures are disappearing,,, so i need help from you
    such that i want to swing the swing only and all pictures should
    constant....
    please will you help me soon within two days i want,, kindly requesting you,,

  3. #3
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Re: To swing a swing

    Push model-view matrix on the stack, do the transformation, and then pop it up. Don't forget to reset model-view at the beginning of draw function.

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2011
    Posts
    9

    Re: To swing a swing

    first thanks for your reply,,,,
    please can you explain me bit clearly,either with code or with example,,please

  5. #5
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Re: To swing a swing

    If you have an openGL course at this semester, you should remember this basic things.
    Well, in short, if you are using fixed functionality just call glPushMatrix(), then do all transformations needed to display swing in a proper position, and then call glPopMatrix().

  6. #6
    Junior Member Newbie
    Join Date
    Apr 2011
    Posts
    9

    Re: To swing a swing

    thanks,,, now i got the swinging of that swing in the display window, when i pressed the key to perform the swinging operation the swing is swinging but the swing is buffering and other function keys are not working.. till now i used glutSwapBuffers() and also glClear(GL_COLOR_BUFFER_BIT) But samething happening,, i tried lot to avoid that buffering or flickering but no use,,, please help me

  7. #7
    Junior Member Newbie
    Join Date
    Apr 2011
    Posts
    9

    Re: To swing a swing

    please reply me soon

  8. #8
    Junior Member Newbie
    Join Date
    Apr 2011
    Posts
    9

    Re: To swing a swing

    Sir,,how to stop buffering of that swing,,,till now i used glClear(GL_COLOR_BUFFER_BIT); and glutSwapBuffers
    then also buffering is there so what to do,,,, please reply me soon

  9. #9
    Junior Member Newbie
    Join Date
    Apr 2011
    Posts
    9

    Re: To swing a swing

    Sir,,how to stop buffering of that swing,,,till now i used glClear(GL_COLOR_BUFFER_BIT); and glutSwapBuffers
    then also buffering is there so what to do,,,, please reply me soon

  10. #10
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Re: To swing a swing

    What buffering are you talking about?
    If you are creating a 3D scene, activate depth test with glEnable(GL_DEPTH_TEST), and clear depth buffer before each drawing with glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT).

Page 1 of 2 12 LastLast

Similar Threads

  1. Java Swing Thumbnail View of Collada File
    By terrorbyte in forum COLLADA
    Replies: 1
    Last Post: 06-29-2011, 04:32 PM
  2. OpenGL & Swing hw / lw issues - help
    By Jeffg in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-04-2011, 01:18 PM
  3. Making a swing in 3d
    By hoganh in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-25-2003, 05:53 AM
  4. Insert a GLAnimCanvas in a JScrollPane Swing
    By Mat in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-19-2002, 06:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean