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 p_410863_, int p_410603_, GpuTexture p_409616_, double p_410193_) voidclearColorAndDepthTextures(GpuTexture p_416345_, int p_416520_, GpuTexture p_416382_, double p_415785_, int p_415996_, int p_416125_, int p_415580_, int p_415906_) voidclearColorTexture(GpuTexture p_410228_, int p_410646_) voidclearDepthTexture(GpuTexture p_410548_, double p_410067_) voidclearStencilTexture(GpuTexture texture, int value) voidcopyTextureToBuffer(GpuTexture p_410088_, GpuBuffer p_409674_, int p_410546_, Runnable p_410567_, int p_410125_) voidcopyTextureToBuffer(GpuTexture p_410781_, GpuBuffer p_410413_, int p_410080_, Runnable p_410081_, int p_410819_, int p_409841_, int p_409880_, int p_409853_, int p_410558_) voidcopyTextureToTexture(GpuTexture p_410700_, GpuTexture p_410735_, int p_410458_, int p_409803_, int p_410236_, int p_410552_, int p_410677_, int p_409870_, int p_409949_) voidcopyToBuffer(GpuBufferSlice p_428848_, GpuBufferSlice p_428840_) createRenderPass(Supplier<String> p_419658_, GpuTextureView p_423471_, OptionalInt p_410192_) createRenderPass(Supplier<String> p_419957_, GpuTextureView p_423627_, OptionalInt p_410460_, GpuTextureView p_423565_, OptionalDouble p_423486_) 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 p_418128_, boolean p_418013_, boolean p_418412_) voidpresentTexture(GpuTextureView p_423537_) 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 p_418368_, ByteBuffer p_410689_) voidwriteToTexture(GpuTexture p_409824_, NativeImage p_410255_) voidwriteToTexture(GpuTexture p_410473_, NativeImage p_423502_, int p_410132_, int p_409948_, int p_410810_, int p_409825_, int p_410770_, int p_423635_, int p_423531_, int p_423633_) voidwriteToTexture(GpuTexture p_409608_, ByteBuffer p_436678_, NativeImage.Format p_423578_, int p_410252_, int p_410814_, int p_410606_, int p_410618_, int p_410484_, int p_410120_)
-
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> p_419658_, GpuTextureView p_423471_, OptionalInt p_410192_) - Specified by:
createRenderPassin interfaceCommandEncoder
-
createRenderPass
public RenderPass createRenderPass(Supplier<String> p_419957_, GpuTextureView p_423627_, OptionalInt p_410460_, @Nullable GpuTextureView p_423565_, OptionalDouble p_423486_) - Specified by:
createRenderPassin interfaceCommandEncoder
-
clearColorTexture
- Specified by:
clearColorTexturein interfaceCommandEncoder
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture p_410863_, int p_410603_, GpuTexture p_409616_, double p_410193_) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoder
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture p_416345_, int p_416520_, GpuTexture p_416382_, double p_415785_, int p_415996_, int p_416125_, int p_415580_, int p_415906_) - 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
public GpuBuffer.MappedView mapBuffer(GpuBufferSlice p_418128_, boolean p_418013_, boolean p_418412_) - Specified by:
mapBufferin interfaceCommandEncoder
-
copyToBuffer
- Specified by:
copyToBufferin interfaceCommandEncoder
-
writeToTexture
- Specified by:
writeToTexturein interfaceCommandEncoder
-
writeToTexture
public void writeToTexture(GpuTexture p_410473_, NativeImage p_423502_, int p_410132_, int p_409948_, int p_410810_, int p_409825_, int p_410770_, int p_423635_, int p_423531_, int p_423633_) - Specified by:
writeToTexturein interfaceCommandEncoder
-
writeToTexture
public void writeToTexture(GpuTexture p_409608_, ByteBuffer p_436678_, NativeImage.Format p_423578_, int p_410252_, int p_410814_, int p_410606_, int p_410618_, int p_410484_, int p_410120_) - Specified by:
writeToTexturein interfaceCommandEncoder
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture p_410088_, GpuBuffer p_409674_, int p_410546_, Runnable p_410567_, int p_410125_) - Specified by:
copyTextureToBufferin interfaceCommandEncoder
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture p_410781_, GpuBuffer p_410413_, int p_410080_, Runnable p_410081_, int p_410819_, int p_409841_, int p_409880_, int p_409853_, int p_410558_) - Specified by:
copyTextureToBufferin interfaceCommandEncoder
-
copyTextureToTexture
public void copyTextureToTexture(GpuTexture p_410700_, GpuTexture p_410735_, int p_410458_, int p_409803_, int p_410236_, int p_410552_, int p_410677_, int p_409870_, int p_409949_) - 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
-