DebugOverlayTextRenderer
in package
Table of Contents
Properties
- $lineHeight : int
- The line height of the font
- $fontAtlas : BitmapFontAtlas
- $fontTexture : Texture
- The GL texture id of the font atlas
- $glstate : GLState
- $shaderProgram : ShaderProgram
- The debug font shader program.
- $VAO : int
- GL Vertex array object id
- $VBO : int
- GL Vertex buffer object id
Methods
- __construct() : mixed
- Constructor
- attachPass() : void
- Attaches a render pass to the pipeline
- loadDebugFontAtlas() : BitmapFontAtlas
- Loads the cozette font and returns a BitmapFontAtlas.
- createVAO() : void
- Creates the vertex array and buffer objects
- fillVertexBufferForText() : int
- Fills the given buffer object with the vertices for the given text.
Properties
$lineHeight
The line height of the font
public
int
$lineHeight
= 20
$fontAtlas
private
BitmapFontAtlas
$fontAtlas
$fontTexture
The GL texture id of the font atlas
private
Texture
$fontTexture
$glstate
private
GLState
$glstate
$shaderProgram
The debug font shader program.
private
ShaderProgram
$shaderProgram
$VAO
GL Vertex array object id
private
int
$VAO
= 0
$VBO
GL Vertex buffer object id
private
int
$VBO
= 0
Methods
__construct()
Constructor
public
__construct(GLState $glstate, BitmapFontAtlas $fontAtlas) : mixed
Parameters
- $glstate : GLState
-
The current GL state.
- $fontAtlas : BitmapFontAtlas
-
The font atlas to use.
attachPass()
Attaches a render pass to the pipeline
public
attachPass(RenderPipeline $pipeline, RenderTargetResource $renderTarget, array<string|int, DebugOverlayText> $texts) : void
Parameters
- $pipeline : RenderPipeline
- $renderTarget : RenderTargetResource
- $texts : array<string|int, DebugOverlayText>
loadDebugFontAtlas()
Loads the cozette font and returns a BitmapFontAtlas.
public
static loadDebugFontAtlas() : BitmapFontAtlas
Return values
BitmapFontAtlascreateVAO()
Creates the vertex array and buffer objects
private
createVAO() : void
fillVertexBufferForText()
Fills the given buffer object with the vertices for the given text.
private
fillVertexBufferForText(RenderTarget $renderTarget, FloatBuffer $vertices, DebugOverlayText $dtext) : int
Parameters
- $renderTarget : RenderTarget
- $vertices : FloatBuffer
- $dtext : DebugOverlayText
Return values
int —The number of vertices that were written to the buffer.