pub struct CompatGl { /* private fields */ }Expand description
GLES2-era drawing symbols for simple compatibility rendering.
This is narrower than glsym::init(): it deliberately avoids product
renderer symbols such as scissor, draw-elements, matrices, texture arrays,
VAOs, instancing, and blend equations.
Implementations§
Source§impl CompatGl
impl CompatGl
pub fn init(runtime: &Runtime<'_>) -> Result<Self, String>
pub fn init_from_clear( runtime: &Runtime<'_>, clear: CompatGlClear, ) -> Result<Self, String>
pub fn clear_symbols(&self) -> CompatGlClear
pub fn context_type(&self) -> HwContextType
pub fn version_info(&self) -> GlVersionInfo
pub fn clear_color(&self, r: f32, g: f32, b: f32, a: f32)
pub fn clear_color_depth_buffer(&self)
pub fn viewport(&self, rect: GlRect) -> Result<(), String>
pub fn unbind_framebuffer(&self, target: GlFramebufferTarget)
pub fn bind_framebuffer( &self, target: GlFramebufferTarget, framebuffer: Option<GlFramebuffer>, ) -> Result<(), String>
pub fn check_no_error(&self, operation: &str) -> Result<(), String>
pub fn check_bound_framebuffer_complete( &self, target: GlFramebufferTarget, ) -> Result<(), String>
pub fn build_program( &self, vertex_shader: &str, fragment_shader: &str, ) -> Result<GlProgram, String>
pub fn compile_shader_source( &self, stage: GlShaderStage, source: &str, ) -> Result<GlShader, String>
pub fn delete_shader(&self, shader: GlShader)
pub fn create_program(&self) -> Result<GlProgram, String>
pub fn link_program(&self, program: GlProgram) -> Result<(), String>
pub fn delete_program(&self, program: GlProgram)
pub fn use_no_program(&self)
pub fn use_program(&self, program: Option<GlProgram>)
pub fn gen_buffer(&self) -> Result<GlBuffer, String>
pub fn unbind_buffer(&self, target: GlBufferTarget)
pub fn bind_buffer(&self, target: GlBufferTarget, buffer: Option<GlBuffer>)
pub fn buffer_data<T>( &self, target: GlBufferTarget, data: &[T], usage: GlBufferUsage, ) -> Result<(), String>
pub fn delete_buffer(&self, buffer: GlBuffer)
pub fn enable_vertex_attrib(&self, location: GlVertexAttribLocation)
pub fn disable_vertex_attrib(&self, location: GlVertexAttribLocation)
pub fn vertex_attrib_pointer_f32( &self, location: GlVertexAttribLocation, layout: GlVertexAttribF32Layout, )
pub fn required_attrib_location( &self, program: GlProgram, name: &str, ) -> Result<GlVertexAttribLocation, String>
pub fn required_uniform_location( &self, program: GlProgram, name: &str, ) -> Result<GlUniformLocation, String>
pub fn uniform_4fv(&self, location: GlUniformLocation, values: &[f32; 4])
pub fn draw_arrays( &self, mode: GlDrawMode, range: GlDrawRange, ) -> Result<(), String>
pub fn from_glsym(gl: glsym) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompatGl
impl RefUnwindSafe for CompatGl
impl Send for CompatGl
impl Sync for CompatGl
impl Unpin for CompatGl
impl UnsafeUnpin for CompatGl
impl UnwindSafe for CompatGl
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