Struct smithay::backend::renderer::gles2::Gles2Renderer[][src]

pub struct Gles2Renderer { /* fields omitted */ }
Expand description

A renderer utilizing OpenGL ES 2

Implementations

Creates a new OpenGL ES 2 renderer from a given EGLContext.

Safety

This operation will cause undefined behavior if the given EGLContext is active in another thread.

Implementation details

  • Texture handles created by the resulting renderer are valid for every rendered created with an EGLContext shared with the given one (see EGLContext::new_shared) and can be used on any of these renderers.
  • This renderer has no default framebuffer, use Bind::bind before rendering.
  • Binding a new target, while another one is already bound, will replace the current target.
  • Shm buffers can be released after a successful import, without the texture handle becoming invalid.

Run custom code in the GL context owned by this renderer.

Note: Any changes to the GL state should be restored at the end of this function. Otherwise this can lead to rendering errors while using functions of this renderer. Relying on any state set by the renderer may break on any smithay update as the details about how this renderer works are considered an implementation detail.

Trait Implementations

Bind a given rendering target, which will contain the rendering results until unbind is called. Read more

Supported pixel formats for given targets, if applicable.

Bind a given rendering target, which will contain the rendering results until unbind is called. Read more

Supported pixel formats for given targets, if applicable.

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Import a given raw dmabuf into the renderer. Read more

Returns supported formats for dmabufs.

Import a given dmabuf-based buffer into the renderer (see buffer_type). Read more

Binds the underlying EGL display to the given Wayland display. Read more

Unbinds a previously bound egl display, if existing. Read more

Returns the underlying EGLBufferReader. Read more

Import a given wl_drm-based buffer into the renderer (see buffer_type). Read more

Import a given shm-based buffer into the renderer (see buffer_type). Read more

Returns supported formats for shared memory buffers. Read more

Error type returned by the rendering operations of this renderer.

Texture Handle type used by this renderer.

Type representing a currently in-progress frame during the Renderer::render-call

Initialize a rendering context on the current rendering target with given dimensions and transformation. Read more

Unbind the current rendering target. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Performs the conversion.

Import a given buffer into the renderer. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.