Add support for the OpenGL debug flag
This commit is contained in:
parent
9ee0875d4e
commit
8c1b2dd633
4 changed files with 39 additions and 6 deletions
|
|
@ -16,8 +16,8 @@ local_data_key!(WINDOW: (ffi::HWND, Sender<Event>))
|
|||
|
||||
pub fn new_window(builder_dimensions: Option<(uint, uint)>, builder_title: String,
|
||||
builder_monitor: Option<super::MonitorID>,
|
||||
builder_gl_version: Option<(uint, uint)>, builder_vsync: bool,
|
||||
builder_hidden: bool) -> Result<Window, CreationError>
|
||||
builder_gl_version: Option<(uint, uint)>, builder_debug: bool,
|
||||
builder_vsync: bool, builder_hidden: bool) -> Result<Window, CreationError>
|
||||
{
|
||||
use std::mem;
|
||||
use std::os;
|
||||
|
|
@ -298,6 +298,11 @@ pub fn new_window(builder_dimensions: Option<(uint, uint)>, builder_title: Strin
|
|||
attributes.push(version.val1() as libc::c_int);
|
||||
}
|
||||
|
||||
if builder_debug {
|
||||
attributes.push(ffi::wgl_extra::CONTEXT_FLAGS_ARB as libc::c_int);
|
||||
attributes.push(ffi::wgl_extra::CONTEXT_DEBUG_BIT_ARB as libc::c_int);
|
||||
}
|
||||
|
||||
attributes.push(0);
|
||||
|
||||
let ctxt = unsafe {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue