diff options
| author | HampusM <hampus@hampusmat.com> | 2024-05-24 22:58:38 +0200 | 
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2024-05-24 22:58:38 +0200 | 
| commit | 9ed8f23f3d88bd63ce762d222bbd47ff493c598a (patch) | |
| tree | 2e1abf08d1f5ec914048ec66076dac79310259f6 | |
| parent | de48442a11aa0638e2fbe70df8b31e264ab3b03e (diff) | |
feat(glfw): add support for samples window hint
| -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.  | 
