Package icyllis.arc3d.granite.geom
Class RasterTextStep
java.lang.Object
icyllis.arc3d.granite.GeometryStep
icyllis.arc3d.granite.geom.RasterTextStep
Draw text using a GPU glyph atlas and raster data generated by CPU.
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.arc3d.granite.GeometryStep
GeometryStep.ProgramImpl
-
Field Summary
Modifier and TypeFieldDescriptionstatic final VertexInputLayout.AttributeSet
static final VertexInputLayout.Attribute
static final VertexInputLayout.Attribute
static final VertexInputLayout.Attribute
The position in sub run's space, with creation matrix (no perspective), bearing and initial origin applied.Fields inherited from class icyllis.arc3d.granite.GeometryStep
DEPTH, FLAG_EMIT_COVERAGE, FLAG_EMIT_PRIMITIVE_COLOR, FLAG_HANDLE_SOLID_COLOR, FLAG_HAS_TEXTURES, FLAG_OUTSET_BOUNDS_FOR_AA, FLAG_PERFORM_SHADING, MODEL_VIEW, SOLID_COLOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Appends a key on the KeyBuilder that reflects any variety in the code that the geometry processor subclass can emit.void
emitFragmentColorCode
(Formatter fs, String outputColor) Emits the fragment color code into the fragment shader.void
emitFragmentCoverageCode
(Formatter fs, String outputCoverage) Remember that for DrawAtlas, we do not use texture swizzle, then the corresponding geometry step must handle the swizzle in shader code.void
emitSamplers
(UniformHandler uniformHandler) void
emitUniforms
(UniformHandler uniformHandler, boolean mayRequireLocalCoords) void
emitVaryings
(VaryingHandler varyingHandler, boolean usesFastSolidColor) void
emitVertexGeomCode
(Formatter vs, String worldPosVar, String localPosVar, boolean usesFastSolidColor) Emits the geometry code into the vertex shader.makeProgramImpl
(ShaderCaps caps) Returns a new instance of the appropriate implementation class for the given GeometryProcessor.void
writeMesh
(MeshDrawWriter writer, Draw draw, float[] solidColor, boolean mayRequireLocalCoords) void
writeUniformsAndTextures
(RecordingContext context, Draw draw, UniformDataGatherer uniformDataGatherer, TextureDataGatherer textureDataGatherer, boolean mayRequireLocalCoords) Methods inherited from class icyllis.arc3d.granite.GeometryStep
appendAttributesToKey, depthStencilFlags, depthStencilSettings, emitsCoverage, emitsPrimitiveColor, getInputLayout, handlesSolidColor, hasInstanceAttributes, hasVertexAttributes, instanceAttributes, instanceBinding, instanceStride, makeColorAttribute, name, numInstanceAttributes, numInstanceLocations, numTextureSamplers, numVertexAttributes, numVertexLocations, performsShading, primitiveType, textureSamplerState, textureSamplerSwizzle, uniqueID, vertexAttributes, vertexBinding, vertexStride
-
Field Details
-
XY
The position in sub run's space, with creation matrix (no perspective), bearing and initial origin applied. -
UV
-
SIZE
-
INSTANCE_ATTRIBS
-
-
Constructor Details
-
RasterTextStep
public RasterTextStep(int maskFormat)
-
-
Method Details
-
appendToKey
Description copied from class:GeometryStep
Appends a key on the KeyBuilder that reflects any variety in the code that the geometry processor subclass can emit.- Specified by:
appendToKey
in classGeometryStep
- See Also:
-
makeProgramImpl
Description copied from class:GeometryStep
Returns a new instance of the appropriate implementation class for the given GeometryProcessor. This method is called only when the specified key does not exist in the program cache.- Specified by:
makeProgramImpl
in classGeometryStep
- See Also:
-
emitVaryings
- Overrides:
emitVaryings
in classGeometryStep
-
emitUniforms
- Overrides:
emitUniforms
in classGeometryStep
-
emitSamplers
- Overrides:
emitSamplers
in classGeometryStep
-
emitVertexGeomCode
public void emitVertexGeomCode(Formatter vs, @Nonnull String worldPosVar, @Nullable String localPosVar, boolean usesFastSolidColor) Description copied from class:GeometryStep
Emits the geometry code into the vertex shader. Implementation must define "vec4 worldPosVar" with the given name and setup it. If localPosVar is not null, then it must write geometry's local pos to it.- Overrides:
emitVertexGeomCode
in classGeometryStep
-
emitFragmentColorCode
Description copied from class:GeometryStep
Emits the fragment color code into the fragment shader. This is either paint's solid color or per-vertex primitive color. SeeGeometryStep.FLAG_HANDLE_SOLID_COLOR
andGeometryStep.FLAG_EMIT_PRIMITIVE_COLOR
.- Overrides:
emitFragmentColorCode
in classGeometryStep
-
emitFragmentCoverageCode
Remember that for DrawAtlas, we do not use texture swizzle, then the corresponding geometry step must handle the swizzle in shader code.- Overrides:
emitFragmentCoverageCode
in classGeometryStep
- See Also:
-
writeMesh
public void writeMesh(MeshDrawWriter writer, Draw draw, @Nullable float[] solidColor, boolean mayRequireLocalCoords) - Overrides:
writeMesh
in classGeometryStep
-
writeUniformsAndTextures
public void writeUniformsAndTextures(RecordingContext context, Draw draw, UniformDataGatherer uniformDataGatherer, TextureDataGatherer textureDataGatherer, boolean mayRequireLocalCoords) - Overrides:
writeUniformsAndTextures
in classGeometryStep
-