Important alert: (current site time 7/15/2013 6:00:40 PM EDT)
 

winzip icon

A 3D clock, OpenGL

Email
Submitted on: 6/2/2003 7:05:30 PM
By: Andrei Krotkov  
Level: Intermediate
User Rating: By 14 Users
Compatibility: C++ (general), Microsoft Visual C++
Views: 31776
(About the author)
 
     This is a simple program to demonstrate OpenGL. It will show the time in 3d, with the gears rotating in real time. The red squares are the currently active numbers. It runs wery well, and please vote.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 8 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
6/7/2003 11:46:52 AMDream

main.obj : error LNK2001: unresolved external symbol __imp__glClearDepth@8
main.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
main.obj : error LNK2001: unresolved external symbol __imp__glShadeModel@4
main.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4
main.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8
(If this comment was disrespectful, please report it.)

 
6/7/2003 11:48:31 AMAndrei Krotkov

You don't have OpenGL installed correctly, simple as that...
That means that function is linked wrongly, but as it works for me, it is your computer that is the problem; try installing openGL again...
(If this comment was disrespectful, please report it.)

 
6/8/2003 3:26:46 AMsaleem ansari

This is Very Nice you are a such very intelligent.
(If this comment was disrespectful, please report it.)

 
6/8/2003 3:32:43 AMsaleem ansari

Hi Andrei
Im saleem Ansari and i want to teach you about Open GL Programming then plz Help me How can i improve my self.
Thankssssssssss
(If this comment was disrespectful, please report it.)

 
6/9/2003 2:47:09 PMMark N

Ansari go to nehe.gamedev.net ace tutorials there. Dream if youre using msvc++ go to menu Projects->Settings->Link Tab->Object/Library Modules and Enter "opengl32.lib glu32.lib glaux.lib" before kernel32.lib.
(If this comment was disrespectful, please report it.)

 
6/9/2003 9:33:16 PMAndrei Krotkov

Oh yeah, if the hour is not working correctly (It won't if it is not Eastern daylight time) just change the line that says hours-=4; Change that to what you are currently living in. (EST is -5 gmt. EDT is -4 gmt)

Yea, I used nehe for my OpenGL!
(If this comment was disrespectful, please report it.)

 
6/14/2003 1:40:34 AMDream

Erm, my openGL works fine, Mark N, thats how it is already. Your 3D example doesnt show any clock numbers, the main example doesnt compile. OtherGL models work fine.
(If this comment was disrespectful, please report it.)

 
10/31/2003 6:04:02 AM

it realy a nice program.
(If this comment was disrespectful, please report it.)

 
5/8/2004 4:57:13 AM

This program is fine.
And it isn't difficult
But you've done well.
(If this comment was disrespectful, please report it.)

 
3/31/2005 5:05:54 PMAenox

glaux.lib(tk.obj) : error LNK2001: unresolved external symbol __ftol2

anyone help?
(If this comment was disrespectful, please report it.)

 
6/8/2005 9:51:19 PM

Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/main.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
main.exe - 2 error(s), 0 warning(s)

(If this comment was disrespectful, please report it.)

 
6/18/2005 12:39:13 PM

I had samealmost problem . I fixed it like this -> I did a search in my pc the glaux.lib and found 3 files. One in the default vc dir , and the others in the sdks lib folders. The sdks glaux.lib was different size and version from the default, so i had it removed and the problem was fixed. If you have sdk installed try removing the glaux.lib from the Program FilesMicrosoft SDKLib
(If this comment was disrespectful, please report it.)

 
6/18/2005 12:42:27 PM

remove the glaux.lib from the Program Files\Microsoft SDK\Lib and keep the one in the default vc lib directory
(If this comment was disrespectful, please report it.)

 
10/25/2005 3:16:30 AMarta

i have some problem with your program like this: parameter not ever used...
what can i do?
(If this comment was disrespectful, please report it.)

 
5/19/2006 4:13:01 AMADISH

I WANT ALL HEADER FILES USED FOR THIS PROGRAM PLEASE SEND TO MY EMAIL ID i.e. adishf1@yahoo.co.in
(If this comment was disrespectful, please report it.)

 
5/19/2006 4:18:11 AMADISH

I WANT HEADER FILES OF THIS PROGRAM.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.