Results 1 to 2 of 2

Thread: problem rotating objects

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    4

    problem rotating objects

    hi all,

    I want to scarmble a rubik's cube using opengl in c++, I have successfuly drawn the rubik's cube but I have problem scrambling it by rotating its different faces, my question is: isn't there any way to rotate already existing objects without having to redraw them? also how can I have to show the steps of solving the rubik's cube by reversing the steps of the scrambling, how can I show the steps of the solution using animation? that is: how can I show the rotation of the object..

    best regards

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: problem rotating objects

    isn't there any way to rotate already existing objects without having to redraw them
    No, because opengl is a drawing api : if you want anything to move/change, you have to send draw commands for each step.

    For example to rotate the cube 90, do it each step after step with smmal angle increments. Even better, take in account the time elapsed at each frame, and rotate 90/totalrotationtime*lastframetime.

Similar Threads

  1. Rotating Objects - Light Rotating not expected
    By SparkyNZ in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-12-2015, 07:52 PM
  2. rotating objects
    By shetlandbob in forum OpenGL: Windows
    Replies: 4
    Last Post: 10-20-2004, 11:23 PM
  3. Problem rotating parent then rotating children
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-04-2002, 11:15 AM
  4. Rotating some objects only
    By Rajveer in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-27-2002, 11:21 AM
  5. rotating objects
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-01-2001, 07:47 PM

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