diff options
-rw-r--r-- | glfw/src/window.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/glfw/src/window.rs b/glfw/src/window.rs index 8ccb1d1..05878a8 100644 --- a/glfw/src/window.rs +++ b/glfw/src/window.rs @@ -401,7 +401,7 @@ impl Builder // Error is not checked for after since the two possible errors // (GLFW_NOT_INITIALIZED and GLFW_INVALID_ENUM) cannot occur. unsafe { - crate::ffi::glfwWindowHint(hint.to_glfw(), *value); + crate::ffi::glfwWindowHint(*hint as i32, *value); } } @@ -426,19 +426,11 @@ impl Builder /// Window creation hint #[derive(Debug, Clone, Copy)] +#[repr(i32)] pub enum Hint { - OpenGLDebugContext, -} - -impl Hint -{ - fn to_glfw(self) -> c_int - { - match self { - Self::OpenGLDebugContext => crate::ffi::GLFW_OPENGL_DEBUG_CONTEXT, - } - } + OpenGLDebugContext = crate::ffi::GLFW_OPENGL_DEBUG_CONTEXT, + Samples = crate::ffi::GLFW_SAMPLES, } /// Window size. |