Skip to main content

CompatTextureGl

Struct CompatTextureGl 

Source
pub struct CompatTextureGl { /* private fields */ }
Expand description

Texture/uniform/blend symbols layered on top of CompatGl.

Loading this separately keeps the known-good clear/triangle path alive when older libretro GL proc lookup fails for texture or blending entry points. glActiveTexture is required so callers can restore texture unit 0 explicitly after uploads and draws.

Implementations§

Source§

impl CompatTextureGl

Source

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

Source

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

Source

pub fn from_glsym(gl: glsym) -> Self

Source

pub fn enable(&self, capability: GlCapability)

Source

pub fn disable(&self, capability: GlCapability)

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 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 delete_texture(&self, texture: GlTexture)

Source

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

Source

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

Source

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

Source

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

Source

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

Trait Implementations§

Source§

impl Clone for CompatTextureGl

Source§

fn clone(&self) -> CompatTextureGl

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
Source§

impl Copy for CompatTextureGl

Auto Trait Implementations§

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.