ScreenOutput()
Syntax
OutputID = ScreenOutput()Description
Returns the OutputID of the currently used screen to perform 2D rendering operations on it. It will use the PureBasic 2DDrawing library and can only be used within a StartDrawing() / StopDrawing() block. The memory allocated in ScreenOutput() is released on StopDrawing().
Parameters
None.
Return value
The OutputID of the currently used screen to perform 2D rendering operations on it.
Remarks
On Linux and OS X, ScreenOutput() copies the whole screen buffer back to main memory to do 2D drawing operations (OpenGL doesn't allow direct buffer access). Therefore drawing on a screen is very slow and should be avoided. ScreenOutput() has to be called in the same thread where OpenScreen() was called.
Example
StartDrawing(ScreenOutput()) ; do some drawing stuff here... StopDrawing()
Supported OS
All