Module gl_utils::info[][src]

Functions for writing various glium and glutin context info to a file handle.

glutin

The main datatypes in glutin are the glutin::GlWindow and glutin::HeadlessContext, both of which implement the glutin::GlContext trait:

Traits:

[Traits ]                         GlContext
                                     /\
                                     ||
[Structs]  GlAttributes       ==> HeadlessContext
           GlAttributes       ==> Context
           + WindowAttributes ==> GlWindow


GlContext --> PixelFormat
          --> Api
          --> is_current(), make_current()
          --> get_proc_address()
          --> resize()
          --> swap_buffers()

glutin::PixelFormat -- of a GlContext is the pixel format of the main framebuffer.

glutin::Api -- indicates whether OpenGl, OpenGlEs, or WebGl is being used

is_current, make_current -- queries and sets whether this context is the current one in this thread

get_proc_address -- required method for getting addresses of OpenGL functions used internally

resize -- required for contexts on some platforms (macOS, Wayland) to be manually updated when their window or surface is resized, i.e. it resize should be called for each Resized window event that is received

swap_buffers -- according to the documentation for glutin 0.12.0 (https://docs.rs/glutin/0.12.0/glutin/trait.GlContext.html#tymethod.swap_buffers), drivers may choose to override vsync settings to it is not possible to know in advance whether swap_buffers() will block or not.

glium

Glium extends the glutin::GlWindow and glutin::HeadlessContext datatypes with the glium::Display and glium::HeadlessRenderer datatypes, both of which dereference to a glium::backend::Context which is an implementor of glium::backend::Facade:

Traits:

[Traits ]                      Facade    CapabilitiesSource   Surface
                                 /\  \           /\             /\
                                 ||   \------\\\\||             ||
[Structs]     GlWindow     ==> Display  ====> Context =======> Frame
           HeadlessContext ==> Headless ====>  \\\\==========> DefaultFramebuffer
                                                \\\==========> EmptyFramebuffer,
                                                 \\==========> SimpleFramebuffer,
                                                  \==========> MultiOutputFramebuffer

Functions

glium_capabilities_source_info_write
glium_context_info_write
glium_display_info_write
glium_info_write
glium_surface_info_write
glutin_events_loop_info_write
glutin_gl_context_info_write
glutin_gl_window_info_write
glutin_info_write
glutin_window_info_write