Class CommandRecorder
java.lang.Object
dev.engine.graphics.command.CommandRecorder
Records render commands into a
CommandList.
This is the shared implementation — all backends use the same recorder.
No native API calls happen here.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbindComputePipeline(Handle<PipelineResource> pipeline) voidvoidbindImage(int unit, Handle<TextureResource> texture) Convenience: bind for read-write at mip 0.voidbindImage(int unit, Handle<TextureResource> texture, int mipLevel, boolean read, boolean write) voidbindIndexBuffer(Handle<BufferResource> buffer) voidbindPipeline(Handle<PipelineResource> pipeline) voidbindRenderTarget(Handle<RenderTargetResource> renderTarget) voidbindSampler(int unit, Handle<SamplerResource> sampler) voidbindStorageBuffer(int binding, Handle<BufferResource> buffer) voidbindTexture(int unit, Handle<TextureResource> texture) voidbindUniformBuffer(int binding, Handle<BufferResource> buffer) voidbindVertexBuffer(Handle<BufferResource> buffer, Handle<VertexInputResource> vertexInput) voidblitTexture(Handle<TextureResource> src, Handle<TextureResource> dst, int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, boolean linearFilter) voidclear(float r, float g, float b, float a) voidcopyBuffer(Handle<BufferResource> src, Handle<BufferResource> dst, long srcOffset, long dstOffset, long size) voidcopyTexture(Handle<TextureResource> src, Handle<TextureResource> dst, int srcX, int srcY, int dstX, int dstY, int width, int height) voidcopyTexture(Handle<TextureResource> src, Handle<TextureResource> dst, int srcX, int srcY, int dstX, int dstY, int width, int height, int srcMipLevel, int dstMipLevel) voiddispatch(int groupsX, int groupsY, int groupsZ) voiddraw(int vertexCount, int firstVertex) voidvoiddrawIndexed(int indexCount, int firstIndex) voiddrawIndexedIndirect(Handle<BufferResource> buffer, long offset, int drawCount, int stride) voiddrawIndexedInstanced(int indexCount, int firstIndex, int instanceCount, int firstInstance) voiddrawIndirect(Handle<BufferResource> buffer, long offset, int drawCount, int stride) voiddrawInstanced(int vertexCount, int firstVertex, int instanceCount, int firstInstance) finish()Finishes recording and returns an immutable CommandList.voidmemoryBarrier(BarrierScope scope) voidpushConstants(ByteBuffer data) voidscissor(int x, int y, int width, int height) voidsetRenderState(PropertyMap<RenderState> properties) voidviewport(int x, int y, int width, int height)
-
Constructor Details
-
CommandRecorder
public CommandRecorder()
-
-
Method Details
-
bindPipeline
-
bindVertexBuffer
public void bindVertexBuffer(Handle<BufferResource> buffer, Handle<VertexInputResource> vertexInput) -
bindIndexBuffer
-
bindUniformBuffer
-
bindTexture
-
bindSampler
-
bindStorageBuffer
-
bindImage
public void bindImage(int unit, Handle<TextureResource> texture, int mipLevel, boolean read, boolean write) -
bindImage
Convenience: bind for read-write at mip 0. -
draw
-
draw
public void draw(int vertexCount, int firstVertex) -
drawIndexed
public void drawIndexed(int indexCount, int firstIndex) -
drawInstanced
public void drawInstanced(int vertexCount, int firstVertex, int instanceCount, int firstInstance) -
drawIndexedInstanced
public void drawIndexedInstanced(int indexCount, int firstIndex, int instanceCount, int firstInstance) -
drawIndirect
-
drawIndexedIndirect
public void drawIndexedIndirect(Handle<BufferResource> buffer, long offset, int drawCount, int stride) -
bindRenderTarget
-
bindDefaultRenderTarget
public void bindDefaultRenderTarget() -
setRenderState
-
pushConstants
-
bindComputePipeline
-
dispatch
public void dispatch(int groupsX, int groupsY, int groupsZ) -
memoryBarrier
-
clear
public void clear(float r, float g, float b, float a) -
viewport
public void viewport(int x, int y, int width, int height) -
scissor
public void scissor(int x, int y, int width, int height) -
copyBuffer
public void copyBuffer(Handle<BufferResource> src, Handle<BufferResource> dst, long srcOffset, long dstOffset, long size) -
copyTexture
public void copyTexture(Handle<TextureResource> src, Handle<TextureResource> dst, int srcX, int srcY, int dstX, int dstY, int width, int height) -
copyTexture
public void copyTexture(Handle<TextureResource> src, Handle<TextureResource> dst, int srcX, int srcY, int dstX, int dstY, int width, int height, int srcMipLevel, int dstMipLevel) -
blitTexture
public void blitTexture(Handle<TextureResource> src, Handle<TextureResource> dst, int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, boolean linearFilter) -
finish
Finishes recording and returns an immutable CommandList.
-