From 2552d4321bff760b93dc5a6f08a2d90ec4b7c92e Mon Sep 17 00:00:00 2001 From: chyyran <ronny@ronnychan.ca> Date: Fri, 2 Aug 2024 00:23:35 -0400 Subject: [PATCH] capi(gl): set output in libra_output_image_gl_t, not viewport --- librashader-capi/src/runtime/gl/filter_chain.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/librashader-capi/src/runtime/gl/filter_chain.rs b/librashader-capi/src/runtime/gl/filter_chain.rs index 09bec23..3ad895d 100644 --- a/librashader-capi/src/runtime/gl/filter_chain.rs +++ b/librashader-capi/src/runtime/gl/filter_chain.rs @@ -41,6 +41,10 @@ pub struct libra_output_framebuffer_gl_t { pub texture: u32, /// The format of the output framebuffer. pub format: u32, + /// The width of the output image. + pub width: u32, + /// The height of the output image. + pub height: u32, } impl From<libra_source_image_gl_t> for GLImage { @@ -202,7 +206,8 @@ extern_fn! { }; let opt = opt.map(FromUninit::from_uninit); - let framebuffer = GLFramebuffer::new_from_raw(out.texture, out.fbo, out.format, Size::new(viewport.width, viewport.height), 1); + let framebuffer = GLFramebuffer::new_from_raw(out.texture, out.fbo, out.format, + Size::new(out.width, out.height), 1); let viewport = Viewport { x: viewport.x, y: viewport.y,