Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 4c663b51 authored by TAVERNIER Vincent's avatar TAVERNIER Vincent
Browse files

Fix iResolution not being updated on AllocateTexture

parent cfc91ba0
No related branches found
No related tags found
No related merge requests found
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 libshadertoy (0.0.5) unstable; urgency=medium
* Fix support for iGlobalTime as well as iTime * Fix support for iGlobalTime as well as iTime
......
...@@ -12,7 +12,7 @@ Vcs-Git: https://gitlab.inria.fr/vtaverni/libshadertoy.git ...@@ -12,7 +12,7 @@ Vcs-Git: https://gitlab.inria.fr/vtaverni/libshadertoy.git
Vcs-Browser: https://gitlab.inria.fr/vtaverni/libshadertoy/tree/master Vcs-Browser: https://gitlab.inria.fr/vtaverni/libshadertoy/tree/master
Package: libshadertoy-dev Package: libshadertoy-dev
Version: 0.0.5 Version: 0.0.6
Section: libdevel Section: libdevel
Architecture: all Architecture: all
Depends: libshadertoy0 (= ${binary:Version}), ${misc:Depends}, Depends: libshadertoy0 (= ${binary:Version}), ${misc:Depends},
...@@ -21,7 +21,7 @@ Description: Development files for libshadertoy ...@@ -21,7 +21,7 @@ Description: Development files for libshadertoy
Development headers and documentation for libshadertoy Development headers and documentation for libshadertoy
Package: libshadertoy0 Package: libshadertoy0
Version: 0.0.5 Version: 0.0.6
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends} Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Library for rendering ShaderToy programs using OpenGL Description: Library for rendering ShaderToy programs using OpenGL
......
...@@ -96,7 +96,6 @@ RenderContext::RenderContext(ContextConfig &config) ...@@ -96,7 +96,6 @@ RenderContext::RenderContext(ContextConfig &config)
void RenderContext::Initialize() void RenderContext::Initialize()
{ {
// Initialize constant uniforms // Initialize constant uniforms
state.V<iResolution>() = Vec3f(config.width, config.height, 1.0f);
state.V<iTimeDelta>() = 1.0f / (float) config.targetFramerate; state.V<iTimeDelta>() = 1.0f / (float) config.targetFramerate;
state.V<iFrameRate>() = (float) config.targetFramerate; state.V<iFrameRate>() = (float) config.targetFramerate;
...@@ -229,6 +228,10 @@ void RenderContext::AllocateTextures() ...@@ -229,6 +228,10 @@ void RenderContext::AllocateTextures()
// Reallocate inputs // Reallocate inputs
textureEngine->ClearState(true); 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() void RenderContext::ClearState()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment