Search Projects

Thursday, March 5, 2015

Analog Clock using OpenGL

OpenGL computer graphics is vast enough to create many enthusiastic projects. Be it the OpenGL in Android or in Apple's iOS potential is great. Many may prefer DirectX for Game Programming but OpenGL is open source, flexible enough to compete.  Today we are going to talk about a small beginning for a game programmer. Try with Small projects and gradually computer graphics will take you and your carrier to a place you want to be.



Now Let's talk about the project we are presenting today - Analog Clock using OpenGL. In one of the early post we have seen how to make clock in OpenGL computer graphics. Today we are going to see more sophicsticated example of coding a clock or the analog clock. We have taken this from named BOBO87. See what he have to say (Translate to English).

OpenGL hours
The equivalent analogue clock using OpenGL.
One time I learned to work with OpenGL. As always, I wanted to try something concrete to produce, not just some mindless exercise. And this is the result. It's not difficult since I used the GLUT, so some routines have fallen away and I could write just what I needed.

Basically needed two main sub-programs. One according to the current time calculated angles, which enclose various hands and the other which renders the whole scene. Are used to draw the common line. It looks pretty good when hands loggerheads increments, but pretty steadily moved.

Code is probably not very necessary to comment.
If you head him and want to try the code get through our Download link given below video, do not forget to Comment about it.


Download Analog Clock using OpenGL  | Alternate Link

6 comments:

  1. It so nice can you make it adjustable

    ReplyDelete
  2. It ruin my day

    ReplyDelete
  3. hello sir/madam if u know code for analog clock with time on screen in open gl

    ReplyDelete
  4. its not working....
    its giving error M_PI line no:12

    ReplyDelete
  5. pls correct it n post the correct
    source code

    ReplyDelete