Struct three::render::BackendCommandBuffer
source · pub struct BackendCommandBuffer {
pub buf: Vec<Command, Global>,
pub data: DataBuffer,
pub display_fb: u32,
/* private fields */
}
Expand description
A command buffer abstraction for OpenGL.
Manages a list of commands that will be executed when submitted to a Device
. Usually it is
best to use a Encoder
to manage the command buffer which implements From<CommandBuffer>
.
If you want to display your rendered results to a framebuffer created externally, see the
display_fb
field.
Fields
buf: Vec<Command, Global>
data: DataBuffer
display_fb: u32
The framebuffer to use for rendering to the main targets (0 by default).
Use this to set the framebuffer that will be used for the screen display targets created
with create_main_targets_raw
. Usually you don’t need to set this field directly unless
your OS doesn’t provide a default framebuffer with name 0 and you have to render to a
different framebuffer object that can be made visible on the screen (iOS/tvOS need this).
This framebuffer must exist and be configured correctly (with renderbuffer attachments, etc.) so that rendering to it can occur immediately.
Implementations
sourceimpl CommandBuffer
impl CommandBuffer
pub fn new(fbo: u32, workarounds: Workarounds) -> CommandBuffer
Trait Implementations
sourceimpl Buffer<Resources> for CommandBuffer
impl Buffer<Resources> for CommandBuffer
sourcefn bind_pipeline_state(&mut self, pso: PipelineState)
fn bind_pipeline_state(&mut self, pso: PipelineState)
sourcefn bind_vertex_buffers(&mut self, vbs: VertexBufferSet<Resources>)
fn bind_vertex_buffers(&mut self, vbs: VertexBufferSet<Resources>)
sourcefn bind_constant_buffers(&mut self, cbs: &[ConstantBufferParam<Resources>])
fn bind_constant_buffers(&mut self, cbs: &[ConstantBufferParam<Resources>])
sourcefn bind_global_constant(&mut self, loc: usize, value: UniformValue)
fn bind_global_constant(&mut self, loc: usize, value: UniformValue)
sourcefn bind_resource_views(&mut self, srvs: &[ResourceViewParam<Resources>])
fn bind_resource_views(&mut self, srvs: &[ResourceViewParam<Resources>])
sourcefn bind_unordered_views(&mut self, uavs: &[UnorderedViewParam<Resources>])
fn bind_unordered_views(&mut self, uavs: &[UnorderedViewParam<Resources>])
sourcefn bind_samplers(&mut self, ss: &[SamplerParam<Resources>])
fn bind_samplers(&mut self, ss: &[SamplerParam<Resources>])
sourcefn bind_pixel_targets(&mut self, pts: PixelTargetSet<Resources>)
fn bind_pixel_targets(&mut self, pts: PixelTargetSet<Resources>)
sourcefn bind_index(&mut self, buf: u32, itype: IndexType)
fn bind_index(&mut self, buf: u32, itype: IndexType)
sourcefn set_scissor(&mut self, rect: Rect)
fn set_scissor(&mut self, rect: Rect)
sourcefn set_ref_values(&mut self, rv: RefValues)
fn set_ref_values(&mut self, rv: RefValues)
sourcefn copy_buffer(
&mut self,
src: u32,
dst: u32,
src_offset_bytes: usize,
dst_offset_bytes: usize,
size_bytes: usize
)
fn copy_buffer(
&mut self,
src: u32,
dst: u32,
src_offset_bytes: usize,
dst_offset_bytes: usize,
size_bytes: usize
)
sourcefn copy_buffer_to_texture(
&mut self,
src: u32,
src_offset_bytes: usize,
dst: TextureCopyRegion<NewTexture>
)
fn copy_buffer_to_texture(
&mut self,
src: u32,
src_offset_bytes: usize,
dst: TextureCopyRegion<NewTexture>
)
sourcefn copy_texture_to_buffer(
&mut self,
src: TextureCopyRegion<NewTexture>,
dst: u32,
dst_offset_bytes: usize
)
fn copy_texture_to_buffer(
&mut self,
src: TextureCopyRegion<NewTexture>,
dst: u32,
dst_offset_bytes: usize
)
sourcefn copy_texture_to_texture(
&mut self,
src: TextureCopyRegion<NewTexture>,
dst: TextureCopyRegion<NewTexture>
)
fn copy_texture_to_texture(
&mut self,
src: TextureCopyRegion<NewTexture>,
dst: TextureCopyRegion<NewTexture>
)
sourcefn update_buffer(&mut self, buf: u32, data: &[u8], offset_bytes: usize)
fn update_buffer(&mut self, buf: u32, data: &[u8], offset_bytes: usize)
sourcefn update_texture(&mut self, dst: TextureCopyRegion<NewTexture>, data: &[u8])
fn update_texture(&mut self, dst: TextureCopyRegion<NewTexture>, data: &[u8])
fn generate_mipmap(&mut self, srv: ResourceView)
sourcefn clear_color(&mut self, target: TargetView, value: ClearColor)
fn clear_color(&mut self, target: TargetView, value: ClearColor)
fn clear_depth_stencil(
&mut self,
target: TargetView,
depth: Option<f32>,
stencil: Option<u8>
)
Auto Trait Implementations
impl RefUnwindSafe for CommandBuffer
impl Send for CommandBuffer
impl !Sync for CommandBuffer
impl Unpin for CommandBuffer
impl UnwindSafe for CommandBuffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
value
as a parameter of self
.