a word
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m47s

This commit is contained in:
2024-10-22 19:03:19 -04:00
parent 4d97c6dead
commit 807eef59bc
2 changed files with 3 additions and 2 deletions

View File

@@ -322,6 +322,7 @@ namespace JGL {
void DrawLine(const Color4& color, const Vector3& A, const Vector3& B, float thickness = 1.f);
/// Render a wireframe sphere.
void WireframeSphere(const Color4& color, const Vector3& position, float radius, unsigned int lats, unsigned int longs, float thickness = 1.f);
void WireframeSphere(const Color4& color, const Sphere& sphere, float thickness = 1.f);
void WireframeIcosphere(const Color4& color, const Vector3& position, float radius, float thickness = 1.f);

View File

@@ -1069,7 +1069,7 @@ namespace JGL {
glColor4ubv(color.ptr());
float r = radius;
std::vector<Vector3> vertices(2 + (lats + 1) * (longs + 1));
std::vector<Vector3> vertices((lats + 1) * (longs + 1));
int index = 0;
for (int i = 0; i <= lats; i++) {
@@ -1097,7 +1097,7 @@ namespace JGL {
glLineWidth(thickness);
glColor4ubv(color.ptr());
glVertexPointer(3, GL_FLOAT, sizeof(Vector3), vertices.data());
glDrawArrays(GL_LINE_LOOP, 0, vertices.size() -1);
glDrawArrays(GL_LINE_LOOP, 0, vertices.size());
glColor4fv(baseColor);
}