Results 1 to 2 of 2

Thread: Opengl with animation to shapes

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2016
    Posts
    6

    Opengl with animation to shapes

    void processSpecialKeys(int key, int x, int y)
    {

    if (key == GLUT_KEY_UP)
    {
    // increase the size

    }
    else if (key == GLUT_KEY_DOWN)
    {
    // decrease the size
    }

    }
    void processNormalKeys (unsigned char key, int x, int y)
    {

    if (key == 'R' || key == 'r') // reset all
    {
    // clear everything
    }
    else if (key == 27)
    exit (0);
    }

    How am I able to increase the size and decrease and also clear everything, do I need a for loop?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,654
    So I'm seeing all the:
    Code cpp:
        // do it yourself
    comments in here. If this is homework, please read The Forum Posting Guidelines.

Similar Threads

  1. OpenGL C++ 3D SHAPES
    By Jack23 in forum OpenGL: Windows
    Replies: 0
    Last Post: 12-12-2018, 04:08 PM
  2. shapes and opengl
    By giugio in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 12-14-2016, 06:54 AM
  3. opengl 2d shapes and textures
    By giugio in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-23-2012, 04:54 PM
  4. opengl alignment for 3d shapes
    By noobscratcher in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 11-01-2011, 03:07 AM
  5. Incomplete shapes and "blobs" (extra solid shapes)
    By bballdave025 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-12-2011, 11:54 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