mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Added uniform frequency. (#3485)
* Added uniform frequency. * Cleanup. * Cleanup.
This commit is contained in:
committed by
GitHub
parent
8a9bc3ed65
commit
35911ac2d9
@@ -367,7 +367,7 @@ public:
|
||||
s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Sampler);
|
||||
|
||||
// Create time uniform.
|
||||
u_time = bgfx::createUniform("u_time", bgfx::UniformType::Vec4);
|
||||
u_time = bgfx::createUniform("u_time", bgfx::UniformFreq::Frame, bgfx::UniformType::Vec4);
|
||||
|
||||
for(uint32_t ii = 0; ii<BX_COUNTOF( m_textureCube ); ++ii)
|
||||
{
|
||||
@@ -592,7 +592,7 @@ public:
|
||||
|
||||
int64_t now = bx::getHPCounter();
|
||||
float time = (float)( (now - m_timeOffset)/double(bx::getHPFrequency() ) );
|
||||
bgfx::setUniform(u_time, &time);
|
||||
bgfx::setFrameUniform(u_time, &time);
|
||||
|
||||
if (now > m_updateTime)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user