StartSpecialFX()

Syntax

StartSpecialFX()
Description
PureBasic allows you to perform real time effects like alphablending, shadow, color filter etc. These rendering effects are very CPU intensive (even if they are very optimized) and must use a special trick to be performed quickly. StartSpecialFX() creates a memory buffer to perform all the rendering and the result will be copied back to video memory when StopSpecialFX() is called. This means that hardware acceleration (i.e. graphics card chips) cannot be used during this period. All operations are performed by the main processor. This is important to understand otherwise game performance will drop a lot.

All SpecialFX operations should be grouped and rendered at one time (Shadow, Translucide sprite etc). Standard sprites should be displayed after StopSpecialFX() to use the hardware acceleration, as usual. If you are using ClearScreen(), place it inside the StartSpecialFX() : ... : StopSpecialFX() block.

Commands which use the SpecialFX mode are: DisplayAlphaSprite(), DisplaySolidSprite(), DisplayShadowSprite(), DisplayRGBFilter() and DisplayTranslucideSprite()

Supported OS

Windows, Linux

<- SpriteWidth() - Sprite Index - StopSpecialFX() ->