Skip to content

Commit 00042f6

Browse files
Fix for issue with screenshots and incorrect fullscreen resolution
1 parent 6f4d17b commit 00042f6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ void MainLoop(void* arg)
248248
{
249249
if (event.window.event == SDL_WINDOWEVENT_SIZE_CHANGED)
250250
{
251-
scene->renderOptions.resolution = iVec2(event.window.data1, event.window.data2);
251+
renderOptions.resolution = iVec2(event.window.data1, event.window.data2);
252+
scene->renderOptions = renderOptions;
252253
InitRenderer(); // FIXME: Not all textures have to be regenerated on resizing
253254
}
254255

src/core/Renderer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ namespace GLSLPT
100100

101101
quad = new Quad();
102102

103+
glPixelStorei(GL_PACK_ALIGNMENT, 1);
104+
103105
//Create Buffer and Texture for BVH Tree
104106
glGenBuffers(1, &BVHBuffer);
105107
glBindBuffer(GL_TEXTURE_BUFFER, BVHBuffer);

0 commit comments

Comments
 (0)