summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/09-hdr/hdr.cpp
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-05-02 19:41:03 +0200
committer ImJezze <jezze@gmx.net>2015-05-02 19:41:03 +0200
commitcc3b682e52bf097d31db78032aad01d6a0b12e94 (patch)
tree860c97ca011b64c31a5ad277f5cea2b1d86eeaf0 /3rdparty/bgfx/examples/09-hdr/hdr.cpp
parent7df6a23ba2ae1c1df94ed8cc2398f2546f339997 (diff)
parenta649a95488e1fc85813dda747dc74c596496bd1c (diff)
Merge pull request #1 from mamedev/master
Sync to master
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