pub struct Gles2Renderer {
    program: TextShaderProgram,
    vao: c_uint,
    vbo: c_uint,
    ebo: c_uint,
    atlas: Vec<Atlas>,
    batch: Batch,
    current_atlas: usize,
    active_tex: c_uint,
    dual_source_blending: bool,
}

Fields§

§program: TextShaderProgram§vao: c_uint§vbo: c_uint§ebo: c_uint§atlas: Vec<Atlas>§batch: Batch§current_atlas: usize§active_tex: c_uint§dual_source_blending: bool

Implementations§

source§

impl Gles2Renderer

source

pub fn new(allow_dsb: bool, is_gles_context: bool) -> Result<Self, Error>

Trait Implementations§

source§

impl Debug for Gles2Renderer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for Gles2Renderer

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a> TextRenderer<'a> for Gles2Renderer

§

type RenderApi = RenderApi<'a>

§

type RenderBatch = Batch

§

type Shader = TextShaderProgram

source§

fn program(&self) -> &Self::Shader

source§

fn with_api<'b: 'a, F, T>(&'b mut self, _: &'b SizeInfo, func: F) -> Twhere F: FnOnce(Self::RenderApi) -> T,

source§

fn loader_api(&mut self) -> LoaderApi<'_>

Get loader API for the renderer.
source§

fn draw_cells<'b: 'a, I: Iterator<Item = RenderableCell>>( &'b mut self, size_info: &'b SizeInfo, glyph_cache: &'a mut GlyphCache, cells: I )

Draw cells.
source§

fn resize(&self, size: &SizeInfo)

Resize the text rendering.
source§

fn with_loader<F: FnOnce(LoaderApi<'_>) -> T, T>(&mut self, func: F) -> T

Invoke renderer with the loader.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.