2022-11-20 15:16:57 +11:00
|
|
|
use crate::util;
|
2022-11-27 18:10:11 +11:00
|
|
|
use crate::texture::Texture;
|
2022-11-21 18:13:10 +11:00
|
|
|
use gl::types::{GLenum, GLint, GLsizei, GLuint};
|
2022-11-29 17:57:04 +11:00
|
|
|
use librashader_common::{FilterMode, ImageFormat, Size, WrapMode};
|
2022-11-20 14:03:58 +11:00
|
|
|
use librashader_presets::{Scale2D, ScaleType, Scaling};
|
2022-11-22 09:44:38 +11:00
|
|
|
use crate::error::FilterChainError;
|
|
|
|
use crate::error::Result;
|
2022-11-30 15:56:10 +11:00
|
|
|
use crate::gl::Framebuffer;
|
|
|
|
use crate::gl::gl3::Gl3Framebuffer;
|
2022-11-21 18:56:03 +11:00
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
|
|
|
pub struct Viewport<'a> {
|
|
|
|
pub x: i32,
|
|
|
|
pub y: i32,
|
2022-11-30 15:56:10 +11:00
|
|
|
pub output: &'a Gl3Framebuffer,
|
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)]
|
|
|
|
pub struct GlImage {
|
|
|
|
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
|
|
|
}
|