Class GlRenderPass
java.lang.Object
com.mojang.blaze3d.opengl.GlRenderPass
- All Implemented Interfaces:
RenderPassBackend, AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final GlDeviceprivate final GlCommandEncoderprivate final booleanprotected @Nullable GpuBufferprotected VertexFormat.IndexTypeprotected static final intprotected @Nullable GlRenderPipelineprotected final HashMap<String, GlRenderPass.TextureViewAndSampler> private final ScissorStateprotected final HashMap<String, GpuBufferSlice> static final booleanprotected final @Nullable GpuBuffer[] -
Constructor Summary
ConstructorsConstructorDescriptionGlRenderPass(GlCommandEncoder encoder, GlDevice device, boolean hasDepthTexture) -
Method Summary
Modifier and TypeMethodDescriptionvoidbindTexture(String name, @Nullable GpuTextureView textureView, @Nullable GpuSampler sampler) voidclose()voidvoiddraw(int firstVertex, int vertexCount) voiddrawIndexed(int baseVertex, int firstIndex, int indexCount, int instanceCount) <T> voiddrawMultipleIndexed(Collection<RenderPass.Draw<T>> draws, @Nullable GpuBuffer defaultIndexBuffer, @Nullable VertexFormat.IndexType defaultIndexType, Collection<String> dynamicUniforms, T uniformArgument) voidenableScissor(int x, int y, int width, int height) intintintintbooleanbooleanisClosed()booleanvoidvoidpushDebugGroup(Supplier<String> label) voidsetIndexBuffer(@Nullable GpuBuffer indexBuffer, VertexFormat.IndexType indexType) voidsetPipeline(RenderPipeline pipeline) voidsetUniform(String name, GpuBuffer value) voidsetUniform(String name, GpuBufferSlice value) voidsetVertexBuffer(int slot, GpuBuffer vertexBuffer) voidsetViewport(int x, int y, int width, int height)
-
Field Details
-
MAX_VERTEX_BUFFERS
protected static final int MAX_VERTEX_BUFFERS- See Also:
-
VALIDATION
public static final boolean VALIDATION -
encoder
-
device
-
hasDepthTexture
private final boolean hasDepthTexture -
closed
private boolean closed -
pipeline
-
vertexBuffers
-
indexBuffer
-
indexType
-
scissorState
-
uniforms
-
samplers
-
dirtyUniforms
-
-
Constructor Details
-
GlRenderPass
-
-
Method Details
-
hasDepthTexture
public boolean hasDepthTexture() -
pushDebugGroup
- Specified by:
pushDebugGroupin interfaceRenderPassBackend
-
popDebugGroup
public void popDebugGroup()- Specified by:
popDebugGroupin interfaceRenderPassBackend
-
setPipeline
- Specified by:
setPipelinein interfaceRenderPassBackend
-
bindTexture
public void bindTexture(String name, @Nullable GpuTextureView textureView, @Nullable GpuSampler sampler) - Specified by:
bindTexturein interfaceRenderPassBackend
-
setUniform
- Specified by:
setUniformin interfaceRenderPassBackend
-
setUniform
- Specified by:
setUniformin interfaceRenderPassBackend
-
setViewport
public void setViewport(int x, int y, int width, int height) - Specified by:
setViewportin interfaceRenderPassBackend
-
enableScissor
public void enableScissor(int x, int y, int width, int height) - Specified by:
enableScissorin interfaceRenderPassBackend
-
disableScissor
public void disableScissor()- Specified by:
disableScissorin interfaceRenderPassBackend
-
isScissorEnabled
public boolean isScissorEnabled() -
getScissorX
public int getScissorX() -
getScissorY
public int getScissorY() -
getScissorWidth
public int getScissorWidth() -
getScissorHeight
public int getScissorHeight() -
setVertexBuffer
- Specified by:
setVertexBufferin interfaceRenderPassBackend
-
setIndexBuffer
- Specified by:
setIndexBufferin interfaceRenderPassBackend
-
drawIndexed
public void drawIndexed(int baseVertex, int firstIndex, int indexCount, int instanceCount) - Specified by:
drawIndexedin interfaceRenderPassBackend
-
drawMultipleIndexed
public <T> void drawMultipleIndexed(Collection<RenderPass.Draw<T>> draws, @Nullable GpuBuffer defaultIndexBuffer, @Nullable VertexFormat.IndexType defaultIndexType, Collection<String> dynamicUniforms, T uniformArgument) - Specified by:
drawMultipleIndexedin interfaceRenderPassBackend
-
draw
public void draw(int firstVertex, int vertexCount) - Specified by:
drawin interfaceRenderPassBackend
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRenderPassBackend
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceRenderPassBackend
-