Skip to main content

glsym

Struct glsym 

Source
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

Source

pub fn init(runtime: &Runtime<'_>) -> Result<Self, String>

Source

pub fn context_type(&self) -> HwContextType

Source

pub fn version_info(&self) -> GlVersionInfo

Source

pub fn vendor_string(&self) -> &str

Source

pub fn renderer_string(&self) -> &str

Source

pub fn version_string(&self) -> &str

Source

pub fn extensions_string(&self) -> &str

Source

pub fn max_texture_size(&self) -> Option<u32>

Source

pub fn max_texture_image_units(&self) -> Option<u32>

Source

pub fn max_varying_vectors(&self) -> Option<u32>

Source

pub fn fragment_highp_float(&self) -> Option<bool>

Source

pub fn supports_npot_repeat(&self) -> bool

Source

pub fn supports_invalidate_framebuffer(&self) -> bool

Source

pub fn has_extension(&self, name: &str) -> bool

Source

pub fn clear_color(&self, r: f32, g: f32, b: f32, a: f32)

Source

pub fn clear_color_buffer(&self)

Source

pub fn clear_color_depth_buffer(&self)

Source

pub fn enable(&self, capability: GlCapability)

Source

pub fn disable(&self, capability: GlCapability)

Source

pub fn depth_func(&self, function: GlDepthFunction) -> Result<(), String>

Source

pub fn depth_mask(&self, enabled: bool) -> Result<(), String>

Source

pub fn depth_range(&self, range: GlDepthRange) -> Result<(), String>

Source

pub fn cull_face(&self, mode: GlCullFaceMode) -> Result<(), String>

Source

pub fn front_face(&self, winding: GlFrontFaceWinding) -> Result<(), String>

Source

pub fn stencil_func( &self, function: GlStencilFunction, reference: GlStencilReference, mask: GlStencilMask, ) -> Result<(), String>

Source

pub fn stencil_mask(&self, mask: GlStencilMask) -> Result<(), String>

Source

pub fn stencil_op( &self, stencil_fail: GlStencilOperation, depth_fail: GlStencilOperation, depth_pass: GlStencilOperation, ) -> Result<(), String>

Source

pub fn stencil_func_separate( &self, face: GlStencilFace, function: GlStencilFunction, reference: GlStencilReference, mask: GlStencilMask, ) -> Result<(), String>

Source

pub fn stencil_mask_separate( &self, face: GlStencilFace, mask: GlStencilMask, ) -> Result<(), String>

Source

pub fn stencil_op_separate( &self, face: GlStencilFace, stencil_fail: GlStencilOperation, depth_fail: GlStencilOperation, depth_pass: GlStencilOperation, ) -> Result<(), String>

Source

pub fn color_mask(&self, mask: GlColorWriteMask) -> Result<(), String>

Source

pub fn polygon_offset(&self, offset: GlPolygonOffset) -> Result<(), String>

Source

pub fn supports_queries(&self) -> bool

Source

pub fn gen_query(&self) -> Result<GlQuery, String>

Source

pub fn delete_query(&self, query: GlQuery) -> Result<(), String>

Source

pub fn begin_query( &self, target: GlQueryTarget, query: GlQuery, ) -> Result<(), String>

Source

pub fn end_query(&self, target: GlQueryTarget) -> Result<(), String>

Source

pub fn query_result_available(&self, query: GlQuery) -> Result<bool, String>

Source

pub fn query_result_u32(&self, query: GlQuery) -> Result<u32, String>

Source

pub fn supports_sync_objects(&self) -> bool

Source

pub fn fence_sync(&self) -> Result<GlSync, String>

Source

pub fn client_wait_sync( &self, sync: GlSync, flush_commands: bool, timeout: GlSyncTimeout, ) -> Result<GlSyncWaitResult, String>

Source

pub fn wait_sync(&self, sync: GlSync) -> Result<(), String>

Source

pub fn delete_sync(&self, sync: GlSync) -> Result<(), String>

Source

pub fn read_pixels( &self, rect: GlRect, format: GlTextureFormat, pixels: &mut [u8], ) -> Result<(), String>

Source

pub fn read_buffer(&self, buffer: GlFramebufferBuffer) -> Result<(), String>

Source

pub fn draw_buffers( &self, buffers: &[GlFramebufferBuffer], ) -> Result<(), String>

Source

pub fn blit_framebuffer( &self, source: GlRect, destination: GlRect, buffers: BitFlags<GlFramebufferBlitBuffer>, filter: GlFramebufferBlitFilter, ) -> Result<(), String>

Source

pub fn viewport(&self, rect: GlRect) -> Result<(), String>

Source

pub fn scissor(&self, rect: GlRect) -> Result<(), String>

Source

pub fn create_shader(&self, stage: GlShaderStage) -> Result<GlShader, String>

Source

pub fn compile_shader_source( &self, stage: GlShaderStage, source: &str, ) -> Result<GlShader, String>

Source

pub fn shader_source( &self, shader: GlShader, source: &str, ) -> Result<(), String>

Source

pub fn compile_shader(&self, shader: GlShader)

Source

pub fn delete_shader(&self, shader: GlShader)

Source

pub fn create_program(&self) -> Result<GlProgram, String>

Source

pub fn build_program( &self, vertex_source: &str, fragment_source: &str, ) -> Result<GlProgram, String>

Source

pub fn attach_shader(&self, program: GlProgram, shader: GlShader)

Source

pub fn delete_program(&self, program: GlProgram)

Source

pub fn use_no_program(&self)

Source

pub fn use_program(&self, program: Option<GlProgram>)

Source

pub fn gen_buffer(&self) -> Result<GlBuffer, String>

Source

pub fn unbind_buffer(&self, target: GlBufferTarget)

Source

pub fn bind_buffer(&self, target: GlBufferTarget, buffer: Option<GlBuffer>)

Source

pub fn supports_indexed_buffer_bindings(&self) -> bool

Source

pub fn bind_buffer_base( &self, target: GlIndexedBufferTarget, index: GlBufferBindingIndex, buffer: Option<GlBuffer>, ) -> Result<(), String>

Source

pub fn bind_buffer_range( &self, target: GlIndexedBufferTarget, index: GlBufferBindingIndex, buffer: Option<GlBuffer>, range: GlBufferRange, ) -> Result<(), String>

Source

pub fn buffer_data<T>( &self, target: GlBufferTarget, data: &[T], usage: GlBufferUsage, ) -> Result<(), String>

Source

pub fn buffer_data_empty( &self, target: GlBufferTarget, byte_len: GlBufferByteSize, usage: GlBufferUsage, ) -> Result<(), String>

Source

pub fn buffer_sub_data<T>( &self, target: GlBufferTarget, offset: GlBufferByteOffset, data: &[T], ) -> Result<(), String>

Source

pub fn copy_buffer_sub_data( &self, read_target: GlBufferTarget, write_target: GlBufferTarget, read_offset: GlBufferByteOffset, write_offset: GlBufferByteOffset, size: GlBufferByteSize, ) -> Result<(), String>

Source

pub fn delete_buffer(&self, buffer: GlBuffer)

Source

pub fn gen_texture(&self) -> Result<GlTexture, String>

Source

pub fn unbind_texture(&self, target: GlTextureTarget)

Source

pub fn bind_texture(&self, target: GlTextureTarget, texture: Option<GlTexture>)

Source

pub fn active_texture(&self, unit: GlTextureUnit) -> Result<(), String>

Source

pub fn tex_min_filter( &self, target: GlTextureTarget, filter: GlTextureMinFilter, )

Source

pub fn tex_mag_filter( &self, target: GlTextureTarget, filter: GlTextureMagFilter, )

Source

pub fn tex_wrap_s(&self, target: GlTextureTarget, wrap: GlTextureWrap)

Source

pub fn tex_wrap_t(&self, target: GlTextureTarget, wrap: GlTextureWrap)

Source

pub fn tex_wrap_r(&self, target: GlTextureTarget, wrap: GlTextureWrap)

Source

pub fn pixel_store_unpack_alignment(&self, alignment: GlPixelStoreAlignment)

Source

pub fn pixel_store_pack_alignment(&self, alignment: GlPixelStoreAlignment)

Source

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>

Source

pub fn tex_sub_image_2d( &self, target: GlTextureTarget, level: GlTextureLevel, offset: GlTextureOffset2D, size: GlTextureSize2D, format: GlTextureFormat, data_type: GlTextureDataType, bytes: &[u8], ) -> Result<(), String>

Source

pub fn supports_texture_arrays(&self) -> bool

Source

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>

Source

pub fn tex_sub_image_3d( &self, target: GlTextureTarget, level: GlTextureLevel, offset: GlTextureOffset3D, size: GlTextureSize3D, format: GlTextureFormat, data_type: GlTextureDataType, bytes: &[u8], ) -> Result<(), String>

Source

pub fn supports_generate_mipmap(&self) -> bool

Source

pub fn generate_mipmap(&self, target: GlTextureTarget) -> Result<(), String>

Source

pub fn delete_texture(&self, texture: GlTexture)

Source

pub fn supports_vertex_arrays(&self) -> bool

Source

pub fn supports_instancing(&self) -> bool

Source

pub fn gen_vertex_array(&self) -> Result<GlVertexArray, String>

Source

pub fn bind_vertex_array( &self, array: Option<GlVertexArray>, ) -> Result<(), String>

Source

pub fn unbind_vertex_array(&self) -> Result<(), String>

Source

pub fn delete_vertex_array(&self, array: GlVertexArray) -> Result<(), String>

Source

pub fn enable_vertex_attrib(&self, location: GlVertexAttribLocation)

Source

pub fn disable_vertex_attrib(&self, location: GlVertexAttribLocation)

Source

pub fn vertex_attrib_pointer_f32( &self, location: GlVertexAttribLocation, layout: GlVertexAttribF32Layout, )

Source

pub fn vertex_attrib_divisor( &self, location: GlVertexAttribLocation, divisor: GlVertexAttribDivisor, ) -> Result<(), String>

Source

pub fn required_uniform_location( &self, program: GlProgram, name: &str, ) -> Result<GlUniformLocation, String>

Source

pub fn required_attrib_location( &self, program: GlProgram, name: &str, ) -> Result<GlVertexAttribLocation, String>

Source

pub fn bind_attrib_location( &self, program: GlProgram, location: GlVertexAttribLocation, name: &str, ) -> Result<(), String>

Source

pub fn uniform_1f(&self, location: GlUniformLocation, value: f32)

Source

pub fn uniform_1i(&self, location: GlUniformLocation, value: i32)

Source

pub fn uniform_2f(&self, location: GlUniformLocation, values: [f32; 2])

Source

pub fn uniform_3f(&self, location: GlUniformLocation, values: [f32; 3])

Source

pub fn uniform_4f(&self, location: GlUniformLocation, values: [f32; 4])

Source

pub fn uniform_4fv(&self, location: GlUniformLocation, values: &[f32; 4])

Source

pub fn uniform_matrix_3fv( &self, location: GlUniformLocation, transpose: bool, values: &[f32; 9], )

Source

pub fn uniform_matrix_4fv( &self, location: GlUniformLocation, transpose: bool, values: &[f32; 16], )

Source

pub fn draw_arrays( &self, mode: GlDrawMode, range: GlDrawRange, ) -> Result<(), String>

Source

pub fn draw_arrays_instanced( &self, mode: GlDrawMode, range: GlDrawRange, instance_count: GlInstanceCount, ) -> Result<(), String>

Source

pub fn draw_elements( &self, mode: GlDrawMode, index_type: GlIndexType, range: GlElementRange, ) -> Result<(), String>

Source

pub fn supports_draw_range_elements(&self) -> bool

Source

pub fn draw_range_elements( &self, mode: GlDrawMode, vertex_range: GlElementVertexRange, index_type: GlIndexType, range: GlElementRange, ) -> Result<(), String>

Source

pub fn draw_elements_instanced( &self, mode: GlDrawMode, index_type: GlIndexType, range: GlElementRange, instance_count: GlInstanceCount, ) -> Result<(), String>

Source

pub fn blend_func(&self, source: GlBlendFactor, destination: GlBlendFactor)

Source

pub fn blend_color(&self, r: f32, g: f32, b: f32, a: f32) -> Result<(), String>

Source

pub fn blend_func_separate( &self, source_rgb: GlBlendFactor, destination_rgb: GlBlendFactor, source_alpha: GlBlendFactor, destination_alpha: GlBlendFactor, ) -> Result<(), String>

Source

pub fn blend_equation(&self, equation: GlBlendEquation)

Source

pub fn blend_equation_separate( &self, rgb: GlBlendEquation, alpha: GlBlendEquation, ) -> Result<(), String>

Source

pub fn supports_framebuffer_objects(&self) -> bool

Source

pub fn supports_renderbuffers(&self) -> bool

Source

pub fn gen_framebuffer(&self) -> Result<GlFramebuffer, String>

Source

pub fn delete_framebuffer( &self, framebuffer: GlFramebuffer, ) -> Result<(), String>

Source

pub fn unbind_framebuffer(&self, target: GlFramebufferTarget)

Source

pub fn bind_framebuffer( &self, target: GlFramebufferTarget, framebuffer: Option<GlFramebuffer>, ) -> Result<(), String>

Source

pub fn framebuffer_texture_2d( &self, target: GlFramebufferTarget, attachment: GlFramebufferAttachment, texture_target: GlFramebufferTexture2DTarget, texture: Option<GlTexture>, level: GlTextureLevel, ) -> Result<(), String>

Source

pub fn gen_renderbuffer(&self) -> Result<GlRenderbuffer, String>

Source

pub fn bind_renderbuffer( &self, target: GlRenderbufferTarget, renderbuffer: Option<GlRenderbuffer>, ) -> Result<(), String>

Source

pub fn delete_renderbuffer( &self, renderbuffer: GlRenderbuffer, ) -> Result<(), String>

Source

pub fn renderbuffer_storage( &self, target: GlRenderbufferTarget, internal_format: GlRenderbufferInternalFormat, size: GlRenderbufferSize, ) -> Result<(), String>

Source

pub fn framebuffer_renderbuffer( &self, target: GlFramebufferTarget, attachment: GlFramebufferAttachment, renderbuffer_target: GlRenderbufferTarget, renderbuffer: Option<GlRenderbuffer>, ) -> Result<(), String>

Source

pub fn check_no_error(&self, operation: &str) -> Result<(), String>

Source

pub fn check_bound_framebuffer_complete( &self, target: GlFramebufferTarget, ) -> Result<(), String>

Source

pub fn discard_depth_framebuffer_attachment(&self) -> bool

Trait Implementations§

Source§

impl Clone for glsym

Source§

fn clone(&self) -> glsym

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.