Class GlCommandEncoder
java.lang.Object
com.mojang.blaze3d.opengl.GlCommandEncoder
- All Implemented Interfaces:
CommandEncoderBackend
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable GlTimerQueryprivate final GlDeviceprivate final intprivate booleanprivate @Nullable RenderPipelineprivate @Nullable GlProgramprivate static final org.slf4j.Loggerprivate final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapplyPipelineState(RenderPipeline pipeline) voidclearColorAndDepthTextures(GpuTexture colorTexture, int clearColor, GpuTexture depthTexture, double clearDepth) voidclearColorAndDepthTextures(GpuTexture colorTexture, int clearColor, GpuTexture depthTexture, double clearDepth, int regionX, int regionY, int regionWidth, int regionHeight) voidclearColorTexture(GpuTexture colorTexture, int clearColor) voidclearDepthTexture(GpuTexture depthTexture, double clearDepth) voidclearStencilTexture(GpuTexture texture, int value) voidcopyTextureToBuffer(GpuTexture source, GpuBuffer destination, long offset, Runnable callback, int mipLevel) voidcopyTextureToBuffer(GpuTexture source, GpuBuffer destination, long offset, Runnable callback, int mipLevel, int x, int y, int width, int height) voidcopyTextureToTexture(GpuTexture source, GpuTexture destination, int mipLevel, int destX, int destY, int sourceX, int sourceY, int width, int height) voidcopyToBuffer(GpuBufferSlice source, GpuBufferSlice target) createRenderPass(Supplier<String> label, GpuTextureView colorTexture, OptionalInt clearColor) createRenderPass(Supplier<String> label, GpuTextureView colorTexture, OptionalInt clearColor, @Nullable GpuTextureView depthTexture, OptionalDouble clearDepth) private voiddrawFromBuffers(GlRenderPass renderPass, int baseVertex, int firstIndex, int drawCount, @Nullable VertexFormat.IndexType indexType, GlRenderPipeline pipeline, int instanceCount) protected voidexecuteDraw(GlRenderPass renderPass, int baseVertex, int firstIndex, int drawCount, @Nullable VertexFormat.IndexType indexType, int instanceCount) protected <T> voidexecuteDrawMultiple(GlRenderPass renderPass, Collection<RenderPass.Draw<T>> draws, @Nullable GpuBuffer defaultIndexBuffer, @Nullable VertexFormat.IndexType defaultIndexType, Collection<String> dynamicUniforms, T uniformArgument) voidbooleanmapBuffer(GpuBufferSlice slice, boolean read, boolean write) voidpresentTexture(GpuTextureView textureView) voidtimerQueryEnd(GpuQuery query) private booleantrySetup(GlRenderPass renderPass, Collection<String> dynamicUniforms) voidwriteToBuffer(GpuBufferSlice slice, ByteBuffer data) voidwriteToTexture(GpuTexture destination, NativeImage source, int mipLevel, int depthOrLayer, int destX, int destY, int width, int height, int sourceX, int sourceY) voidwriteToTexture(GpuTexture destination, ByteBuffer source, NativeImage.Format format, int mipLevel, int depthOrLayer, int destX, int destY, int width, int height)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
device
-
readFbo
private final int readFbo -
drawFbo
private final int drawFbo -
lastPipeline
-
inRenderPass
private boolean inRenderPass -
lastProgram
-
activeTimerQuery
-
-
Constructor Details
-
GlCommandEncoder
-
-
Method Details
-
createRenderPass
public RenderPassBackend createRenderPass(Supplier<String> label, GpuTextureView colorTexture, OptionalInt clearColor) - Specified by:
createRenderPassin interfaceCommandEncoderBackend
-
createRenderPass
public RenderPassBackend createRenderPass(Supplier<String> label, GpuTextureView colorTexture, OptionalInt clearColor, @Nullable GpuTextureView depthTexture, OptionalDouble clearDepth) - Specified by:
createRenderPassin interfaceCommandEncoderBackend
-
isInRenderPass
public boolean isInRenderPass()- Specified by:
isInRenderPassin interfaceCommandEncoderBackend
-
clearColorTexture
- Specified by:
clearColorTexturein interfaceCommandEncoderBackend
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture colorTexture, int clearColor, GpuTexture depthTexture, double clearDepth) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoderBackend
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture colorTexture, int clearColor, GpuTexture depthTexture, double clearDepth, int regionX, int regionY, int regionWidth, int regionHeight) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoderBackend
-
clearDepthTexture
- Specified by:
clearDepthTexturein interfaceCommandEncoderBackend
-
clearStencilTexture
- Specified by:
clearStencilTexturein interfaceCommandEncoderBackend
-
writeToBuffer
- Specified by:
writeToBufferin interfaceCommandEncoderBackend
-
mapBuffer
- Specified by:
mapBufferin interfaceCommandEncoderBackend
-
copyToBuffer
- Specified by:
copyToBufferin interfaceCommandEncoderBackend
-
writeToTexture
public void writeToTexture(GpuTexture destination, NativeImage source, int mipLevel, int depthOrLayer, int destX, int destY, int width, int height, int sourceX, int sourceY) - Specified by:
writeToTexturein interfaceCommandEncoderBackend
-
writeToTexture
public void writeToTexture(GpuTexture destination, ByteBuffer source, NativeImage.Format format, int mipLevel, int depthOrLayer, int destX, int destY, int width, int height) - Specified by:
writeToTexturein interfaceCommandEncoderBackend
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture source, GpuBuffer destination, long offset, Runnable callback, int mipLevel) - Specified by:
copyTextureToBufferin interfaceCommandEncoderBackend
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture source, GpuBuffer destination, long offset, Runnable callback, int mipLevel, int x, int y, int width, int height) - Specified by:
copyTextureToBufferin interfaceCommandEncoderBackend
-
copyTextureToTexture
public void copyTextureToTexture(GpuTexture source, GpuTexture destination, int mipLevel, int destX, int destY, int sourceX, int sourceY, int width, int height) - Specified by:
copyTextureToTexturein interfaceCommandEncoderBackend
-
presentTexture
- Specified by:
presentTexturein interfaceCommandEncoderBackend
-
createFence
- Specified by:
createFencein interfaceCommandEncoderBackend
-
executeDrawMultiple
protected <T> void executeDrawMultiple(GlRenderPass renderPass, Collection<RenderPass.Draw<T>> draws, @Nullable GpuBuffer defaultIndexBuffer, @Nullable VertexFormat.IndexType defaultIndexType, Collection<String> dynamicUniforms, T uniformArgument) -
executeDraw
protected void executeDraw(GlRenderPass renderPass, int baseVertex, int firstIndex, int drawCount, @Nullable VertexFormat.IndexType indexType, int instanceCount) -
drawFromBuffers
private void drawFromBuffers(GlRenderPass renderPass, int baseVertex, int firstIndex, int drawCount, @Nullable VertexFormat.IndexType indexType, GlRenderPipeline pipeline, int instanceCount) -
trySetup
-
applyPipelineState
-
finishRenderPass
public void finishRenderPass() -
timerQueryBegin
- Specified by:
timerQueryBeginin interfaceCommandEncoderBackend
-
timerQueryEnd
- Specified by:
timerQueryEndin interfaceCommandEncoderBackend
-