Created
September 6, 2014 12:35
-
-
Save mythril/52c2e45593880bb26f21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Graphics3D 800, 600 | |
SetBuffer BackBuffer() | |
Global camera = CreateCamera() | |
Global cube = CreateCube() | |
Global light = CreateLight() | |
Global texture = CreateTexture(64, 64) | |
RotateEntity light, 90, 0, 0 | |
PositionEntity camera, 10, 10, 10 | |
PointEntity camera, cube | |
Global lastTime = MilliSecs() | |
While Not KeyHit(1) | |
thisTime = MilliSecs() | |
If thisTime - 333 > lastTime | |
lastTime = thisTime | |
SetBuffer TextureBuffer(texture) | |
ClsColor Rnd(0, 255), Rnd(0, 255), Rnd(0, 255) | |
Cls | |
EndIf | |
EntityTexture cube, texture | |
SetBuffer BackBuffer() | |
ClsColor 0, 0, 0 | |
Cls | |
TurnEntity cube, 1, 1, 1 | |
UpdateWorld | |
RenderWorld | |
Flip | |
Wend | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment