autocommit 2022-03-23 14:35:09 CET
This commit is contained in:
parent
6597a57ad5
commit
63be47a9fb
24 changed files with 703 additions and 722 deletions
|
|
@ -9,11 +9,9 @@ use crate::render::gl::sys::GLint;
|
|||
use crate::render::gl::texture::GlTexture;
|
||||
use crate::render::renderer::framebuffer::Framebuffer;
|
||||
use crate::render::renderer::image::Image;
|
||||
use crate::render::renderer::RENDERDOC;
|
||||
use crate::render::{RenderError, Texture};
|
||||
use ahash::AHashMap;
|
||||
use renderdoc::{RenderDoc, V100};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::cell::Cell;
|
||||
use std::ffi::CString;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::rc::Rc;
|
||||
|
|
@ -42,8 +40,6 @@ pub struct RenderContext {
|
|||
|
||||
pub(super) render_node: Rc<CString>,
|
||||
|
||||
pub(super) renderdoc: Option<RefCell<RenderDoc<V100>>>,
|
||||
|
||||
pub(super) tex_prog: TexProg,
|
||||
pub(super) tex_alpha_prog: TexProg,
|
||||
|
||||
|
|
@ -104,12 +100,6 @@ impl RenderContext {
|
|||
fill_prog_pos: fill_prog.get_attrib_location(ustr!("pos")),
|
||||
fill_prog_color: fill_prog.get_uniform_location(ustr!("color")),
|
||||
fill_prog,
|
||||
|
||||
renderdoc: if RENDERDOC {
|
||||
Some(RefCell::new(RenderDoc::new().unwrap()))
|
||||
} else {
|
||||
None
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ use crate::render::sys::{glBlendFunc, GL_ONE, GL_ONE_MINUS_SRC_ALPHA};
|
|||
use crate::tree::Node;
|
||||
use crate::State;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub struct Framebuffer {
|
||||
|
|
@ -38,10 +37,6 @@ impl Framebuffer {
|
|||
|
||||
pub fn render(&self, node: &dyn Node, state: &State, cursor_rect: Option<Rect>) {
|
||||
let _ = self.ctx.ctx.with_current(|| {
|
||||
if let Some(rd) = &self.ctx.renderdoc {
|
||||
rd.borrow_mut()
|
||||
.start_frame_capture(ptr::null(), ptr::null());
|
||||
}
|
||||
unsafe {
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, self.gl.fbo);
|
||||
glViewport(0, 0, self.gl.width, self.gl.height);
|
||||
|
|
@ -79,9 +74,6 @@ impl Framebuffer {
|
|||
}
|
||||
}
|
||||
}
|
||||
if let Some(rd) = &self.ctx.renderdoc {
|
||||
rd.borrow_mut().end_frame_capture(ptr::null(), ptr::null());
|
||||
}
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,5 +9,3 @@ mod framebuffer;
|
|||
mod image;
|
||||
mod renderer;
|
||||
mod texture;
|
||||
|
||||
pub const RENDERDOC: bool = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue