Skip to content

Commit

Permalink
SampleApp: make the sample release swap chain buffers when toggling f…
Browse files Browse the repository at this point in the history
…ull screen mode
  • Loading branch information
TheMostDiligent committed Feb 10, 2025
1 parent 6a695dd commit 8807a15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SampleBase/include/SampleApp.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2024 Diligent Graphics LLC
* Copyright 2019-2025 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -95,11 +95,13 @@ class SampleApp : public NativeAppBase

virtual void SetFullscreenMode(const DisplayModeAttribs& DisplayMode)
{
m_TheSample->ReleaseSwapChainBuffers();
m_bFullScreenMode = true;
m_pSwapChain->SetFullscreenMode(DisplayMode);
}
virtual void SetWindowedMode()
{
m_TheSample->ReleaseSwapChainBuffers();
m_bFullScreenMode = false;
m_pSwapChain->SetWindowedMode();
}
Expand Down

0 comments on commit 8807a15

Please sign in to comment.