ScreenOutput()

语法

OutputID = ScreenOutput()
概要
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().

参数

无.

返回值

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.

示例

  StartDrawing(ScreenOutput())
    ; do some drawing stuff here...
  StopDrawing()

已支持操作系统

所有

<- ScreenModeWidth() - Screen Index - ScreenWidth() ->