From 7abf50ae6160406bb48752b51812df30fbaf2d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Fri, 10 Nov 2017 22:12:24 +0100 Subject: [PATCH] Minor fixes to previous commit * Restrict clear to frame * Restrict viewport to frame, as it used to be * Moved viewport clearing to render code --- demo.srd | 6 +++--- opast.hh | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/demo.srd b/demo.srd index a10d9e9..c9b1d8e 100644 --- a/demo.srd +++ b/demo.srd @@ -21,9 +21,6 @@ (call bloom-init) (call combine-init) (call fxaa-init) - - (viewport 0 0 $width $height) - (clear 0 0 0 0) ) (frame @@ -426,6 +423,9 @@ (fn fxaa-render (in-image) (profiling "FXAA" (main-output) + (viewport 0 0 $width $height) + (clear 0 0 0 0) + (use-pipeline pl-fxaa) (use-texture 0 in-image smp-fxaa) (uniforms prg-fxaa 2 diff --git a/opast.hh b/opast.hh index 37f4c4e..d220a4c 100644 --- a/opast.hh +++ b/opast.hh @@ -335,7 +335,8 @@ class T_ClearInstrNode : public A_InstructionNode public: T_ClearInstrNode( T_InstrListNode& parent ) noexcept - : A_InstructionNode( OP_CLEAR , parent ) + : A_InstructionNode( OP_CLEAR , parent , + E_InstrRestriction::INIT ) { } void addComponent( P_ExpressionNode expr ) noexcept @@ -962,7 +963,8 @@ class T_ViewportInstrNode : public A_InstructionNode public: T_ViewportInstrNode( T_InstrListNode& parent ) noexcept - : A_InstructionNode( OP_VIEWPORT , parent ) + : A_InstructionNode( OP_VIEWPORT , parent , + E_InstrRestriction::INIT ) { } void setParameter( const E_Parameter p , P_ExpressionNode height ) noexcept