Skip to content

ShaderTranslation

final class ShaderTranslation
Package: dev.joid.lib.bridge.render.shader.source · Module: core · Source: ShaderTranslation.java

The translated sources of a shader, ready for the graphics API, the vertex and fragment stages and the optional stencil write stage.

GlslShaderTranslator.translate returns it, and the constructor of Shader hands it to the compileProgram hook of the backend.

ReturnsSignatureSummary
ShaderTranslationof(GlslDialect dialect, String vertex, String fragment, String stencilFragment) factoryCreates a translation from a dialect, the vertex and fragment sources, and the stencil fragment source, or null when the shader has no stencil write stage.

ReturnsSignatureSummary
GlslDialectgetDialect()Returns the dialect of the sources, which tells the backend how to compile and link them, such as whether it binds the attribute locations itself.
StringgetVertex()Returns the complete source of the vertex stage.
StringgetFragment()Returns the complete source of the fragment stage.
StringgetStencilFragment()Returns the fragment stage of the stencil write pass, which outputs the updated stencil value; null without stencil emulation.

ShaderTranslation of(GlslDialect dialect, String vertex, String fragment, String stencilFragment) factory

Creates a translation from a dialect, the vertex and fragment sources, and the stencil fragment source, or null when the shader has no stencil write stage.

GlslDialect getDialect()

Returns the dialect of the sources, which tells the backend how to compile and link them, such as whether it binds the attribute locations itself.

String getVertex()

Returns the complete source of the vertex stage.

String getFragment()

Returns the complete source of the fragment stage.

String getStencilFragment()

Returns the fragment stage of the stencil write pass, which outputs the updated stencil value; null without stencil emulation.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page