Results 1 to 2 of 2

Thread: Problem with animation

  1. #1
    Junior Member Newbie
    Join Date
    May 2014

    Problem with animation

    Hi everyone, I have a problem with animation. My program drawing spacecraft that contains cylinders (wire and solid from library of glut) and calculating angles of rotation for spacecraft. On the angles rotation I need will draw animation change of spacecraft at space. That I trying insert in my code glutTimerFunc my program just is closed. What is problem ?
    Code :
            public Form3()
                Glut.glutTimerFunc(50, Timer, 0);
            void Timer(int value)
                Gl.glRotated(1, 0, 0, 1);
                Glut.glutTimerFunc(50, Timer, 0);
            void Draw()
                Gl.glColor3f(0.502f, 0.502f, 0.502f);
                Gl.glTranslated(-1, 0, -6);
                Gl.glRotated(95, 1, 0, 0);
                Glut.glutSolidCylinder(0.7, 2, 60, 60);
                next of similiarly of code
    Rotation is carried out along three axes that will calculate. Please help. Time has double value.

  2. #2
    Member Newbie
    Join Date
    Sep 2013
    I do not know why your program closes. But if you rotate in Timer(int) function and then in Draw() function you load matrix's identity nothing will happen. Try declaring a member variable and add a value to it in Timer(int) function, then rotate in Draw() function.
    P.S.: You're using an old OpenGL version.

Similar Threads

  1. problem in animation
    By Chirag Varde in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 03-10-2011, 01:55 AM
  2. animation problem
    By taztoooz in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-29-2009, 02:29 AM
  3. Animation problem
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-12-2005, 10:07 AM
  4. Animation problem
    By The_V|k|ng in forum OpenGL: Basic Coding
    Replies: 16
    Last Post: 03-04-2002, 08:01 AM
  5. Animation problem, again...
    By The_V|k|ng in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 03-01-2002, 08:36 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