Package com.mojang.blaze3d.opengl
Class GlCommandEncoder
java.lang.Object
com.mojang.blaze3d.opengl.GlCommandEncoder
- All Implemented Interfaces:
CommandEncoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GlDeviceprivate final intprivate booleanprivate RenderPipelineprivate 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 scissorX, int scissorY, int scissorWidth, int scissorHeight) voidclearColorTexture(GpuTexture texture, int color) voidclearDepthTexture(GpuTexture depthTexture, double clearDepth) voidclearStencilTexture(GpuTexture texture, int value) voidcopyTextureToBuffer(GpuTexture texture, GpuBuffer buffer, int offset, Runnable task, int mipLevel) voidcopyTextureToBuffer(GpuTexture texture, GpuBuffer buffer, int offset, Runnable task, int mipLevel, int x, int y, int width, int height) voidcopyTextureToTexture(GpuTexture source, GpuTexture destination, int mipLevel, int x, int y, int sourceX, int sourceY, int width, int height) voidcopyToBuffer(GpuBufferSlice source, GpuBufferSlice target) createRenderPass(Supplier<String> debugGroup, GpuTextureView colorTexture, OptionalInt clearColor) createRenderPass(Supplier<String> debugGroup, GpuTextureView colorTexture, OptionalInt clearColor, GpuTextureView depthTexture, OptionalDouble clearDepth) private voiddrawFromBuffers(GlRenderPass renderPass, int firstIndex, int index, int indexCount, VertexFormat.IndexType indexType, GlRenderPipeline pipeline, int primCount) protected voidexecuteDraw(GlRenderPass renderPass, int firstIndex, int index, int indexCount, VertexFormat.IndexType indexType, int primCount) protected <T> voidexecuteDrawMultiple(GlRenderPass renderPass, Collection<RenderPass.Draw<T>> draws, GpuBuffer buffer, VertexFormat.IndexType indexType, Collection<String> uniforms, T data) voidprotected GlDevicemapBuffer(GpuBufferSlice slice, boolean read, boolean write) voidpresentTexture(GpuTextureView texture) private booleantrySetup(GlRenderPass renderPass, Collection<String> uniforms) private voidverifyColorTexture(GpuTexture texture) private voidverifyDepthTexture(GpuTexture texture) private voidverifyRegion(GpuTexture texture, int regionX, int regionY, int regionWidth, int regionHeight) voidwriteToBuffer(GpuBufferSlice slice, ByteBuffer buffer) voidwriteToTexture(GpuTexture texture, NativeImage image) voidwriteToTexture(GpuTexture texture, NativeImage image, int mipLevel, int depthOrLayer, int x, int y, int width, int height, int sourceX, int sourceY) voidwriteToTexture(GpuTexture texture, IntBuffer buffer, NativeImage.Format format, int mipLevel, int depthOrLayer, int x, int y, 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
-
-
Constructor Details
-
GlCommandEncoder
-
-
Method Details
-
createRenderPass
public RenderPass createRenderPass(Supplier<String> debugGroup, GpuTextureView colorTexture, OptionalInt clearColor) - Specified by:
createRenderPassin interfaceCommandEncoder
-
createRenderPass
public RenderPass createRenderPass(Supplier<String> debugGroup, GpuTextureView colorTexture, OptionalInt clearColor, @Nullable GpuTextureView depthTexture, OptionalDouble clearDepth) - Specified by:
createRenderPassin interfaceCommandEncoder
-
clearColorTexture
- Specified by:
clearColorTexturein interfaceCommandEncoder
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture colorTexture, int clearColor, GpuTexture depthTexture, double clearDepth) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoder
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture colorTexture, int clearColor, GpuTexture depthTexture, double clearDepth, int scissorX, int scissorY, int scissorWidth, int scissorHeight) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoder
-
verifyRegion
private void verifyRegion(GpuTexture texture, int regionX, int regionY, int regionWidth, int regionHeight) -
clearDepthTexture
- Specified by:
clearDepthTexturein interfaceCommandEncoder
-
clearStencilTexture
- Specified by:
clearStencilTexturein interfaceCommandEncoder
-
verifyColorTexture
-
verifyDepthTexture
-
writeToBuffer
- Specified by:
writeToBufferin interfaceCommandEncoder
-
mapBuffer
- Specified by:
mapBufferin interfaceCommandEncoder
-
mapBuffer
- Specified by:
mapBufferin interfaceCommandEncoder
-
copyToBuffer
- Specified by:
copyToBufferin interfaceCommandEncoder
-
writeToTexture
- Specified by:
writeToTexturein interfaceCommandEncoder
-
writeToTexture
public void writeToTexture(GpuTexture texture, NativeImage image, int mipLevel, int depthOrLayer, int x, int y, int width, int height, int sourceX, int sourceY) - Specified by:
writeToTexturein interfaceCommandEncoder
-
writeToTexture
public void writeToTexture(GpuTexture texture, IntBuffer buffer, NativeImage.Format format, int mipLevel, int depthOrLayer, int x, int y, int width, int height) - Specified by:
writeToTexturein interfaceCommandEncoder
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture texture, GpuBuffer buffer, int offset, Runnable task, int mipLevel) - Specified by:
copyTextureToBufferin interfaceCommandEncoder
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture texture, GpuBuffer buffer, int offset, Runnable task, int mipLevel, int x, int y, int width, int height) - Specified by:
copyTextureToBufferin interfaceCommandEncoder
-
copyTextureToTexture
public void copyTextureToTexture(GpuTexture source, GpuTexture destination, int mipLevel, int x, int y, int sourceX, int sourceY, int width, int height) - Specified by:
copyTextureToTexturein interfaceCommandEncoder
-
presentTexture
- Specified by:
presentTexturein interfaceCommandEncoder
-
createFence
- Specified by:
createFencein interfaceCommandEncoder
-
executeDrawMultiple
protected <T> void executeDrawMultiple(GlRenderPass renderPass, Collection<RenderPass.Draw<T>> draws, @Nullable GpuBuffer buffer, @Nullable VertexFormat.IndexType indexType, Collection<String> uniforms, T data) -
executeDraw
protected void executeDraw(GlRenderPass renderPass, int firstIndex, int index, int indexCount, @Nullable VertexFormat.IndexType indexType, int primCount) -
drawFromBuffers
private void drawFromBuffers(GlRenderPass renderPass, int firstIndex, int index, int indexCount, @Nullable VertexFormat.IndexType indexType, GlRenderPipeline pipeline, int primCount) -
trySetup
-
applyPipelineState
-
finishRenderPass
public void finishRenderPass() -
getDevice
-