use

inline fun <B : Batch> B.use(projectionMatrix: Matrix4? = null, action: (B) -> Unit)

Automatically calls Batch.begin and Batch.end.

Parameters

projectionMatrix

A projection matrix to set on the batch before Batch.begin. If null, the batch's matrix remains unchanged.

action

inlined. Executed after Batch.begin and before Batch.end.


inline fun <B : Batch> B.use(camera: Camera, action: (B) -> Unit)

Automatically calls Batch.begin and Batch.end.

Parameters

camera

The camera's Camera.combined matrix will be set to the batch's projection matrix before Batch.begin

action

inlined. Executed after Batch.begin and before Batch.end.


inline fun <S : ShaderProgram> S.use(action: (S) -> Unit)

Automatically calls ShaderProgram.bind.

Parameters

action

inlined. Executed after ShaderProgram.bind.


inline fun <B : GLFrameBuffer<*>> B.use(action: (B) -> Unit)

Automatically calls GLFrameBuffer.begin and GLFrameBuffer.end.

Parameters

action

inlined. Executed after GLFrameBuffer.begin and before GLFrameBuffer.end.


inline fun <SR : ShapeRenderer> SR.use(type: ShapeRenderer.ShapeType, projectionMatrix: Matrix4? = null, action: (SR) -> Unit)

Automatically calls ShapeRenderer.begin and ShapeRenderer.end.

Parameters

type

specified shape type used to draw the shapes in the action block. Can be changed during the rendering with ShapeRenderer.set.

projectionMatrix

A projection matrix to set on the ShapeRenderer before ShapeRenderer.begin. If null, the ShapeRenderer's matrix remains unchanged.

action

inlined. Executed after ShapeRenderer.begin and before ShapeRenderer.end.


inline fun <SR : ShapeRenderer> SR.use(type: ShapeRenderer.ShapeType, camera: Camera, action: (SR) -> Unit)

Automatically calls ShapeRenderer.begin and ShapeRenderer.end.

Parameters

type

specified shape type used to draw the shapes in the action block. Can be changed during the rendering with ShapeRenderer.set.

camera

The camera's Camera.combined matrix will be set to the ShapeRenderer's projection matrix before ShapeRenderer.begin

action

inlined. Executed after ShapeRenderer.begin and before ShapeRenderer.end.