pub struct Graphics<V: GlowVertexAttribs> {
pub main_camera: Camera,
pub color: [f32; 4],
pub stream: VertexStream<V, GraphicsBatch>,
/* private fields */
}
Fields§
§main_camera: Camera
§color: [f32; 4]
§stream: VertexStream<V, GraphicsBatch>
Implementations§
Source§impl<V: GlowVertexAttribs> Graphics<V>
impl<V: GlowVertexAttribs> Graphics<V>
pub fn new(context: Context) -> Self
pub fn context(&self) -> Option<Ref<'_, Context>>
pub fn surface( &self, attachments: Vec<SurfaceAttachment>, ) -> Result<Surface, String>
pub fn pixel_texture(&self, color: [u8; 3]) -> Result<Texture, String>
pub fn texture( &self, width: u32, height: u32, depth: u32, format: GlowTextureFormat, data: Option<&[u8]>, ) -> Result<Texture, String>
pub fn shader(&self, vertex: &str, fragment: &str) -> Result<Shader, String>
pub fn prepare_frame(&self, clear: bool) -> Result<(), String>
pub fn draw(&mut self) -> Result<(), String>
pub fn push_surface(&mut self, surface: Surface) -> Result<(), String>
pub fn pop_surface(&mut self) -> Result<Option<Surface>, String>
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for Graphics<V>
impl<V> !RefUnwindSafe for Graphics<V>
impl<V> !Send for Graphics<V>
impl<V> !Sync for Graphics<V>
impl<V> Unpin for Graphics<V>where
V: Unpin,
impl<V> !UnwindSafe for Graphics<V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more