home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D Game Programming for Teens (2nd Edition)
/
3DGPFT2E.iso
/
Source
/
Chapter05
/
demo05-05.bb
< prev
next >
Wrap
Text File
|
2009-01-20
|
524b
|
27 lines
; 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