English
Source / code snippets

Analog demonstration Opengl watch

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
OpenGL-Demo: analoge Uhr (1)

proc __xpse__endofprogram__

    REM {{SOMEEXTRAENDCOMMAND}}
    end

endproc

WindowTitle OGL-Demo: Analog-Uhr
WindowStyle 56 + 512
CLS
OGL(init,%HWND,1,1,1,0)
var TME$=
var H!=0
var M!=0
var S!=0
var CLOCKBODY%=OGL(startlist)
OGL(posmode,1)

WHILELOOP 60

    OGL(rotate,0,0,&LOOP*6)
    OGL(move,2.2,0,0)

    IF MOD(&LOOP,5)

        OGL(color,1,1,1,1)

    ELSE

        OGL(color,1,0,0,1)

    ENDIF

    OGL(sphere,0.1,9,9)
    OGL(move,-2.2,0,0)
    OGL(rotate,0,0,&LOOP*-6)

ENDWHILE

OGL(color,0,0,0,0)
OGL(disk,0,2.4,60)
OGL(texture,0,0)
OGL(posmode,0)
OGL(move,0,-0.2,0)
OGL(color,1,1,1,1)
OGL(sphere,0.2,15,15)
OGL(endlist)
SETTIMER 1000

WHILE 1

    TME$=TIME$(0)+:+SUBSTR$(TIME$(1),1,.)
    M!=SS(2)
    H!=MOD(SS(1),12)+(M!/60)
    S!=SS(3)
    OGL(clear)
    OGL(origin,0,0,-7)
    PAINTCLOCK
    OGL(show)
    WAITINPUT
    case %Key = 2 : break

ENDWHILE

KILLTIMER
WAITINPUT
__xpse__endofprogram__

proc SS

    PARAMETERS I%
    RETURN VAL(SUBSTR$(TME$,I%,:))

endproc

proc PAINTCLOCK

    OGL(push)
    OGL(color,1,1,1,1)
    OGL(rotate,0,0,S!*-6)
    OGL(tube,0.03,0.02,1.7,4)
    OGL(rotate,0,0,S!*6)
    OGL(rotate,0,0,M!*-6)
    OGL(tube,0.1,0.03,2,4)
    OGL(rotate,0,0,M!*6)
    OGL(rotate,0,0,H!*-30)
    OGL(tube,0.1,0.03,1.3,4)
    OGL(rotate,0,0,H!*30)
    OGL(drawlist,CLOCKBODY%)
    OGL(pop)

endproc

s4 href='./../../function-references/XProfan/xpseendofprogram/'>__xpse__endofprogram__
 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.799 Views

Untitledvor 0 min.
H.Brill10/29/23
Normann Strübli09/05/20
RudiB.01/24/16
Heltal08/03/14
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie