Skip to content

Instantly share code, notes, and snippets.

@mythril
Created September 6, 2014 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mythril/52c2e45593880bb26f21 to your computer and use it in GitHub Desktop.
Save mythril/52c2e45593880bb26f21 to your computer and use it in GitHub Desktop.
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