2022-11-30 17:38:05 +11:00
|
|
|
use gl::types::{GLenum, GLuint};
|
|
|
|
use librashader_common::Size;
|
|
|
|
|
2022-12-01 09:21:32 +11:00
|
|
|
use crate::gl::{Framebuffer, FramebufferInterface};
|
2022-11-21 18:56:03 +11:00
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
2022-12-01 09:21:32 +11:00
|
|
|
pub struct Viewport<'a> {
|
2022-11-21 18:56:03 +11:00
|
|
|
pub x: i32,
|
|
|
|
pub y: i32,
|
2022-12-01 09:21:32 +11:00
|
|
|
pub output: &'a Framebuffer,
|
2022-11-28 15:27:21 +11:00
|
|
|
pub mvp: Option<&'a [f32; 16]>,
|
2022-11-21 18:56:03 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Default, Debug, Copy, Clone)]
|
2022-11-30 16:39:42 +11:00
|
|
|
pub struct GLImage {
|
2022-11-21 18:56:03 +11:00
|
|
|
pub handle: GLuint,
|
|
|
|
pub format: GLenum,
|
2022-11-21 19:01:26 +11:00
|
|
|
pub size: Size<u32>,
|
|
|
|
pub padded_size: Size<u32>,
|
2022-11-21 18:56:03 +11:00
|
|
|
}
|