1
0
Fork 0
forked from wry/wry

autocommit 2022-04-27 20:37:49 CEST

This commit is contained in:
Julian Orth 2022-04-27 20:37:49 +02:00
parent 57899b3f35
commit 324eb835bb
24 changed files with 478 additions and 68 deletions

View file

@ -11,6 +11,7 @@ use {
},
renderer::{context::RenderContext, renderer::Renderer},
sys::{glBlendFunc, glFlush, GL_ONE, GL_ONE_MINUS_SRC_ALPHA},
RenderResult,
},
state::State,
tree::Node,
@ -45,7 +46,14 @@ impl Framebuffer {
});
}
pub fn render(&self, node: &dyn Node, state: &State, cursor_rect: Option<Rect>) {
pub fn render(
&self,
node: &dyn Node,
state: &State,
cursor_rect: Option<Rect>,
on_output: bool,
result: &mut RenderResult,
) {
let _ = self.ctx.ctx.with_current(|| {
let c = state.theme.background_color.get();
unsafe {
@ -59,6 +67,8 @@ impl Framebuffer {
ctx: &self.ctx,
fb: &self.gl,
state,
on_output,
result,
};
node.node_render(&mut renderer, 0, 0);
if let Some(rect) = cursor_rect {