mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Use sizeof(GLfloat) instead of sizeof(GL_FLOAT)
GL_FLOAT is an enum, with the value 0x1406, while GLFloat is the actual type. Source: https://www.khronos.org/opengl/wiki/OpenGL_Type
This commit is contained in:
parent
b2791fd487
commit
7f4f2c042e
1 changed files with 3 additions and 3 deletions
|
@ -158,7 +158,7 @@ namespace SceneUtil
|
|||
|
||||
static constexpr int queryBlockSize(int sz)
|
||||
{
|
||||
return 3 * osg::Vec4::num_components * sizeof(GL_FLOAT) * sz;
|
||||
return 3 * osg::Vec4::num_components * sizeof(GLfloat) * sz;
|
||||
}
|
||||
|
||||
void setCachedSunPos(const osg::Vec4& pos)
|
||||
|
@ -215,9 +215,9 @@ namespace SceneUtil
|
|||
}
|
||||
|
||||
Offsets(int offsetColors, int offsetPosition, int offsetAttenuationRadius, int stride)
|
||||
: mStride((offsetAttenuationRadius + sizeof(GL_FLOAT) * osg::Vec4::num_components + stride) / 4)
|
||||
: mStride((offsetAttenuationRadius + sizeof(GLfloat) * osg::Vec4::num_components + stride) / 4)
|
||||
{
|
||||
constexpr auto sizeofFloat = sizeof(GL_FLOAT);
|
||||
constexpr auto sizeofFloat = sizeof(GLfloat);
|
||||
const auto diffuseOffset = offsetColors / sizeofFloat;
|
||||
|
||||
mValues[Diffuse] = diffuseOffset;
|
||||
|
|
Loading…
Reference in a new issue