RenderBuffer - stingray.RenderBuffer object reference - Stingray Lua API Reference

stingray.RenderBuffer object reference

Description

API for manipulating buffers of data for rendering.

Constants

Describes semantics of component.
Describes semantics of component.
Describes semantics of component.
Compressed data format.
Compressed data format.
Compressed data format
Compressed data format
Compressed data format
Compressed data format
Compressed data format
Describes semantics of component.

RB_ETC2_R11 : integer

Compressed data format

RB_ETC2_RG11 : integer

Compressed data format

RB_ETC2_RGB8 : integer

Compressed data format

RB_ETC2_RGB8A1 : integer

Compressed data format

RB_ETC2_RGBA8 : integer

Compressed data format
Component uses integer data.
Compressed data format
Compressed data format

RB_PVR_RGB_2BPP : integer

Compressed data format

RB_PVR_RGB_4BPP : integer

Compressed data format
Describes buffer view type.
Describes semantics of component.
Describes semantics of component.
Describes buffer view type.
2D texture type.
3D texture type.
Cube texture type.

Functions

Parameters

format :

integer

A format descriptor.

Returns

integer

The component type used by the format.

Parameters

compression :

integer

The type of compression RB_*.

Returns

integer

An integer format descriptor code.

Parameters

format :

integer

A format descriptor.

Returns

boolean

True if the format is compressed.

Parameters

validity :

integer

A RB_VALIDITY_* value that describes if the buffer is static or updatable.

view :

integer

A RB_*_BUFFER_VIEW describing the type of buffer we are creating.

stride :

integer

Stride of the data.

data :

table

A table of numbers with the data.

Returns

integer

A handle to the buffer.

Parameters

view :

integer

The RB_*_DESCRIPTION we are creating.

desc :

table

Description of the buffer.

Returns

integer

A handle to the buffer description object.

The desc should be a table of tables, with each subtable describing a vertex channel. The sub tables have the following fields:

  • format: The format of the channel (as returend by format().
  • semantic: The RB_*_SEMANTIC of the channel.
  • vb_index: Index of vertex buffer that this channels is referring.
  • set: Semantic set (i.e. TEXCOORD0, TEXCOORD1, etc).
  • instance: True if vertex channel contains per-instance data.
Parameters

handle :

integer

A handle to the buffer to be destroyed.

Returns
This function does not return any values.
Parameters

handle :

integer

A description handle returned by create_description().

Returns
This function does not return any values.
Parameters

component_type :

integer

The type of the component RB_*_COMPONENT

signed :

boolean

True if data should be treated as signed.

normalize :

boolean

True if input integer data should be normalized to 0--1 or -1 -- 1 range.

bit_depth_x :

integer

Number of bits in x components.

bit_depth_y :

integer

Number of bits in y components.

bit_depth_z :

integer

Number of bits in z components.

bit_depth_w :

integer

Number of bits in w components.

Returns

integer

An integer format descriptor code.

Parameters

format :

integer

A format descriptor.

Returns

integer

The number of bits used by the format.

Parameters

format :

integer

A format descriptor.

Returns

integer

The number of components used by the format.

Parameters

handle :

integer

A handle to the buffer to be updated.

type :

integer

RB_*_COMPONENT data type.

data :

table

New data for the buffer.

Returns
This function does not return any values.
Parameters

handle :

integer

A description handle returned by create_description().

desc :

table

Updated description of the buffer, see create_description().

Returns
This function does not return any values.