Exceedingly odd build errors fixed
This commit is contained in:
@@ -108,12 +108,18 @@ VertexArray Collision::getDrawable(const Shape& collider) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (const auto* s = dynamic_cast<const Sphere*>(&collider)) {
|
||||
if (const auto* s = dynamic_cast<const Sphere*>(&collider))
|
||||
{
|
||||
VertexArray result = genIcosahedron(s);
|
||||
|
||||
if (s->Radius != 1.0f) //Scale
|
||||
{
|
||||
for (auto& vertex : result.vertices)
|
||||
vertex = Vector3::Normalized(vertex) * s->Radius;
|
||||
{
|
||||
// TODO: change to Normalized() with J3ML 2.2
|
||||
vertex = vertex.Normalized() * s->Radius;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& v : result.vertices) //Translate
|
||||
v += s->Position;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
#include <Redacted3D/engine/engine.h>
|
||||
#include <Redacted3D/engine/utils/instanceOf.h>
|
||||
#include <Redacted3D/types/entity/camera.h>
|
||||
#include <JGL/JGL.h>
|
||||
#include <JGL/Colors.h>
|
||||
@@ -54,7 +55,6 @@ void outputErrorCode() {
|
||||
break;
|
||||
case ENGINE_ERROR_CODE::TEXTURE_ERASED_WHILE_IN_USE:
|
||||
std::cerr << "TEXTURE ERASED WHILE IN USE" << std::endl;
|
||||
break;
|
||||
case ENGINE_ERROR_CODE::VERTEX_ARRAY_ERASED_WHILE_IN_USE:
|
||||
std::cerr << "VERTEX ARRAY ERASED WHILE IN USE" << std::endl;
|
||||
break;
|
||||
@@ -82,7 +82,6 @@ void Engine::initGL() const {
|
||||
glDepthFunc(GL_LESS);
|
||||
glDepthMask(GL_TRUE);
|
||||
glEnable(GL_CULL_FACE);
|
||||
glEnable(GL_LIGHTING);
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
}
|
||||
|
||||
@@ -123,11 +122,9 @@ void Engine::initGL() const {
|
||||
exit(0);
|
||||
|
||||
//TODO JGL rendering pass.
|
||||
/*
|
||||
glDisable(GL_LIGHTING);
|
||||
JGL::J3D::DrawString3D(JGL::Colors::White, std::to_string((int) framerate()), {0.5f, 0, 0.5f}, 0.0125f);
|
||||
glEnable(GL_LIGHTING);
|
||||
*/
|
||||
}
|
||||
|
||||
void Engine::postRender()
|
||||
@@ -274,5 +271,6 @@ void Engine::takeScreenshot() {
|
||||
file.write((char*)"\0", 1);
|
||||
}
|
||||
}
|
||||
|
||||
file.close();
|
||||
}
|
Reference in New Issue
Block a user