The current size of the index buffer (in number of indices).
The MVP (modelview-projection) matrix transforms vertices into clipspace.
The that you provide here will be called after a context loss. Call both "upload..." methods from within the callback to restore any vertex or index buffers. The callback will be executed with the effect as its sole parameter.
Returns the current program, either by creating a new one (via
createProgram
) or by getting it from the Painter
.
Do not override this method! Instead, implement createProgram
.
Returns the base name for the program. @default the fully qualified class name
Returns the full name of the program, which is used to register it at the current
Painter
.
The default implementation efficiently combines the program's base and variant
names (e.g. LightEffect#42
). It shouldn't be necessary to override
this method.
Override this method if the effect requires a different program depending on the current settings. Ideally, you do this by creating a bit mask encoding all the options. This method is called often, so do not allocate any temporary objects when overriding.
@default 0
The texture to be mapped onto the vertices.
Indicates if pixels at the edges will be repeated or clamped. Only works for power-of-two textures. @default false
The smoothing filter that is used for the texture. @default bilinear
The internally used vertex buffer used on rendering.
The current size of the vertex buffer (in blocks of 32 bits).
The data format that this effect requires from the VertexData that it renders:
"position:number2"
The AGAL code for the standard vertex shader that most filters will use. It simply transforms the vertex coordinates to clip-space and passes the texture coordinates to the fragment program (as 'v0').
The vertex format expected by uploadVertexData
:
"position:number2, texCoords:number2"
Concatenates the current matrix with another one.
Purges the index- and vertex-buffers.
Purges one or both of the vertex- and index-buffers.
Draws the triangles described by the index- and vertex-buffers, or a range of them.
This calls beforeDraw
, context.drawTriangles
, and
afterDraw
, in this order.
Uploads the given index data to the internal index buffer. If the buffer is too small, a new one is created automatically.
@param indexData The IndexData instance to upload.
@param bufferUsage The expected buffer usage. Use one of the constants defined in
Context3DBufferUsage
. Only used when the method call
causes the creation of a new index buffer.
Uploads the given vertex data to the internal vertex buffer. If the buffer is too small, a new one is created automatically.
@param vertexData The VertexData instance to upload.
@param bufferUsage The expected buffer usage. Use one of the constants defined in
Context3DBufferUsage
. Only used when the method call
causes the creation of a new vertex buffer.
Generated using TypeDoc
The internally used index buffer used on rendering.