Struct glium::glutin::HeadlessRendererBuilder [] [src]

pub struct HeadlessRendererBuilder {
    // some fields omitted
}

Object that allows you to build headless contexts.

Methods

impl HeadlessRendererBuilder

fn new(width: u32, height: u32) -> HeadlessRendererBuilder

Initializes a new HeadlessRendererBuilder with default values.

fn with_gl(self, request: GlRequest) -> HeadlessRendererBuilder

Sets how the backend should choose the OpenGL API and version.

fn with_gl_debug_flag(self, flag: bool) -> HeadlessRendererBuilder

Sets the debug flag for the OpenGL context.

The default value for this flag is cfg!(ndebug), which means that it's enabled when you run cargo build and disabled when you run cargo build --release.

fn with_gl_robustness(self, robustness: Robustness) -> HeadlessRendererBuilder

Sets the robustness of the OpenGL context. See the docs of Robustness.

fn build(self) -> Result<HeadlessContext, CreationError>

Builds the headless context.

Error should be very rare and only occur in case of permission denied, incompatible system, out of memory, etc.

fn build_strict(self) -> Result<HeadlessContext, CreationError>

Builds the headless context.

The context is build in a strict way. That means that if the backend couldn't give you what you requested, an Err will be returned.

Trait Implementations

impl DisplayBuild for HeadlessRendererBuilder

type Facade = GlutinFacade

type Err = GliumCreationError<CreationError>

fn build_glium(self) -> Result<GlutinFacade, GliumCreationError<CreationError>>

unsafe fn build_glium_unchecked(self) -> Result<GlutinFacade, GliumCreationError<CreationError>>

fn rebuild_glium(self, _: &GlutinFacade) -> Result<(), GliumCreationError<CreationError>>