Skip to content

Commit e216470

Browse files
committed
revert "try using a triangle-strip-based mesh to save space and possibly improve performance"
This proves to be a bit less performant, and additionally requires a higher OpenGL version for correct work.
1 parent b877634 commit e216470

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

805 KB
Binary file not shown.

src/core/modules/Planet.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
#include <QVarLengthArray>
6363
#include <QOpenGLBuffer>
6464
#include <QOpenGLContext>
65-
#include <QOpenGLFunctions_3_3_Core>
6665
#include <QOpenGLVertexArrayObject>
6766
#ifdef DEBUG_SHADOWMAP
6867
#include <QOpenGLFramebufferObject>
@@ -5140,13 +5139,7 @@ bool Planet::drawMoon(const StelPainterLight& light, StelPainter& painter)
51405139
gl->glClear(GL_DEPTH_BUFFER_BIT);
51415140

51425141
bindMoonVAO();
5143-
// Use primitive restart if we support it, and accept the artifacts that will appear if we don't
5144-
if (const auto gl33 = StelOpenGL::highGraphicsFunctions())
5145-
{
5146-
GL(gl->glEnable(GL_PRIMITIVE_RESTART));
5147-
GL(gl33->glPrimitiveRestartIndex(UINT_MAX));
5148-
}
5149-
GL(gl->glDrawElements(GL_TRIANGLE_STRIP, model.indexArr.size(), GL_UNSIGNED_INT, reinterpret_cast<void*>(indicesOffset)));
5142+
GL(gl->glDrawElements(GL_TRIANGLES, model.indexArr.size(), GL_UNSIGNED_INT, reinterpret_cast<void*>(indicesOffset)));
51505143
releaseMoonVAO();
51515144

51525145
GL(moonShaderProgram->release());

0 commit comments

Comments
 (0)