Graphics (Basic4GL)
2D graphics in Basic4GL are displayed through OpenGL.
Screen and Window
Screen and Window Functions
Sprites
- Load and Display a Sprite
- Load and Display a Non-Square Sprite
- Rotate a Sprite
- Rotate a Sprite Automatically
- Manage Multiple Sprites
- Scale a Sprite
Sprite Functions
- BindSprite() - To manage multiple sprites
- DeleteSprite() -
- LoadTexture() - load a texture (image).
- NewSprite() - create a sprite from a texture.
Animating Sprites
- AnimateSprites() - animate the sprites.
- SprSetAnimDone()
- SprAnimLoop()
- SprAnimSpeed()
- SprFrame()
- SprSetAnimLoop()
- SprSetAnimSpeed()
- SprSetFrame()
Collision Detection
Color
- SprColor()
- SprSetColor()
Depth (Drawing Order)
- SprSetZOrder() - Change the drawing order.
- SprZOrder() - check the drawing order.
Flippin'
- SprSetXFlip()
- SprSetYFlip()
- SprXFlip()
- SprYFlip()
Moving
- SprPos() - returns the position of the sprite
- SprSetPos() - Set the x and y of the sprite
- SprSetVel() -Sets the velocity x,y dir.
- SprSetX() - Set the x-position of the sprite.
- SprSetXVel()
- SprSetY() - Set the y-position of the sprite.
- SprSetYVel()
- SprVel()
- SprX() - returns the x-position of the sprite
- SprXVel()
- SprY() - returns the y-position of the sprite
- SprYVel()
Rotation
- SprAngle() - Check the angle.
- SprSetAngle() - Sets the rotation of the sprite
- SprSetSpin() - Set the constant angle spin
- SprSpin()
Scaling and Size
- SprScale() - check the scaling factor
- SprSetScale() - set the scaling factor
- SprSetSize() - set the height and width of a sprite
- SprSetXSize() - set the width of a sprite
- SprSetYSize() - set the height of a sprite
- SprXSize() - width of sprite
- SprYSize() - height of sprite
Scrolling
Sprite Centre
- SprSetXCentre() - set the horizontal center
- SprSetYCentre() - set the vertical center
- SprXCenter() - check the horizontal center
- SprYCenter() - check the vertical center
Textures
- SprAddTexture() - add a texture to a sprite
- SprAddTextures() - and an array of textures to a sprite
- SprSetTexture() - set the texture of a sprite
- SprSetTextures() - set an array of textures
Transparency
- SprAlpha()
- SprSetAlpha()
- SprSetSolid()
- SprSolid()
Visibility
- SprSetVisible() - set sprite visibility.
- SprVisible() - check if sprite visible.
page revision: 37, last edited: 20 Aug 2012 11:13