diff options
author | pommicket <pommicket@gmail.com> | 2022-12-18 12:07:30 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-18 12:07:30 -0500 |
commit | 53446631bf579c85786af1b4c8fcd54566c0d391 (patch) | |
tree | 0ebd2905473b4ff04a9242707ed2a8eeb18795b9 /src/win.rs | |
parent | 7192da0f823b069c593b5f03e170a30d7f63b639 (diff) |
switch framebuffer texture to grayscale
Diffstat (limited to 'src/win.rs')
-rw-r--r-- | src/win.rs | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -492,6 +492,23 @@ unsafe impl Color for ColorF32 { const GL_TYPE: GLenum = gl::FLOAT; } +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ColorGrayscaleF32 { + pub value: f32 +} + +impl ColorGrayscaleF32 { + pub const fn new(value: f32) -> Self { + Self { value } + } +} + +unsafe impl Color for ColorGrayscaleF32 { + const GL_FORMAT: GLenum = gl::RED; + const GL_TYPE: GLenum = gl::FLOAT; +} + pub struct Shader { id: GLuint, /// shaders should not be sent across threads because of the drop function. |