Trait window::OpenGLWindow [] [src]

pub trait OpenGLWindow: Window {
    fn get_proc_address(&mut self, proc_name: &str) -> ProcAddress;
fn is_current(&self) -> bool;
fn make_current(&mut self); }

Trait for OpenGL specific operations on a window.

OpenGL uses a strategy called "function pointer loading" to hook up the higher level graphics APIs with the OpenGL driver. Which function pointers to load depends on the hardware capabilities and version of OpenGL. By using the OpenGLWindow trait, the higher level graphics API can load functions from the window backend with the version set up using the WindowSettings structure.

For more information about function pointer loading, see https://www.opengl.org/wiki/Load_OpenGL_Functions

Required Methods

Returns the address of the specified OpenGL function if it exists.

If the function does not exist, it returns a null pointer.

Returns true if this window's gl context is the current gl context.

Make the window's gl context the current gl context.

Implementors