mirror of
https://github.com/holub/mame
synced 2025-06-06 04:43:45 +03:00
render/bgfx: Fixed Linux build.
This commit is contained in:
parent
eaa43879cd
commit
57d9938c7a
@ -11,12 +11,16 @@
|
|||||||
|
|
||||||
#include "valueuniform.h"
|
#include "valueuniform.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
bgfx_value_uniform::bgfx_value_uniform(bgfx_uniform* uniform, float* values, const int count)
|
|
||||||
|
bgfx_value_uniform::bgfx_value_uniform(bgfx_uniform* uniform, const float* values, const int count)
|
||||||
: bgfx_entry_uniform(uniform)
|
: bgfx_entry_uniform(uniform)
|
||||||
, m_count(count)
|
, m_count(count)
|
||||||
{
|
{
|
||||||
memcpy(m_values, values, sizeof(float) * count);
|
assert(count <= std::size(m_values));
|
||||||
|
std::copy_n(values, count, m_values);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bgfx_value_uniform::bind()
|
void bgfx_value_uniform::bind()
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
class bgfx_value_uniform : public bgfx_entry_uniform
|
class bgfx_value_uniform : public bgfx_entry_uniform
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bgfx_value_uniform(bgfx_uniform* uniform, float* values, const int count);
|
bgfx_value_uniform(bgfx_uniform* uniform, const float* values, const int count);
|
||||||
|
|
||||||
virtual void bind() override;
|
virtual void bind() override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user