Name
sdl.EnableOffscreenRender -- enable hardware brush offscreen rendering
Synopsis
sdl.EnableOffscreenRender(on)
Function
This function can be used to enable or disable offscreen rendering to hardware brushes, depending on what you pass in the on argument.

Please note that the new setting will only affect hardware brushes created after you have made this call. Hardware brushes created before your call of this function will use the old setting.

Also note that hardware brushes that can be drawn to face some limitations. See Offscreen rendering for details. That's why you should only use this function if your script is able to deal with these limitations. The advantage is that sdl.EnableOffscreenRender() allows your script to draw to offscreen hardware brushes with hardware acceleration. But you have to keep some things in mind when doing so. See Offscreen rendering for details.

Inputs
on
boolean indicating whether to enable or disable hardware brush offscreen rendering
Example
sdl.EnableOffscreenRender(True)
CreateBrush(1, 640, 480, #BLACK, {Hardware = True})
sdl.EnableOffscreenRender(False)
The code above creates brush 1 as a hardware brush that can be drawn to using SelectBrush(). All other hardware brushes cannot be drawn to because we immediately set the enable offscreen render flag to False again.

Show TOC