Struct gfx_device_gl::CommandBuffer [−][src]
pub struct CommandBuffer { pub buf: Vec<Command>, pub data: DataBuffer, pub display_fb: FrameBuffer, // some fields omitted }
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>
data: DataBuffer
display_fb: FrameBuffer
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
impl CommandBuffer
[src]
pub fn new(fbo: FrameBuffer, workarounds: Workarounds) -> CommandBuffer
[src]
Trait Implementations
impl Buffer<Resources> for CommandBuffer
[src]
fn reset(&mut self)
[src]
fn bind_pipeline_state(&mut self, pso: PipelineState)
[src]
fn bind_vertex_buffers(&mut self, vbs: VertexBufferSet<Resources>)
[src]
fn bind_constant_buffers(&mut self, cbs: &[ConstantBufferParam<Resources>])
[src]
fn bind_global_constant(&mut self, loc: Location, value: UniformValue)
[src]
fn bind_resource_views(&mut self, srvs: &[ResourceViewParam<Resources>])
[src]
fn bind_unordered_views(&mut self, uavs: &[UnorderedViewParam<Resources>])
[src]
fn bind_samplers(&mut self, ss: &[SamplerParam<Resources>])
[src]
fn bind_pixel_targets(&mut self, pts: PixelTargetSet<Resources>)
[src]
fn bind_index(&mut self, buf: Buffer, itype: IndexType)
[src]
fn set_scissor(&mut self, rect: Rect)
[src]
fn set_ref_values(&mut self, rv: RefValues)
[src]
fn copy_buffer(
&mut self,
src: Buffer,
dst: Buffer,
src_offset_bytes: usize,
dst_offset_bytes: usize,
size_bytes: usize
)
[src]
&mut self,
src: Buffer,
dst: Buffer,
src_offset_bytes: usize,
dst_offset_bytes: usize,
size_bytes: usize
)
fn copy_buffer_to_texture(
&mut self,
src: Buffer,
src_offset_bytes: usize,
dst: TextureCopyRegion<NewTexture>
)
[src]
&mut self,
src: Buffer,
src_offset_bytes: usize,
dst: TextureCopyRegion<NewTexture>
)
fn copy_texture_to_buffer(
&mut self,
src: TextureCopyRegion<NewTexture>,
dst: Buffer,
dst_offset_bytes: usize
)
[src]
&mut self,
src: TextureCopyRegion<NewTexture>,
dst: Buffer,
dst_offset_bytes: usize
)
fn copy_texture_to_texture(
&mut self,
src: TextureCopyRegion<NewTexture>,
dst: TextureCopyRegion<NewTexture>
)
[src]
&mut self,
src: TextureCopyRegion<NewTexture>,
dst: TextureCopyRegion<NewTexture>
)
fn update_buffer(&mut self, buf: Buffer, data: &[u8], offset_bytes: usize)
[src]
fn update_texture(&mut self, dst: TextureCopyRegion<NewTexture>, data: &[u8])
[src]
fn generate_mipmap(&mut self, srv: ResourceView)
[src]
fn clear_color(&mut self, target: TargetView, value: ClearColor)
[src]
fn clear_depth_stencil(
&mut self,
target: TargetView,
depth: Option<Depth>,
stencil: Option<Stencil>
)
[src]
&mut self,
target: TargetView,
depth: Option<Depth>,
stencil: Option<Stencil>
)
fn call_draw(
&mut self,
start: VertexCount,
count: VertexCount,
instances: Option<InstanceParams>
)
[src]
&mut self,
start: VertexCount,
count: VertexCount,
instances: Option<InstanceParams>
)
fn call_draw_indexed(
&mut self,
start: VertexCount,
count: VertexCount,
base: VertexCount,
instances: Option<InstanceParams>
)
[src]
&mut self,
start: VertexCount,
count: VertexCount,
base: VertexCount,
instances: Option<InstanceParams>
)
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,