Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: cylinder in opengl

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2012
    Posts
    7

    cylinder in opengl

    Have a nice day to all

    i have a problem in rotation, i have made the cylindrical shape glasses in opengl when i rotate the glass so it become large in size. so please if any body know about this problem please guide me.


    Numan Ali
    Pakistan

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    i rotate the glass so it become large in size


    to rotate an object you can apply a rotation matrix to the viewmodel matrix with glRotatef
    to change the size of an object you can apply a scale matrix to the viewmodel matrix with glScalef

    do these prior to drawing the object

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •