summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/09-hdr/hdr.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/09-hdr/hdr.cpp')
-rw-r--r--3rdparty/bgfx/examples/09-hdr/hdr.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/3rdparty/bgfx/examples/09-hdr/hdr.cpp b/3rdparty/bgfx/examples/09-hdr/hdr.cpp
index c8dbfea1539..f8ccb29aa19 100644
--- a/3rdparty/bgfx/examples/09-hdr/hdr.cpp
+++ b/3rdparty/bgfx/examples/09-hdr/hdr.cpp
@@ -216,10 +216,10 @@ int _main_(int /*_argc*/, char** /*_argv*/)
lum[4] = bgfx::createFrameBuffer( 1, 1, bgfx::TextureFormat::BGRA8);
bgfx::FrameBufferHandle bright;
- bright = bgfx::createFrameBuffer(width/2, height/2, bgfx::TextureFormat::BGRA8);
+ bright = bgfx::createFrameBuffer(bgfx::BackbufferRatio::Half, bgfx::TextureFormat::BGRA8);
bgfx::FrameBufferHandle blur;
- blur = bgfx::createFrameBuffer(width/8, height/8, bgfx::TextureFormat::BGRA8);
+ blur = bgfx::createFrameBuffer(bgfx::BackbufferRatio::Eighth, bgfx::TextureFormat::BGRA8);
// Imgui.
imguiCreate();
@@ -256,15 +256,10 @@ int _main_(int /*_argc*/, char** /*_argv*/)
uint32_t msaa = (reset&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT;
bgfx::destroyFrameBuffer(fbh);
- bgfx::destroyFrameBuffer(bright);
- bgfx::destroyFrameBuffer(blur);
fbtextures[0] = bgfx::createTexture2D(width, height, 1, bgfx::TextureFormat::BGRA8, ( (msaa+1)<<BGFX_TEXTURE_RT_MSAA_SHIFT)|BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP);
fbtextures[1] = bgfx::createTexture2D(width, height, 1, bgfx::TextureFormat::D16, BGFX_TEXTURE_RT_BUFFER_ONLY|( (msaa+1)<<BGFX_TEXTURE_RT_MSAA_SHIFT) );
fbh = bgfx::createFrameBuffer(BX_COUNTOF(fbtextures), fbtextures, true);
-
- bright = bgfx::createFrameBuffer(width/2, height/2, bgfx::TextureFormat::BGRA8);
- blur = bgfx::createFrameBuffer(width/8, height/8, bgfx::TextureFormat::BGRA8);
}
imguiBeginFrame(mouseState.m_mx