Fix point sso rendering on macOS
parent
9e956abe3d
commit
c8338ea91f
|
@ -1806,12 +1806,18 @@ void renderPoint(const Renderer &renderer,
|
|||
glEnable(GL_POINT_SPRITE);
|
||||
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
||||
#endif
|
||||
glVertexAttrib3fv(CelestiaGLProgram::VertexCoordAttributeIndex, position.data());
|
||||
// Workaround for macOS to pass a single vertex coord
|
||||
glEnableVertexAttribArray(CelestiaGLProgram::VertexCoordAttributeIndex);
|
||||
glVertexAttribPointer(CelestiaGLProgram::VertexCoordAttributeIndex,
|
||||
3, GL_FLOAT, GL_FALSE, sizeof(position), position.data());
|
||||
|
||||
glVertexAttrib(CelestiaGLProgram::ColorAttributeIndex, color);
|
||||
glVertexAttrib1f(CelestiaGLProgram::PointSizeAttributeIndex, useSprite ? size : 1.0f);
|
||||
|
||||
glDrawArrays(GL_POINTS, 0, 1);
|
||||
|
||||
glDisableVertexAttribArray(CelestiaGLProgram::VertexCoordAttributeIndex);
|
||||
|
||||
#ifndef GL_ES
|
||||
if (useSprite)
|
||||
glDisable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
||||
|
|
Loading…
Reference in New Issue