rt(gl): draw final pass to output targets
This commit is contained in:
parent
666588ef0d
commit
e68da7b984
|
@ -361,12 +361,25 @@ impl<T: GLInterface> FilterChainImpl<T> {
|
||||||
// try to hint the optimizer
|
// try to hint the optimizer
|
||||||
assert_eq!(last.len(), 1);
|
assert_eq!(last.len(), 1);
|
||||||
if let Some(pass) = last.iter_mut().next() {
|
if let Some(pass) = last.iter_mut().next() {
|
||||||
|
let index = passes_len - 1;
|
||||||
source.filter = pass.config.filter;
|
source.filter = pass.config.filter;
|
||||||
source.mip_filter = pass.config.filter;
|
source.mip_filter = pass.config.filter;
|
||||||
source.wrap_mode = pass.config.wrap_mode;
|
source.wrap_mode = pass.config.wrap_mode;
|
||||||
|
|
||||||
|
let target = &self.output_framebuffers[index];
|
||||||
pass.draw(
|
pass.draw(
|
||||||
passes_len - 1,
|
index,
|
||||||
|
&self.common,
|
||||||
|
pass.config.get_frame_count(frame_count),
|
||||||
|
options,
|
||||||
|
viewport,
|
||||||
|
&original,
|
||||||
|
&source,
|
||||||
|
RenderTarget::viewport_with_output(target, viewport),
|
||||||
|
);
|
||||||
|
|
||||||
|
pass.draw(
|
||||||
|
index,
|
||||||
&self.common,
|
&self.common,
|
||||||
pass.config.get_frame_count(frame_count),
|
pass.config.get_frame_count(frame_count),
|
||||||
options,
|
options,
|
||||||
|
|
|
@ -8,12 +8,7 @@ pub unsafe fn gl_compile_shader(stage: GLenum, source: &str) -> error::Result<GL
|
||||||
let (shader, compile_status) = unsafe {
|
let (shader, compile_status) = unsafe {
|
||||||
let lens = [source.len() as GLint];
|
let lens = [source.len() as GLint];
|
||||||
let shader = gl::CreateShader(stage);
|
let shader = gl::CreateShader(stage);
|
||||||
gl::ShaderSource(
|
gl::ShaderSource(shader, 1, &source.as_ptr().cast(), lens.as_ptr());
|
||||||
shader,
|
|
||||||
1,
|
|
||||||
&source.as_ptr().cast(),
|
|
||||||
lens.as_ptr(),
|
|
||||||
);
|
|
||||||
gl::CompileShader(shader);
|
gl::CompileShader(shader);
|
||||||
let mut compile_status = 0;
|
let mut compile_status = 0;
|
||||||
gl::GetShaderiv(shader, gl::COMPILE_STATUS, &mut compile_status);
|
gl::GetShaderiv(shader, gl::COMPILE_STATUS, &mut compile_status);
|
||||||
|
|
|
@ -9,7 +9,7 @@ fn triangle_gl() {
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut filter = FilterChainGL::load_from_path(
|
let mut filter = FilterChainGL::load_from_path(
|
||||||
"../test/shaders_slang/crt/crt-royale.slangp",
|
"../test/shaders_slang/test/feedback.slangp",
|
||||||
Some(&FilterChainOptionsGL {
|
Some(&FilterChainOptionsGL {
|
||||||
glsl_version: 0,
|
glsl_version: 0,
|
||||||
use_dsa: false,
|
use_dsa: false,
|
||||||
|
|
Loading…
Reference in a new issue