mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-20 05:43:12 +01:00
Added uniform frequency. (#3485)
* Added uniform frequency. * Cleanup. * Cleanup.
This commit is contained in:
committed by
GitHub
parent
8a9bc3ed65
commit
35911ac2d9
@@ -3674,6 +3674,8 @@ namespace bgfx { namespace gl
|
||||
|
||||
void submitBlit(BlitState& _bs, uint16_t _view);
|
||||
|
||||
void submitUniformCache(UniformCacheState& _ucs, uint16_t _view);
|
||||
|
||||
void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) override;
|
||||
|
||||
void blitSetup(TextVideoMemBlitter& _blitter) override
|
||||
@@ -7463,6 +7465,16 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
}
|
||||
|
||||
void RendererContextGL::submitUniformCache(UniformCacheState& _ucs, uint16_t _view)
|
||||
{
|
||||
while (_ucs.hasItem(_view) )
|
||||
{
|
||||
const UniformCacheItem& uci = _ucs.advance();
|
||||
|
||||
bx::memCopy(m_uniforms[uci.m_handle], &_ucs.m_frame->m_uniformCacheFrame.m_data[uci.m_offset], uci.m_size);
|
||||
}
|
||||
}
|
||||
|
||||
void RendererContextGL::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter)
|
||||
{
|
||||
if (_render->m_capture)
|
||||
@@ -7527,6 +7539,7 @@ namespace bgfx { namespace gl
|
||||
uint16_t view = UINT16_MAX;
|
||||
FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS };
|
||||
|
||||
UniformCacheState ucs(_render);
|
||||
BlitState bs(_render);
|
||||
|
||||
int32_t resolutionHeight = _render->m_resolution.height;
|
||||
@@ -7649,6 +7662,7 @@ namespace bgfx { namespace gl
|
||||
GL_CHECK(glEnable(GL_CULL_FACE) );
|
||||
GL_CHECK(glDisable(GL_BLEND) );
|
||||
|
||||
submitUniformCache(ucs, view);
|
||||
submitBlit(bs, view);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user