Struct bgfx::PlatformData
[−]
[src]
pub struct PlatformData { // some fields omitted }
Platform data initializer.
This should be applied only once, before bgfx is used.
Example
// Note: The default value for all of these options is null. If that is what you want, you may // choose not to call said setter. bgfx::PlatformData::new() .context(std::ptr::null_mut()) .display(std::ptr::null_mut()) // Must be non-null on unix platforms .window(std::ptr::null_mut()) // Must be non-null .apply() .expect("Could not set platform data");
Methods
impl PlatformData
fn new() -> PlatformData
Creates an empty PlatformData instance.
fn apply(&mut self) -> Result<(), BgfxError>
Apply the platform configuration.
fn context(&mut self, context: *mut c_void) -> &mut Self
Sets the GL context to use.
fn display(&mut self, display: *mut c_void) -> &mut Self
Sets the X11 display to use on unix systems.
fn window(&mut self, window: *mut c_void) -> &mut Self
Sets the handle to the window to use.