Package-level declarations

Types

Link copied to clipboard
abstract class AG : AGFeatures, Extra
Link copied to clipboard
data class AGBatch(var frameBuffer: AGFrameBufferBase, var frameBufferInfo: AGFrameBufferInfo, var vertexData: AGVertexArrayObject = AGVertexArrayObject(AGVertexData(), isDynamic = true), var indices: AGBuffer? = null, var indexType: AGIndexType = AGIndexType.USHORT, var program: Program = DefaultShaders.PROGRAM_DEBUG, var uniformBlocks: UniformBlocksBuffersRef = UniformBlocksBuffersRef.EMPTY, var textureUnits: AGTextureUnits = AGTextureUnits.EMPTY, var blending: AGBlending = AGBlending.NORMAL, var stencilOpFunc: AGStencilOpFunc = AGStencilOpFunc.DEFAULT, var stencilRef: AGStencilReference = AGStencilReference.DEFAULT, var colorMask: AGColorMask = AGColorMask.DEFAULT, var depthAndFrontFace: AGDepthAndFrontFace = AGDepthAndFrontFace.DEFAULT, var scissor: AGScissor = AGScissor.NIL, var cullFace: AGCullFace = AGCullFace.NONE, var drawType: AGDrawType = AGDrawType.TRIANGLES, var drawOffset: Int = 0, var vertexCount: Int = 0, var instances: Int = 1) : AGCommand

Incrementally sets a new state diffing with the previous state, and renders primitives.

Link copied to clipboard
inline class AGBlendEquation(val ordinal: Int)

2 bits required for encoding

Link copied to clipboard
inline class AGBlendFactor(val ordinal: Int)

4 bits required for encoding

Link copied to clipboard
inline class AGBlending(val data: Int)

color(RGB) = (sourceColor * srcRGB) + (destinationColor * dstRGB) color(A) = (sourceAlpha * srcA) + (destinationAlpha * dstA)

Link copied to clipboard
data class AGBlitPixels(var dstFrameBuffer: AGFrameBufferBase, var dstFrameBufferInfo: AGFrameBufferInfo, var dst: AGScissor, var srcFrameBuffer: AGFrameBufferBase, var srcFrameBufferInfo: AGFrameBufferInfo, var src: AGScissor) : AGCommand

Can be emulated by rendering a quad using the texture of the framebuffer and disabling blending modes

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class AGClear(var frameBuffer: AGFrameBufferBase, var frameBufferInfo: AGFrameBufferInfo, var color: RGBA, var depth: Float, var stencil: Int, var clearColor: Boolean, var clearDepth: Boolean, var clearStencil: Boolean) : AGCommand
Link copied to clipboard
inline class AGColorMask(val data: Int)
Link copied to clipboard
interface AGCommand
Link copied to clipboard
inline class AGCompareMode(val ordinal: Int)

3 bits required for encoding

Link copied to clipboard
data class AGConfig(val antialiasHint: Boolean = true)
Link copied to clipboard
interface AGContainer
Link copied to clipboard
inline class AGCullFace(val ordinal: Int)

2 Bits required for encoding

Link copied to clipboard
inline class AGDepthAndFrontFace(val data: Int)
Link copied to clipboard
data class AGDiscardFrameBuffer(var frameBuffer: AGFrameBufferBase) : AGCommand

Releases memory for this frameBuffer

Link copied to clipboard
inline class AGDrawType(val ordinal: Int)

Encoded in 3 bits

Link copied to clipboard
interface AGFactory
Link copied to clipboard
Link copied to clipboard
interface AGFeatures
Link copied to clipboard
Link copied to clipboard
open class AGFrameBuffer(val base: AGFrameBufferBase, val id: Int = -1) : Closeable
Link copied to clipboard
open class AGFrameBufferBase(val isMain: Boolean) : AGObject
Link copied to clipboard
inline class AGFrameBufferInfo(val dataLong: Long)
Link copied to clipboard
inline class AGFrontFace(val ordinal: Int)

2 Bits required for encoding

Link copied to clipboard
inline class AGIndexType(val ordinal: Int)

Encoded in 2 bits

Link copied to clipboard
data class AGMultiBatch(val list: List<AGBatch>) : AGCommand
Link copied to clipboard
open class AGObject : Closeable
Link copied to clipboard
class AGProgramWithUniforms(val program: Program, val bufferCache: AGProgramWithUniforms.BufferCache = BufferCache())
Link copied to clipboard
inline class AGReadKind(val ordinal: Int)
Link copied to clipboard
data class AGReadPixelsToTexture(var frameBuffer: AGFrameBufferBase, var frameBufferInfo: AGFrameBufferInfo, var region: AGScissor, var texture: AGTexture) : AGCommand

Reads pixels from a region inside a frameBuffer into a texture.

Link copied to clipboard
data class AGScissor
Link copied to clipboard
inline class AGSize(val data: Int)
Link copied to clipboard
class AGStats(var texturesCount: Int = 0, var texturesMemory: ByteUnits = ByteUnits.fromBytes(0), var buffersCount: Int = 0, var buffersMemory: ByteUnits = ByteUnits.fromBytes(0), var frameBuffersCount: Int = 0, var frameBuffersMemory: ByteUnits = ByteUnits.fromBytes(0), var texturesCreated: Int = 0, var texturesDeleted: Int = 0, var programCount: Int = 0)
Link copied to clipboard
inline class AGStencilOp(val ordinal: Int)
Link copied to clipboard
inline class AGStencilOpFunc(val data: Int)
Link copied to clipboard
inline class AGStencilReference(val data: Long)
Link copied to clipboard
class AGTexture(val targetKind: AGTextureTargetKind = AGTextureTargetKind.TEXTURE_2D) : AGObject, Closeable
Link copied to clipboard
class AGTextureDrawer(val ag: AG)
Link copied to clipboard
inline class AGTextureTargetKind(val ordinal: Int)
Link copied to clipboard
inline class AGTextureUnitInfo
Link copied to clipboard
inline class AGTextureUnitInfoArray(val data: IntArray)
Link copied to clipboard
data class AGTextureUnits(val textures: Array<AGTexture?>, val infos: AGTextureUnitInfoArray)
Link copied to clipboard
class AGToCommandChannel(val channel: SendChannel<AGCommand>) : AG
Link copied to clipboard
inline class AGTriangleFace(val ordinal: Int)

2 bits required for encoding

Link copied to clipboard
data class AGVertexArrayObject(val list: FastArrayList<AGVertexData>, val isDynamic: Boolean = true) : Extra

List -> VAO

Link copied to clipboard
data class AGVertexData(var layout: VertexLayout = VertexLayout(), val buffer: AGBuffer = AGBuffer(), val baseOffset: Int = 0)
Link copied to clipboard
interface AGWindow : AGContainer
Link copied to clipboard
inline class AGWrapMode(val ordinal: Int)
Link copied to clipboard
Link copied to clipboard
interface IDefaultShaders
Link copied to clipboard

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun AG.clear(frameBuffer: AGFrameBuffer, color: RGBA = Colors.TRANSPARENT, depth: Float = 1.0f, stencil: Int = 0, clearColor: Boolean = true, clearDepth: Boolean = true, clearStencil: Boolean = true, scissor: AGScissor = AGScissor.NIL)
Link copied to clipboard
fun AG.draw(batch: AGBatch)
fun AG.draw(batch: AGMultiBatch)
fun AG.draw(frameBuffer: AGFrameBuffer, vertexData: AGVertexArrayObject, program: Program, drawType: AGDrawType, vertexCount: Int, indices: AGBuffer? = null, indexType: AGIndexType = AGIndexType.USHORT, drawOffset: Int = 0, blending: AGBlending = AGBlending.NORMAL, uniformBlocks: UniformBlocksBuffersRef = UniformBlocksBuffersRef.EMPTY, textureUnits: AGTextureUnits = AGTextureUnits.EMPTY, stencilRef: AGStencilReference = AGStencilReference.DEFAULT, stencilOpFunc: AGStencilOpFunc = AGStencilOpFunc.DEFAULT, colorMask: AGColorMask = AGColorMask.ALL_ENABLED, depthAndFrontFace: AGDepthAndFrontFace = AGDepthAndFrontFace.DEFAULT, scissor: AGScissor = AGScissor.NIL, cullFace: AGCullFace = AGCullFace.NONE, instances: Int = 1)
Link copied to clipboard
fun AG.execute(command: AGCommand)
Link copied to clipboard
suspend fun AG.executeUntilFinish(flow: ReceiveChannel<AGCommand>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun BoundsBuilder.plus(scissor: AGScissor): BoundsBuilder
Link copied to clipboard
fun ProgramWithDefault(vertex: VertexShader = DefaultShaders.VERTEX_DEFAULT, fragment: FragmentShader = DefaultShaders.FRAGMENT_SOLID_COLOR, name: String = "program"): Program
Link copied to clipboard
fun AG.readColor(frameBuffer: AGFrameBuffer): Bitmap32
fun AG.readColor(frameBuffer: AGFrameBuffer, bitmap: Bitmap32, x: Int = 0, y: Int = 0)
Link copied to clipboard
fun AG.readDepth(frameBuffer: AGFrameBuffer, out: FloatArray2)
fun AG.readDepth(frameBuffer: AGFrameBuffer, width: Int, height: Int, out: FloatArray)
Link copied to clipboard
fun AG.readPixel(frameBuffer: AGFrameBuffer, x: Int, y: Int): RGBA
Link copied to clipboard
fun AG.readStencil(frameBuffer: AGFrameBuffer, bitmap: Bitmap8)
Link copied to clipboard
fun AG.readToTexture(frameBuffer: AGFrameBuffer, texture: AGTexture, bounds: RectangleInt)
fun AG.readToTexture(frameBuffer: AGFrameBuffer, texture: AGTexture, x: Int = 0, y: Int = 0, width: Int = frameBuffer.width, height: Int = frameBuffer.height)
Link copied to clipboard
Link copied to clipboard