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 pPipeline) voidclearColorAndDepthTextures(GpuTexture pColorTexture, int pClearColor, GpuTexture pDepthTexture, double pClearDepth) voidclearColorAndDepthTextures(GpuTexture pColorTexture, int pClearColor, GpuTexture pDepthTexture, double pClearDepth, int pScissorX, int pScissorY, int pScissorWidth, int pScissorHeight) voidclearColorTexture(GpuTexture pTexture, int pColor) voidclearDepthTexture(GpuTexture pDepthTexture, double pClearDepth) voidclearStencilTexture(GpuTexture texture, int value) voidcopyTextureToBuffer(GpuTexture pTexture, GpuBuffer pBuffer, int pOffset, Runnable pTask, int pMipLevel) voidcopyTextureToBuffer(GpuTexture pTexture, GpuBuffer pBuffer, int pOffset, Runnable pTask, int pMipLevel, int pX, int pY, int pWidth, int pHeight) voidcopyTextureToTexture(GpuTexture pSource, GpuTexture pDestination, int pMipLevel, int pX, int pY, int pSourceX, int pSourceY, int pWidth, int pHeight) voidcopyToBuffer(GpuBufferSlice pSource, GpuBufferSlice pTarget) createRenderPass(Supplier<String> pDebugGroup, GpuTextureView pColorTexture, OptionalInt pClearColor) createRenderPass(Supplier<String> pDebugGroup, GpuTextureView pColorTexture, OptionalInt pClearColor, GpuTextureView pDepthTexture, OptionalDouble pClearDepth) private voiddrawFromBuffers(GlRenderPass pRenderPass, int pFirstIndex, int pIndex, int pIndexCount, VertexFormat.IndexType pIndexType, GlRenderPipeline pPipeline, int pPrimCount) protected voidexecuteDraw(GlRenderPass pRenderPass, int pFirstIndex, int pIndex, int pIndexCount, VertexFormat.IndexType pIndexType, int pPrimCount) protected <T> voidexecuteDrawMultiple(GlRenderPass pRenderPass, Collection<RenderPass.Draw<T>> pDraws, GpuBuffer pBuffer, VertexFormat.IndexType pIndexType, Collection<String> pUniforms, T pData) voidprotected GlDevicemapBuffer(GpuBufferSlice pSlice, boolean pRead, boolean pWrite) voidpresentTexture(GpuTextureView pTexture) private booleantrySetup(GlRenderPass pRenderPass, Collection<String> pUniforms) private voidverifyColorTexture(GpuTexture pTexture) private voidverifyDepthTexture(GpuTexture pTexture) private voidverifyRegion(GpuTexture pTexture, int pRegionX, int pRegionY, int pRegionWidth, int pRegionHeight) voidwriteToBuffer(GpuBufferSlice pSlice, ByteBuffer pBuffer) voidwriteToTexture(GpuTexture pTexture, NativeImage pImage) voidwriteToTexture(GpuTexture pTexture, NativeImage pImage, int pMipLevel, int pDepthOrLayer, int pX, int pY, int pWidth, int pHeight, int pSourceX, int pSourceY) voidwriteToTexture(GpuTexture pTexture, IntBuffer pBuffer, NativeImage.Format pFormat, int pMipLevel, int pDepthOrLayer, int pX, int pY, int pWidth, int pHeight)
-
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> pDebugGroup, GpuTextureView pColorTexture, OptionalInt pClearColor) - Specified by:
createRenderPassin interfaceCommandEncoder
-
createRenderPass
public RenderPass createRenderPass(Supplier<String> pDebugGroup, GpuTextureView pColorTexture, OptionalInt pClearColor, @Nullable GpuTextureView pDepthTexture, OptionalDouble pClearDepth) - Specified by:
createRenderPassin interfaceCommandEncoder
-
clearColorTexture
- Specified by:
clearColorTexturein interfaceCommandEncoder
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture pColorTexture, int pClearColor, GpuTexture pDepthTexture, double pClearDepth) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoder
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture pColorTexture, int pClearColor, GpuTexture pDepthTexture, double pClearDepth, int pScissorX, int pScissorY, int pScissorWidth, int pScissorHeight) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoder
-
verifyRegion
private void verifyRegion(GpuTexture pTexture, int pRegionX, int pRegionY, int pRegionWidth, int pRegionHeight) -
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 pTexture, NativeImage pImage, int pMipLevel, int pDepthOrLayer, int pX, int pY, int pWidth, int pHeight, int pSourceX, int pSourceY) - Specified by:
writeToTexturein interfaceCommandEncoder
-
writeToTexture
public void writeToTexture(GpuTexture pTexture, IntBuffer pBuffer, NativeImage.Format pFormat, int pMipLevel, int pDepthOrLayer, int pX, int pY, int pWidth, int pHeight) - Specified by:
writeToTexturein interfaceCommandEncoder
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture pTexture, GpuBuffer pBuffer, int pOffset, Runnable pTask, int pMipLevel) - Specified by:
copyTextureToBufferin interfaceCommandEncoder
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture pTexture, GpuBuffer pBuffer, int pOffset, Runnable pTask, int pMipLevel, int pX, int pY, int pWidth, int pHeight) - Specified by:
copyTextureToBufferin interfaceCommandEncoder
-
copyTextureToTexture
public void copyTextureToTexture(GpuTexture pSource, GpuTexture pDestination, int pMipLevel, int pX, int pY, int pSourceX, int pSourceY, int pWidth, int pHeight) - Specified by:
copyTextureToTexturein interfaceCommandEncoder
-
presentTexture
- Specified by:
presentTexturein interfaceCommandEncoder
-
createFence
- Specified by:
createFencein interfaceCommandEncoder
-
executeDrawMultiple
protected <T> void executeDrawMultiple(GlRenderPass pRenderPass, Collection<RenderPass.Draw<T>> pDraws, @Nullable GpuBuffer pBuffer, @Nullable VertexFormat.IndexType pIndexType, Collection<String> pUniforms, T pData) -
executeDraw
protected void executeDraw(GlRenderPass pRenderPass, int pFirstIndex, int pIndex, int pIndexCount, @Nullable VertexFormat.IndexType pIndexType, int pPrimCount) -
drawFromBuffers
private void drawFromBuffers(GlRenderPass pRenderPass, int pFirstIndex, int pIndex, int pIndexCount, @Nullable VertexFormat.IndexType pIndexType, GlRenderPipeline pPipeline, int pPrimCount) -
trySetup
-
applyPipelineState
-
finishRenderPass
public void finishRenderPass() -
getDevice
-