home *** CD-ROM | disk | FTP | other *** search
- ; demo05-05.bb - Putting a texture on a sphere
- ; ------------------
- Graphics3D 640,480
- SetBuffer BackBuffer()
-
- Const ESC_KEY = 1
- ; Create camera
- camera = CreateCamera()
- ; Create a light
- light = CreateLight()
-
- ; Create our sphere
- sphere=CreateSphere(32)
- PositionEntity sphere,0,0,5
- ScaleEntity sphere, 2,2,2
-
- ; Create the texture
- tex=LoadTexture( "texture.bmp" )
- EntityTexture sphere, tex
-
-
- ; This following code makes our program run
- While Not KeyDown(ESC_KEY)
- RenderWorld
- Flip
- Wend
- End