JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.demos.graph.TextRendererGLELBase Class Referenceabstract
Inheritance diagram for com.jogamp.opengl.demos.graph.TextRendererGLELBase:
Collaboration diagram for com.jogamp.opengl.demos.graph.TextRendererGLELBase:

Public Member Functions

 TextRendererGLELBase (final int renderModes, final int sampleCount)
 
void setSharedPMVMatrix (final PMVMatrix4f pmv)
 In exclusive mode, impl. More...
 
void setRendererCallbacks (final RegionRenderer.GLCallback enable, final RegionRenderer.GLCallback disable)
 See RegionRenderer#create(Vertex.Factory<? extends Vertex>, RenderState, com.jogamp.graph.curve.opengl.RegionRenderer.GLCallback, com.jogamp.graph.curve.opengl.RegionRenderer.GLCallback). More...
 
void setFlipVerticalInGLOrientation (final boolean v)
 
final RegionRenderer getRenderer ()
 
final TextRegionUtil getTextRenderUtil ()
 
PMVMatrix4f getMatrix ()
 
boolean isMatrixShared ()
 
void init (final GLAutoDrawable drawable)
 Called by the drawable immediately after the OpenGL context is initialized. More...
 
void reshape (final GLAutoDrawable drawable, final int x, final int y, final int width, final int height)
 Called by the drawable during the first repaint after the component has been resized. More...
 
abstract void display (GLAutoDrawable drawable)
 Called by the drawable to initiate OpenGL rendering by the client. More...
 
void dispose (final GLAutoDrawable drawable)
 Notifies the listener to perform the release of all OpenGL resources per GLContext, such as memory buffers and GLSL programs. More...
 
void renderString (final GLAutoDrawable drawable, final Font font, final float pixelSize, final CharSequence text, final int column, final float tx, final float ty, final float tz, final boolean cacheRegion)
 
void renderString (final GLAutoDrawable drawable, final Font font, final float pixelSize, final CharSequence text, final int column, final float tx, final float ty, final float tz, final GLRegion region)
 
void renderString (final GLAutoDrawable drawable, final Font font, final float pixelSize, final CharSequence text, final int column, final int row, final float tx, final float ty, final float tz, final boolean cacheRegion)
 
void renderString (final GLAutoDrawable drawable, final Font font, final float pixelSize, final CharSequence text, final int column, final int row, final float tx, final float ty, final float tz, final GLRegion region)
 
void renderRegion (final GLAutoDrawable drawable, final Font font, final float pixelSize, final int column, final int row, final float tx, final float ty, final float tz, final GLRegion region)
 
void init (GLAutoDrawable drawable)
 Called by the drawable immediately after the OpenGL context is initialized. More...
 
void dispose (GLAutoDrawable drawable)
 Notifies the listener to perform the release of all OpenGL resources per GLContext, such as memory buffers and GLSL programs. More...
 
void display (GLAutoDrawable drawable)
 Called by the drawable to initiate OpenGL rendering by the client. More...
 
void reshape (GLAutoDrawable drawable, int x, int y, int width, int height)
 Called by the drawable during the first repaint after the component has been resized. More...
 

Static Public Member Functions

static Font getFont (final int fontSet, final int fontFamily, final int fontStylebits)
 

Public Attributes

final int renderModes
 

Protected Attributes

final int pass2SampleCount
 
final float[] staticRGBAColor = new float[] { 1f, 1f, 1f, 1f }
 
RegionRenderer renderer = null
 
TextRegionUtil textRenderUtil = null
 
final AffineTransform tempT1 = new AffineTransform()
 
final AffineTransform tempT2 = new AffineTransform()
 
float pixelScale = 1.0f
 scale pixel, default is 1f More...
 
float dpiH = 96
 dpi display resolution, queried at init(GLAutoDrawable) if NEWT, otherwise 96. More...
 

Detailed Description

Definition at line 49 of file TextRendererGLELBase.java.

Constructor & Destructor Documentation

◆ TextRendererGLELBase()

com.jogamp.opengl.demos.graph.TextRendererGLELBase.TextRendererGLELBase ( final int  renderModes,
final int  sampleCount 
)
Parameters
renderModes
sampleCountdesired multisampling sample count for msaa-rendering.
See also
setRendererCallbacks(com.jogamp.graph.curve.opengl.RegionRenderer.GLCallback, com.jogamp.graph.curve.opengl.RegionRenderer.GLCallback)

Definition at line 92 of file TextRendererGLELBase.java.

Member Function Documentation

◆ display()

abstract void com.jogamp.opengl.demos.graph.TextRendererGLELBase.display ( GLAutoDrawable  drawable)
abstract

Called by the drawable to initiate OpenGL rendering by the client.

After all GLEventListeners have been notified of a display event, the drawable will swap its buffers if setAutoSwapBufferMode is enabled.

Implements com.jogamp.opengl.GLEventListener.

◆ dispose()

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.dispose ( final GLAutoDrawable  drawable)

Notifies the listener to perform the release of all OpenGL resources per GLContext, such as memory buffers and GLSL programs.

Called by the drawable before the OpenGL context is destroyed by an external event, like a reconfiguration of the GLAutoDrawable closing an attached window, but also manually by calling destroy.

Note that this event does not imply the end of life of the application. It could be produced with a followup call to init(GLAutoDrawable) in case the GLContext has been recreated, e.g. due to a pixel configuration change in a multihead environment.

Implements com.jogamp.opengl.GLEventListener.

Definition at line 169 of file TextRendererGLELBase.java.

Here is the call graph for this function:

◆ getFont()

static Font com.jogamp.opengl.demos.graph.TextRendererGLELBase.getFont ( final int  fontSet,
final int  fontFamily,
final int  fontStylebits 
)
static
Parameters
fontSete.g. default is FontFactory#UBUNTU
fontFamilye.g. default is FontSet#FAMILY_REGULAR
fontStylebitse.g. default is FontSet#STYLE_NONE
Returns
the resulting font.

Definition at line 78 of file TextRendererGLELBase.java.

Here is the call graph for this function:

◆ getMatrix()

PMVMatrix4f com.jogamp.opengl.demos.graph.TextRendererGLELBase.getMatrix ( )

Definition at line 127 of file TextRendererGLELBase.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRenderer()

final RegionRenderer com.jogamp.opengl.demos.graph.TextRendererGLELBase.getRenderer ( )

Definition at line 124 of file TextRendererGLELBase.java.

◆ getTextRenderUtil()

final TextRegionUtil com.jogamp.opengl.demos.graph.TextRendererGLELBase.getTextRenderUtil ( )

Definition at line 125 of file TextRendererGLELBase.java.

◆ init()

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.init ( final GLAutoDrawable  drawable)

Called by the drawable immediately after the OpenGL context is initialized.

Can be used to perform one-time OpenGL initialization per GLContext, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying OpenGL context for the GLAutoDrawable is destroyed and recreated, for example if a GLCanvas is removed from the widget hierarchy and later added again.

Implements com.jogamp.opengl.GLEventListener.

Definition at line 131 of file TextRendererGLELBase.java.

Here is the call graph for this function:

◆ isMatrixShared()

boolean com.jogamp.opengl.demos.graph.TextRendererGLELBase.isMatrixShared ( )

Definition at line 128 of file TextRendererGLELBase.java.

◆ renderRegion()

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.renderRegion ( final GLAutoDrawable  drawable,
final Font  font,
final float  pixelSize,
final int  column,
final int  row,
final float  tx,
final float  ty,
final float  tz,
final GLRegion  region 
)

Definition at line 281 of file TextRendererGLELBase.java.

Here is the call graph for this function:

◆ renderString() [1/4]

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.renderString ( final GLAutoDrawable  drawable,
final Font  font,
final float  pixelSize,
final CharSequence  text,
final int  column,
final float  tx,
final float  ty,
final float  tz,
final boolean  cacheRegion 
)
Parameters
drawable
font
pixelSizeUse Font#toPixels(float, float) for resolution correct pixel-size.
text
column
tx
ty
tz
cacheRegion

Definition at line 190 of file TextRendererGLELBase.java.

◆ renderString() [2/4]

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.renderString ( final GLAutoDrawable  drawable,
final Font  font,
final float  pixelSize,
final CharSequence  text,
final int  column,
final float  tx,
final float  ty,
final float  tz,
final GLRegion  region 
)

Definition at line 197 of file TextRendererGLELBase.java.

◆ renderString() [3/4]

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.renderString ( final GLAutoDrawable  drawable,
final Font  font,
final float  pixelSize,
final CharSequence  text,
final int  column,
final int  row,
final float  tx,
final float  ty,
final float  tz,
final boolean  cacheRegion 
)
Parameters
drawable
font
pixelSizeUse Font#toPixels(float, float) for resolution correct pixel-size.
text
column
row
tx
ty
tz
cacheRegion

Definition at line 217 of file TextRendererGLELBase.java.

◆ renderString() [4/4]

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.renderString ( final GLAutoDrawable  drawable,
final Font  font,
final float  pixelSize,
final CharSequence  text,
final int  column,
final int  row,
final float  tx,
final float  ty,
final float  tz,
final GLRegion  region 
)

Definition at line 224 of file TextRendererGLELBase.java.

◆ reshape()

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.reshape ( final GLAutoDrawable  drawable,
final int  x,
final int  y,
final int  width,
final int  height 
)

Called by the drawable during the first repaint after the component has been resized.

The client can update it's viewport associated data and view volume of the window appropriately.

For efficiency the GL viewport has already been updated via glViewport(x, y, width, height) when this method is called.

Parameters
drawablethe triggering GLAutoDrawable
xlower left corner of the viewport rectangle in pixel units
ylower left corner of the viewport rectangle in pixel units
widthwidth of the viewport rectangle in pixel units
heightheight of the viewport rectangle in pixel units

Implements com.jogamp.opengl.GLEventListener.

Definition at line 150 of file TextRendererGLELBase.java.

Here is the call graph for this function:

◆ setFlipVerticalInGLOrientation()

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.setFlipVerticalInGLOrientation ( final boolean  v)

Definition at line 123 of file TextRendererGLELBase.java.

◆ setRendererCallbacks()

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.setRendererCallbacks ( final RegionRenderer.GLCallback  enable,
final RegionRenderer.GLCallback  disable 
)

◆ setSharedPMVMatrix()

void com.jogamp.opengl.demos.graph.TextRendererGLELBase.setSharedPMVMatrix ( final PMVMatrix4f  pmv)

In exclusive mode, impl.

uses a pixelScale of 1f and orthogonal PMV on window dimensions and renderString uses 'height' for '1'.

In non-exclusive mode, i.e. shared w/ custom PMV (within another 3d scene), it uses the custom pixelScale and renderString uses normalized 'height', i.e. '1'.

Must be called before init(GLAutoDrawable).

Definition at line 108 of file TextRendererGLELBase.java.

Member Data Documentation

◆ dpiH

float com.jogamp.opengl.demos.graph.TextRendererGLELBase.dpiH = 96
protected

dpi display resolution, queried at init(GLAutoDrawable) if NEWT, otherwise 96.

Definition at line 68 of file TextRendererGLELBase.java.

◆ pass2SampleCount

final int com.jogamp.opengl.demos.graph.TextRendererGLELBase.pass2SampleCount
protected

Definition at line 52 of file TextRendererGLELBase.java.

◆ pixelScale

float com.jogamp.opengl.demos.graph.TextRendererGLELBase.pixelScale = 1.0f
protected

scale pixel, default is 1f

Definition at line 65 of file TextRendererGLELBase.java.

◆ renderer

RegionRenderer com.jogamp.opengl.demos.graph.TextRendererGLELBase.renderer = null
protected

Definition at line 58 of file TextRendererGLELBase.java.

◆ renderModes

final int com.jogamp.opengl.demos.graph.TextRendererGLELBase.renderModes

Definition at line 50 of file TextRendererGLELBase.java.

◆ staticRGBAColor

final float [] com.jogamp.opengl.demos.graph.TextRendererGLELBase.staticRGBAColor = new float[] { 1f, 1f, 1f, 1f }
protected

Definition at line 53 of file TextRendererGLELBase.java.

◆ tempT1

final AffineTransform com.jogamp.opengl.demos.graph.TextRendererGLELBase.tempT1 = new AffineTransform()
protected

Definition at line 61 of file TextRendererGLELBase.java.

◆ tempT2

final AffineTransform com.jogamp.opengl.demos.graph.TextRendererGLELBase.tempT2 = new AffineTransform()
protected

Definition at line 62 of file TextRendererGLELBase.java.

◆ textRenderUtil

TextRegionUtil com.jogamp.opengl.demos.graph.TextRendererGLELBase.textRenderUtil = null
protected

Definition at line 59 of file TextRendererGLELBase.java.


The documentation for this class was generated from the following file: