Computer GPU T1

Functions

fill (x : Int, y : Int, dx : Int, dy : Int, str : String)

Draws the given character at all given positions in the given rectangle on-to the hidden screen buffer.

Details

Flags

RuntimeSync RuntimeParallel RuntimeAsync MemberFunc

Display Name

Fill

Parameters
Name Type Description

X x

Int

The x coordinate at which the rectangle should get drawn. (upper-left corner)

Y y

Int

The y coordinate at which the rectangle should get drawn. (upper-left corner)

DX dx

Int

The width of the rectangle.

DY dy

Int

The height of the rectangle.

String str

String

The character you want to use for the rectangle. (first char in the given string)

flush ()

Flushes the hidden screen buffer to the visible screen buffer and so makes the draw calls visible.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Flush

getBuffer () → buffer : Struct<GPUT1Buffer>

Returns the back buffer as struct to be able to use advanced buffer handling functions. (struct is a copy)

Details

Flags

RuntimeSync RuntimeParallel RuntimeAsync MemberFunc

Display Name

Get Buffer

Return Values
Name Type Description

Buffer buffer

Struct<GPUT1Buffer>

The Buffer that is currently the back buffer.

getScreen () → screen : Object<Object>

Returns the currently bound screen.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Get Screen

Return Values
Name Type Description

Screen screen

Object<Object>

The currently bound screen.

getSize () → (w : Int, h : Int)

Returns the size of the text-grid (and buffer).

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Get Size

Return Values
Name Type Description

Width w

Int

The width of the text-gird.

Height h

Int

The height of the text-grid.

setBackground (r : Float, g : Float, b : Float, a : Float)

Changes the background color that is used for the next draw calls.

Details

Flags

RuntimeSync RuntimeParallel RuntimeAsync MemberFunc

Display Name

Set Background Color

Parameters
Name Type Description

Red r

Float

The red portion of the background color. (0.0 - 1.0)

Green g

Float

The green portion of the background color. (0.0 - 1.0)

Blue b

Float

The blue portion of the background color. (0.0 - 1.0)

Alpha a

Float

The opacity of the background color. (0.0 - 1.0)

setBuffer (buffer : Struct<GPUT1Buffer>)

Allows to change the back buffer of the GPU to the given buffer.

Details

Flags

RuntimeSync RuntimeParallel RuntimeAsync MemberFunc

Display Name

Set Buffer

Parameters
Name Type Description

Buffer buffer

Struct<GPUT1Buffer>

The Buffer you want to now use as back buffer.

setForeground (r : Float, g : Float, b : Float, a : Float)

Changes the foreground color that is used for the next draw calls.

Details

Flags

RuntimeSync RuntimeParallel RuntimeAsync MemberFunc

Display Name

Set Foreground Color

Parameters
Name Type Description

Red r

Float

The red portion of the foreground color. (0.0 - 1.0)

Green g

Float

The green portion of the foreground color. (0.0 - 1.0)

Blue b

Float

The blue portion of the foreground color. (0.0 - 1.0)

Alpha a

Float

The opacity of the foreground color. (0.0 - 1.0)

setSize (w : Int, h : Int)

Changes the size of the text-grid (and buffer).

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Set Size

Parameters
Name Type Description

Width w

Int

The width of the text-gird.

Height h

Int

The height of the text-grid.

setText (x : Int, y : Int, str : String)

Draws the given text at the given position to the hidden screen buffer.

Details

Flags

RuntimeSync RuntimeParallel RuntimeAsync MemberFunc

Display Name

Set Text

Parameters
Name Type Description

X x

Int

The x coordinate at which the text should get drawn.

Y y

Int

The y coordinate at which the text should get drawn.

String str

String

The text you want to draw on-to the buffer.

Signals

OnKeyChar (String Character c, Int Button btn)

Triggers when a character key got 'clicked' and essentially a character got typed in, usful for text input.

Details
Parameters
Name Type Description

Character c

String

The character that got typed in as string.

Button btn

Int

The Button-Bit-Field providing information about the key release event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed

OnKeyDown (Int C c, Int Code code, Int Button btn)

Triggers when a key got pressed.

Details
Parameters
Name Type Description

C c

Int

The ASCII number of the character typed in.

Code code

Int

The number code of the pressed key.

Button btn

Int

The Button-Bit-Field providing information about the key press event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed

OnKeyUp (Int C c, Int Code code, Int Button btn)

Triggers when a key got released.

Details
Parameters
Name Type Description

C c

Int

The ASCII number of the character typed in.

Code code

Int

The number code of the pressed key.

Button btn

Int

The Button-Bit-Field providing information about the key release event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed

OnMouseDown (Int X x, Int Y y, Int Button btn)

Triggers when a mouse button got pressed.

Details
Parameters
Name Type Description

X x

Int

The x position of the cursor.

Y y

Int

The y position of the cursor.

Button btn

Int

The Button-Bit-Field providing information about the pressed button event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed

OnMouseMove (Int X x, Int Y y, Int Button btn)

Triggers when the mouse cursor moves on the screen.

Details
Parameters
Name Type Description

X x

Int

The x position of the cursor.

Y y

Int

The y position of the cursor.

Button btn

Int

The Button-Bit-Field providing information about the move event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed

OnMouseUp (Int X x, Int Y y, Int Button btn)

Triggers when a mouse button got released.

Details
Parameters
Name Type Description

X x

Int

The x position of the cursor.

Y y

Int

The y position of the cursor.

Button btn

Int

The Button-Bit-Field providing information about the released button event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed

ScreenSizeChanged (Int old Width oldW, Int old Height oldH)

Triggers when the size of the text grid changed.

Details
Parameters
Name Type Description

old Width oldW

Int

The old width of the screen.

old Height oldH

Int

The old height of the screen.