X11 GlContext::create: change display arg to *mut xlib::XDisplay
This commit is contained in:
parent
70f46a691d
commit
4130502a2a
|
@ -78,14 +78,12 @@ impl GlContext {
|
|||
///
|
||||
/// Use [Self::get_fb_config_and_visual] to create both of these things.
|
||||
pub unsafe fn create(
|
||||
window: c_ulong, display: *mut c_void, config: FbConfig,
|
||||
window: c_ulong, display: *mut xlib::_XDisplay, config: FbConfig,
|
||||
) -> Result<GlContext, GlError> {
|
||||
if display.is_null() {
|
||||
return Err(GlError::InvalidWindowHandle);
|
||||
}
|
||||
|
||||
let display = display as *mut xlib::_XDisplay;
|
||||
|
||||
errors::XErrorHandler::handle(display, |error_handler| {
|
||||
#[allow(non_snake_case)]
|
||||
let glXCreateContextAttribsARB: GlXCreateContextAttribsARB = {
|
||||
|
|
|
@ -324,7 +324,7 @@ impl Window {
|
|||
#[cfg(feature = "opengl")]
|
||||
let gl_context = fb_config.map(|fb_config| {
|
||||
let window = window_id as c_ulong;
|
||||
let display = xcb_connection.conn.get_raw_dpy() as *mut c_void;
|
||||
let display = xcb_connection.conn.get_raw_dpy();
|
||||
|
||||
// Because of the visual negotation we had to take some extra steps to create this context
|
||||
let context = unsafe { platform::GlContext::create(window, display, fb_config) }
|
||||
|
|
Loading…
Reference in a new issue