diff options
author | 2017-01-02 14:05:50 +0100 | |
---|---|---|
committer | 2017-01-02 14:05:50 +0100 | |
commit | fadb547f630d377b1ff69a7ab09f852855930c56 (patch) | |
tree | a77a08bbed897113aec7a95657fc5e0d902fc0b6 /3rdparty/bgfx/examples/21-deferred/deferred.cpp | |
parent | 04faaaf7ffb422f390262e119fe50db21683a831 (diff) |
Updated BGFX (nw)
Diffstat (limited to '3rdparty/bgfx/examples/21-deferred/deferred.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/21-deferred/deferred.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/3rdparty/bgfx/examples/21-deferred/deferred.cpp b/3rdparty/bgfx/examples/21-deferred/deferred.cpp index 871ba7af6ec..71ffe55dc4a 100644 --- a/3rdparty/bgfx/examples/21-deferred/deferred.cpp +++ b/3rdparty/bgfx/examples/21-deferred/deferred.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 Branimir Karadzic. All rights reserved. + * Copyright 2011-2017 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -159,7 +159,7 @@ static const uint16_t s_cubeIndices[36] = void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) { - if (bgfx::checkAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_decl) ) + if (3 == bgfx::getAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_decl) ) { bgfx::TransientVertexBuffer vb; bgfx::allocTransientVertexBuffer(&vb, 3, PosTexCoord0Vertex::ms_decl); @@ -578,7 +578,7 @@ class ExampleDeferred : public entry::AppI lightPosRadius.m_radius = 2.0f; Aabb aabb; - sphereToAabb(aabb, lightPosRadius); + toAabb(aabb, lightPosRadius); float box[8][3] = { @@ -686,8 +686,8 @@ class ExampleDeferred : public entry::AppI bgfx::setUniform(u_mtx, invMvp); const uint16_t scissorHeight = uint16_t(y1-y0); bgfx::setScissor(uint16_t(x0), m_height-scissorHeight-uint16_t(y0), uint16_t(x1-x0), scissorHeight); - bgfx::setTexture(0, s_normal, m_gbuffer, 1); - bgfx::setTexture(1, s_depth, m_gbuffer, 2); + bgfx::setTexture(0, s_normal, bgfx::getTexture(m_gbuffer, 1) ); + bgfx::setTexture(1, s_depth, bgfx::getTexture(m_gbuffer, 2) ); bgfx::setState(0 | BGFX_STATE_RGB_WRITE | BGFX_STATE_ALPHA_WRITE @@ -699,8 +699,8 @@ class ExampleDeferred : public entry::AppI } // Combine color and light buffers. - bgfx::setTexture(0, s_albedo, m_gbuffer, 0); - bgfx::setTexture(1, s_light, m_lightBuffer, 0); + bgfx::setTexture(0, s_albedo, bgfx::getTexture(m_gbuffer, 0) ); + bgfx::setTexture(1, s_light, bgfx::getTexture(m_lightBuffer, 0) ); bgfx::setState(0 | BGFX_STATE_RGB_WRITE | BGFX_STATE_ALPHA_WRITE |