Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandBuffer

GFX 命令缓冲。

Hierarchy

  • Obj
    • CommandBuffer

Index

Constructors

constructor

Properties

Protected _device

_device: Device

Protected _gfxType

_gfxType: ObjectType = ObjectType.UNKNOWN

Protected _numDrawCalls

_numDrawCalls: number = 0

Protected _numInstances

_numInstances: number = 0

Protected _numTris

_numTris: number = 0

Protected _queue

_queue: Queue | null = null

Protected _type

_type: CommandBufferType = CommandBufferType.PRIMARY

Accessors

gfxType

numDrawCalls

  • get numDrawCalls(): number

numInstances

  • get numInstances(): number

numTris

  • get numTris(): number

queue

type

Methods

Abstract begin

  • 开始记录命令。

    Parameters

    • Optional renderPass: RenderPass

      The render pass the subsequent commands will be executed in

    • Optional subpass: undefined | number

      The subpass the subsequent commands will be executed in

    • Optional frameBuffer: Framebuffer

      The framebuffer to be used in the subpass

    Returns void

Abstract beginRenderPass

  • beginRenderPass(renderPass: RenderPass, framebuffer: Framebuffer, renderArea: Rect, clearColors: Color[], clearDepth: number, clearStencil: number): void
  • 开始 RenderPass。

    Parameters

    • renderPass: RenderPass
    • framebuffer: Framebuffer

      The frame buffer used.

    • renderArea: Rect

      The target render area.

    • clearColors: Color[]

      The clearing colors.

    • clearDepth: number

      The clearing depth.

    • clearStencil: number

      The clearing stencil.

    Returns void

Abstract bindDescriptorSet

  • bindDescriptorSet(set: number, descriptorSets: DescriptorSet, dynamicOffsets?: number[]): void

Abstract bindInputAssembler

Abstract bindPipelineState

Abstract copyBuffersToTexture

Abstract destroy

  • destroy(): void

Abstract draw

Abstract end

  • end(): void

Abstract endRenderPass

  • endRenderPass(): void

Abstract execute

Abstract initialize

Abstract setBlendConstants

  • setBlendConstants(blendConstants: number[]): void

Abstract setDepthBias

  • setDepthBias(depthBiasConstantFactor: number, depthBiasClamp: number, depthBiasSlopeFactor: number): void
  • 设置深度偏移。

    Parameters

    • depthBiasConstantFactor: number

      The new depth bias factor.

    • depthBiasClamp: number

      The new depth bias clamp threshold.

    • depthBiasSlopeFactor: number

      The new depth bias slope factor.

    Returns void

Abstract setDepthBound

  • setDepthBound(minDepthBounds: number, maxDepthBounds: number): void
  • 设置深度边界。

    Parameters

    • minDepthBounds: number

      The new minimum depth bound.

    • maxDepthBounds: number

      The new maximum depth bound.

    Returns void

Abstract setLineWidth

  • setLineWidth(lineWidth: number): void

Abstract setScissor

  • setScissor(scissor: Rect): void

Abstract setStencilCompareMask

  • setStencilCompareMask(face: StencilFace, reference: number, compareMask: number): void
  • 设置模板比较掩码。

    Parameters

    • face: StencilFace

      The effective triangle face.

    • reference: number

      The new stencil reference constant.

    • compareMask: number

      The new stencil read mask.

    Returns void

Abstract setStencilWriteMask

  • setStencilWriteMask(face: StencilFace, writeMask: number): void

Abstract setViewport

Abstract updateBuffer

  • updateBuffer(buffer: Buffer, data: ArrayBuffer, size?: undefined | number): void
  • 更新缓冲。

    Parameters

    • buffer: Buffer

      The buffer to be updated.

    • data: ArrayBuffer

      The source data.

    • Optional size: undefined | number

      Size in bytes to be updated.

    Returns void

Generated using TypeDoc