diff --git a/debian/changelog b/debian/changelog index 6b21eb8f7db78711656369a99ccba53f98c566d9..5864b6924550ad41a7a75bda2972193d7f7fd0e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libshadertoy (0.0.6) unstable; urgency=medium + + * Fix iResolution not being updated on resolution change through Allocate + + -- Vincent Tavernier <vincent.tavernier@inria.fr> Fri, 13 Oct 2017 14:05:00 +0200 + libshadertoy (0.0.5) unstable; urgency=medium * Fix support for iGlobalTime as well as iTime diff --git a/debian/control b/debian/control index 20138ee53b7263dbfab3767549d7f07499599794..68a012054a59ba6ec48e448f423a5ed684ffe078 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Vcs-Git: https://gitlab.inria.fr/vtaverni/libshadertoy.git Vcs-Browser: https://gitlab.inria.fr/vtaverni/libshadertoy/tree/master Package: libshadertoy-dev -Version: 0.0.5 +Version: 0.0.6 Section: libdevel Architecture: all Depends: libshadertoy0 (= ${binary:Version}), ${misc:Depends}, @@ -21,7 +21,7 @@ Description: Development files for libshadertoy Development headers and documentation for libshadertoy Package: libshadertoy0 -Version: 0.0.5 +Version: 0.0.6 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Library for rendering ShaderToy programs using OpenGL diff --git a/src/RenderContext.cpp b/src/RenderContext.cpp index b23154089e8455fdb2818cf54148cbc938b6a166..d4154d1fb5a7af7dc9b55d0ee5382297ca38d0e8 100644 --- a/src/RenderContext.cpp +++ b/src/RenderContext.cpp @@ -96,7 +96,6 @@ RenderContext::RenderContext(ContextConfig &config) void RenderContext::Initialize() { // Initialize constant uniforms - state.V<iResolution>() = Vec3f(config.width, config.height, 1.0f); state.V<iTimeDelta>() = 1.0f / (float) config.targetFramerate; state.V<iFrameRate>() = (float) config.targetFramerate; @@ -229,6 +228,10 @@ void RenderContext::AllocateTextures() // Reallocate inputs textureEngine->ClearState(true); + + // Update the iResolution uniform, as this method can be called after a + // framebuffer size change + state.V<iResolution>() = Vec3f(config.width, config.height, 1.0f); } void RenderContext::ClearState()