Skip to content

Commit

Permalink
fixing shadowmap textures on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
patriciogonzalezvivo committed Oct 21, 2022
1 parent eb32e60 commit e0febbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.2)

set(VERSION_MAJOR 3)
set(VERSION_MINOR 0)
set(VERSION_PATCH 2)
set(VERSION_PATCH 3)
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")

project(glslViewer
Expand Down
2 changes: 1 addition & 1 deletion deps/vera
Submodule vera updated 1 files
+2 −0 src/types/light.cpp
9 changes: 5 additions & 4 deletions src/sceneRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,16 +496,17 @@ void SceneRender::updateBuffers(Uniforms& _uniforms, int _width, int _height) {
if (_uniforms.functions["u_sceneNormal"].present &&
( !normalFbo.isAllocated() ||
normalFbo.getWidth() != _width || normalFbo.getHeight() != _height ) )
normalFbo.allocate(_width, _height, vera::GBUFFER_TEXTURE);
normalFbo.allocate(_width, _height, vera::GBUFFER_TEXTURE);


if (_uniforms.functions["u_scenePosition"].present &&
( !positionFbo.isAllocated() ||
positionFbo.getWidth() != _width || positionFbo.getHeight() != _height ) )
positionFbo.allocate(_width, _height, vera::GBUFFER_TEXTURE);
positionFbo.allocate(_width, _height, vera::GBUFFER_TEXTURE);

for (size_t i = 0; i < buffersFbo.size(); i++)
if (buffersFbo[i].isAllocated() ||
buffersFbo[i].getWidth() != _width || buffersFbo[i].getHeight() )
buffersFbo[i].getWidth() != _width || buffersFbo[i].getHeight() )
buffersFbo[i].allocate(_width, _height, vera::GBUFFER_TEXTURE);
}

Expand Down Expand Up @@ -620,7 +621,7 @@ void SceneRender::renderNormalBuffer(Uniforms& _uniforms) {
}

void SceneRender::renderPositionBuffer(Uniforms& _uniforms) {
if (!normalFbo.isAllocated())
if (!positionFbo.isAllocated())
return;

positionFbo.bind();
Expand Down

0 comments on commit e0febbe

Please sign in to comment.