pub struct glsym { /* private fields */ }Expand description
Typed OpenGL symbol table resolved from libretro’s hardware-render callbacks.
init() expects the frontend-owned GL context to be active, which in libretro
means after hw_context_reset and before hw_context_destroy.
Implementations§
Source§impl glsym
impl glsym
pub fn init(runtime: &Runtime<'_>) -> Result<Self, String>
pub fn context_type(&self) -> HwContextType
pub fn version_info(&self) -> GlVersionInfo
pub fn vendor_string(&self) -> &str
pub fn renderer_string(&self) -> &str
pub fn version_string(&self) -> &str
pub fn extensions_string(&self) -> &str
pub fn max_texture_size(&self) -> Option<u32>
pub fn max_texture_image_units(&self) -> Option<u32>
pub fn max_varying_vectors(&self) -> Option<u32>
pub fn fragment_highp_float(&self) -> Option<bool>
pub fn supports_npot_repeat(&self) -> bool
pub fn supports_invalidate_framebuffer(&self) -> bool
pub fn has_extension(&self, name: &str) -> bool
pub fn clear_color(&self, r: f32, g: f32, b: f32, a: f32)
pub fn clear_color_buffer(&self)
pub fn clear_color_depth_buffer(&self)
pub fn enable(&self, capability: GlCapability)
pub fn disable(&self, capability: GlCapability)
pub fn depth_func(&self, function: GlDepthFunction) -> Result<(), String>
pub fn depth_mask(&self, enabled: bool) -> Result<(), String>
pub fn depth_range(&self, range: GlDepthRange) -> Result<(), String>
pub fn cull_face(&self, mode: GlCullFaceMode) -> Result<(), String>
pub fn front_face(&self, winding: GlFrontFaceWinding) -> Result<(), String>
pub fn stencil_func( &self, function: GlStencilFunction, reference: GlStencilReference, mask: GlStencilMask, ) -> Result<(), String>
pub fn stencil_mask(&self, mask: GlStencilMask) -> Result<(), String>
pub fn stencil_op( &self, stencil_fail: GlStencilOperation, depth_fail: GlStencilOperation, depth_pass: GlStencilOperation, ) -> Result<(), String>
pub fn stencil_func_separate( &self, face: GlStencilFace, function: GlStencilFunction, reference: GlStencilReference, mask: GlStencilMask, ) -> Result<(), String>
pub fn stencil_mask_separate( &self, face: GlStencilFace, mask: GlStencilMask, ) -> Result<(), String>
pub fn stencil_op_separate( &self, face: GlStencilFace, stencil_fail: GlStencilOperation, depth_fail: GlStencilOperation, depth_pass: GlStencilOperation, ) -> Result<(), String>
pub fn color_mask(&self, mask: GlColorWriteMask) -> Result<(), String>
pub fn polygon_offset(&self, offset: GlPolygonOffset) -> Result<(), String>
pub fn supports_queries(&self) -> bool
pub fn gen_query(&self) -> Result<GlQuery, String>
pub fn delete_query(&self, query: GlQuery) -> Result<(), String>
pub fn begin_query( &self, target: GlQueryTarget, query: GlQuery, ) -> Result<(), String>
pub fn end_query(&self, target: GlQueryTarget) -> Result<(), String>
pub fn query_result_available(&self, query: GlQuery) -> Result<bool, String>
pub fn query_result_u32(&self, query: GlQuery) -> Result<u32, String>
pub fn supports_sync_objects(&self) -> bool
pub fn fence_sync(&self) -> Result<GlSync, String>
pub fn client_wait_sync( &self, sync: GlSync, flush_commands: bool, timeout: GlSyncTimeout, ) -> Result<GlSyncWaitResult, String>
pub fn wait_sync(&self, sync: GlSync) -> Result<(), String>
pub fn delete_sync(&self, sync: GlSync) -> Result<(), String>
pub fn read_pixels( &self, rect: GlRect, format: GlTextureFormat, pixels: &mut [u8], ) -> Result<(), String>
pub fn read_buffer(&self, buffer: GlFramebufferBuffer) -> Result<(), String>
pub fn draw_buffers( &self, buffers: &[GlFramebufferBuffer], ) -> Result<(), String>
pub fn blit_framebuffer( &self, source: GlRect, destination: GlRect, buffers: BitFlags<GlFramebufferBlitBuffer>, filter: GlFramebufferBlitFilter, ) -> Result<(), String>
pub fn viewport(&self, rect: GlRect) -> Result<(), String>
pub fn scissor(&self, rect: GlRect) -> Result<(), String>
pub fn create_shader(&self, stage: GlShaderStage) -> Result<GlShader, String>
pub fn compile_shader_source( &self, stage: GlShaderStage, source: &str, ) -> Result<GlShader, String>
pub fn shader_source( &self, shader: GlShader, source: &str, ) -> Result<(), String>
pub fn compile_shader(&self, shader: GlShader)
pub fn delete_shader(&self, shader: GlShader)
pub fn create_program(&self) -> Result<GlProgram, String>
pub fn build_program( &self, vertex_source: &str, fragment_source: &str, ) -> Result<GlProgram, String>
pub fn attach_shader(&self, program: GlProgram, shader: GlShader)
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 supports_indexed_buffer_bindings(&self) -> bool
pub fn bind_buffer_base( &self, target: GlIndexedBufferTarget, index: GlBufferBindingIndex, buffer: Option<GlBuffer>, ) -> Result<(), String>
pub fn bind_buffer_range( &self, target: GlIndexedBufferTarget, index: GlBufferBindingIndex, buffer: Option<GlBuffer>, range: GlBufferRange, ) -> Result<(), String>
pub fn buffer_data<T>( &self, target: GlBufferTarget, data: &[T], usage: GlBufferUsage, ) -> Result<(), String>
pub fn buffer_data_empty( &self, target: GlBufferTarget, byte_len: GlBufferByteSize, usage: GlBufferUsage, ) -> Result<(), String>
pub fn buffer_sub_data<T>( &self, target: GlBufferTarget, offset: GlBufferByteOffset, data: &[T], ) -> Result<(), String>
pub fn copy_buffer_sub_data( &self, read_target: GlBufferTarget, write_target: GlBufferTarget, read_offset: GlBufferByteOffset, write_offset: GlBufferByteOffset, size: GlBufferByteSize, ) -> Result<(), String>
pub fn delete_buffer(&self, buffer: GlBuffer)
pub fn gen_texture(&self) -> Result<GlTexture, String>
pub fn unbind_texture(&self, target: GlTextureTarget)
pub fn bind_texture(&self, target: GlTextureTarget, texture: Option<GlTexture>)
pub fn active_texture(&self, unit: GlTextureUnit) -> Result<(), String>
pub fn tex_min_filter( &self, target: GlTextureTarget, filter: GlTextureMinFilter, )
pub fn tex_mag_filter( &self, target: GlTextureTarget, filter: GlTextureMagFilter, )
pub fn tex_wrap_s(&self, target: GlTextureTarget, wrap: GlTextureWrap)
pub fn tex_wrap_t(&self, target: GlTextureTarget, wrap: GlTextureWrap)
pub fn tex_wrap_r(&self, target: GlTextureTarget, wrap: GlTextureWrap)
pub fn pixel_store_unpack_alignment(&self, alignment: GlPixelStoreAlignment)
pub fn pixel_store_pack_alignment(&self, alignment: GlPixelStoreAlignment)
pub fn tex_image_2d( &self, target: GlTextureTarget, internal_format: GlTextureInternalFormat, level: GlTextureLevel, size: GlTextureSize2D, format: GlTextureFormat, data_type: GlTextureDataType, bytes: Option<&[u8]>, ) -> Result<(), String>
pub fn tex_sub_image_2d( &self, target: GlTextureTarget, level: GlTextureLevel, offset: GlTextureOffset2D, size: GlTextureSize2D, format: GlTextureFormat, data_type: GlTextureDataType, bytes: &[u8], ) -> Result<(), String>
pub fn supports_texture_arrays(&self) -> bool
pub fn tex_image_3d( &self, target: GlTextureTarget, internal_format: GlTextureInternalFormat, level: GlTextureLevel, size: GlTextureSize3D, format: GlTextureFormat, data_type: GlTextureDataType, bytes: Option<&[u8]>, ) -> Result<(), String>
pub fn tex_sub_image_3d( &self, target: GlTextureTarget, level: GlTextureLevel, offset: GlTextureOffset3D, size: GlTextureSize3D, format: GlTextureFormat, data_type: GlTextureDataType, bytes: &[u8], ) -> Result<(), String>
pub fn supports_generate_mipmap(&self) -> bool
pub fn generate_mipmap(&self, target: GlTextureTarget) -> Result<(), String>
pub fn delete_texture(&self, texture: GlTexture)
pub fn supports_vertex_arrays(&self) -> bool
pub fn supports_instancing(&self) -> bool
pub fn gen_vertex_array(&self) -> Result<GlVertexArray, String>
pub fn bind_vertex_array( &self, array: Option<GlVertexArray>, ) -> Result<(), String>
pub fn unbind_vertex_array(&self) -> Result<(), String>
pub fn delete_vertex_array(&self, array: GlVertexArray) -> Result<(), String>
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 vertex_attrib_divisor( &self, location: GlVertexAttribLocation, divisor: GlVertexAttribDivisor, ) -> Result<(), String>
pub fn required_uniform_location( &self, program: GlProgram, name: &str, ) -> Result<GlUniformLocation, String>
pub fn required_attrib_location( &self, program: GlProgram, name: &str, ) -> Result<GlVertexAttribLocation, String>
pub fn bind_attrib_location( &self, program: GlProgram, location: GlVertexAttribLocation, name: &str, ) -> Result<(), String>
pub fn uniform_1f(&self, location: GlUniformLocation, value: f32)
pub fn uniform_1i(&self, location: GlUniformLocation, value: i32)
pub fn uniform_2f(&self, location: GlUniformLocation, values: [f32; 2])
pub fn uniform_3f(&self, location: GlUniformLocation, values: [f32; 3])
pub fn uniform_4f(&self, location: GlUniformLocation, values: [f32; 4])
pub fn uniform_4fv(&self, location: GlUniformLocation, values: &[f32; 4])
pub fn uniform_matrix_3fv( &self, location: GlUniformLocation, transpose: bool, values: &[f32; 9], )
pub fn uniform_matrix_4fv( &self, location: GlUniformLocation, transpose: bool, values: &[f32; 16], )
pub fn draw_arrays( &self, mode: GlDrawMode, range: GlDrawRange, ) -> Result<(), String>
pub fn draw_arrays_instanced( &self, mode: GlDrawMode, range: GlDrawRange, instance_count: GlInstanceCount, ) -> Result<(), String>
pub fn draw_elements( &self, mode: GlDrawMode, index_type: GlIndexType, range: GlElementRange, ) -> Result<(), String>
pub fn supports_draw_range_elements(&self) -> bool
pub fn draw_range_elements( &self, mode: GlDrawMode, vertex_range: GlElementVertexRange, index_type: GlIndexType, range: GlElementRange, ) -> Result<(), String>
pub fn draw_elements_instanced( &self, mode: GlDrawMode, index_type: GlIndexType, range: GlElementRange, instance_count: GlInstanceCount, ) -> Result<(), String>
pub fn blend_func(&self, source: GlBlendFactor, destination: GlBlendFactor)
pub fn blend_color(&self, r: f32, g: f32, b: f32, a: f32) -> Result<(), String>
pub fn blend_func_separate( &self, source_rgb: GlBlendFactor, destination_rgb: GlBlendFactor, source_alpha: GlBlendFactor, destination_alpha: GlBlendFactor, ) -> Result<(), String>
pub fn blend_equation(&self, equation: GlBlendEquation)
pub fn blend_equation_separate( &self, rgb: GlBlendEquation, alpha: GlBlendEquation, ) -> Result<(), String>
pub fn supports_framebuffer_objects(&self) -> bool
pub fn supports_renderbuffers(&self) -> bool
pub fn gen_framebuffer(&self) -> Result<GlFramebuffer, String>
pub fn delete_framebuffer( &self, framebuffer: GlFramebuffer, ) -> Result<(), String>
pub fn unbind_framebuffer(&self, target: GlFramebufferTarget)
pub fn bind_framebuffer( &self, target: GlFramebufferTarget, framebuffer: Option<GlFramebuffer>, ) -> Result<(), String>
pub fn framebuffer_texture_2d( &self, target: GlFramebufferTarget, attachment: GlFramebufferAttachment, texture_target: GlFramebufferTexture2DTarget, texture: Option<GlTexture>, level: GlTextureLevel, ) -> Result<(), String>
pub fn gen_renderbuffer(&self) -> Result<GlRenderbuffer, String>
pub fn bind_renderbuffer( &self, target: GlRenderbufferTarget, renderbuffer: Option<GlRenderbuffer>, ) -> Result<(), String>
pub fn delete_renderbuffer( &self, renderbuffer: GlRenderbuffer, ) -> Result<(), String>
pub fn renderbuffer_storage( &self, target: GlRenderbufferTarget, internal_format: GlRenderbufferInternalFormat, size: GlRenderbufferSize, ) -> Result<(), String>
pub fn framebuffer_renderbuffer( &self, target: GlFramebufferTarget, attachment: GlFramebufferAttachment, renderbuffer_target: GlRenderbufferTarget, renderbuffer: Option<GlRenderbuffer>, ) -> 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 discard_depth_framebuffer_attachment(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for glsym
impl RefUnwindSafe for glsym
impl Send for glsym
impl Sync for glsym
impl Unpin for glsym
impl UnsafeUnpin for glsym
impl UnwindSafe for glsym
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