SpriteGraphics3D width,height[,depth][,viewmode][,pivotdist#]

Parameters

width - screen width (in pixels)
height - screen height(in pixels)
depth (optional) - screen color depth (0 = default, 16, 24, 32)
viewmode (optional) - set the view mode to use:

0 : auto (default) - windowed in debug, fullscreen in non-debug
1 : fullscreen mode
2 : windowed mode
3 : scaled window mode

pivotdist (optional) - set the distance of the sprite pivot from its parent camera
Default value is 1.0
NOTE: Do not use values lower than 1.0

Description

** This is the one of the most important commands in the Sprite Control system **

The command must be called BEFORE loading or creating 3D quad sprites

Creates a display system for the 'Sprite Control' quads.
The command is equivalent to doing the following:

Graphics3D width,height
SetBuffer backBuffer()
spritecamera=CreateCamera()
spritepivot=CreateSpritePivot(spritecamera)

The main camera has a global handle called 'spritecamera'
The sprite pivot has a global handle called 'spritepivot'

The width and height parameters determine the graphics resolution.
The depth (optional) controls the color depth to use.
The viewmode is used to set either full screen, windowed mode, or auto (default)
Auto selects windowed for when you are in debugging mode otherwise full screen
The pivotdist (optional) sets the distance at which the sprite pivot is displayed from the camera.
This has a default value of 1.0 which shows all attached sprites at their correct size.
Increasing this value sends the sprites deeper into the screen making them appear smaller.
You might need to use this parameter if your sprites flicker. In which case use a value like 1.001

See Also: EndGraphics3D , CreateSpritePivot()

Example

Include "Sprite Control.bb"

SpriteGraphics3D 640,480

SetFont LoadFont("Tahoma",38,True) ; size 38 and bold

sprite=Text3D(200,140,"Hello World!")

RenderWorld
Flip
WaitKey
End


Index