Wondows :(
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 5m25s
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 5m25s
This commit is contained in:
@@ -22,12 +22,12 @@ CPMAddPackage(
|
||||
|
||||
CPMAddPackage(
|
||||
NAME J3ML
|
||||
URL https://git.redacted.cc/josh/j3ml/archive/Release-2.4.zip
|
||||
URL https://git.redacted.cc/josh/j3ml/archive/Release-3.0.zip
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME ReWindow
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-10.zip
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-11.zip
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
|
1
main.cpp
1
main.cpp
@@ -249,6 +249,7 @@ int main(int argc, char** argv) {
|
||||
window->Open();
|
||||
window->initGL();
|
||||
window->setResizable(true);
|
||||
window->setVsyncEnabled(true);
|
||||
|
||||
while (window->isAlive()) {
|
||||
window->pollEvents();
|
||||
|
12
src/JGL.cpp
12
src/JGL.cpp
@@ -398,11 +398,11 @@ namespace JGL {
|
||||
if (!inJ2D)
|
||||
ERROR("Attempt to Render J2D element before J2D begin.")
|
||||
|
||||
float step = (2.f * M_PI) / (float) subdivisions;
|
||||
float step = (2.f * Math::Pi) / (float) subdivisions;
|
||||
std::vector<Vector2> vertices{};
|
||||
GLfloat angle, x, y;
|
||||
|
||||
for (angle = 0.0f; angle < (2.f * M_PI); angle += step) {
|
||||
for (angle = 0.0f; angle < (2.f * Math::Pi); angle += step) {
|
||||
x = radius * std::sin(angle) + center.x;
|
||||
y = radius * std::cos(angle) + center.y;
|
||||
vertices.emplace_back(x,y);
|
||||
@@ -426,11 +426,11 @@ namespace JGL {
|
||||
if (!inJ2D)
|
||||
ERROR("Attempt to Render J2D element before J2D begin.")
|
||||
|
||||
float step = (2.f * M_PI) / (float) subdivisions;;
|
||||
std::vector<Vector2> vertices{};
|
||||
GLfloat angle, x, y;
|
||||
float step = (2.f * Math::Pi) / (float) subdivisions;
|
||||
std::vector<Vector2> vertices{};
|
||||
|
||||
for (angle = 0.0f; angle < (2.f * M_PI); angle += step)
|
||||
for (angle = 0.0f; angle < (2.f * Math::Pi); angle += step)
|
||||
x = radius * sin(angle) + center.x,
|
||||
y = radius * cos(angle) + center.y,
|
||||
vertices.push_back({x, y});
|
||||
@@ -532,7 +532,7 @@ namespace JGL {
|
||||
//The 3D projection.
|
||||
std::vector<GLfloat> perspective(float fov, float aspect, float nearPlane, float farPlane) {
|
||||
std::vector<float> result(16);
|
||||
float f = 1.0f / tan(fov * 0.5f * M_PI / 180.0f);
|
||||
float f = 1.0f / tan(fov * 0.5f * Math::Pi / 180.0f);
|
||||
result[0] = f / aspect;
|
||||
result[5] = f;
|
||||
result[10] = (farPlane + nearPlane) / (nearPlane - farPlane);
|
||||
|
@@ -5,18 +5,19 @@
|
||||
#include <glad/glad.h>
|
||||
|
||||
#if __linux__
|
||||
#include <freetype2/ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_OUTLINE_H
|
||||
#include <JGL/FontCache.h>
|
||||
|
||||
#include <freetype2/ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_OUTLINE_H
|
||||
#endif
|
||||
|
||||
#if _WIN32
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_OUTLINE_H
|
||||
#endif
|
||||
|
||||
#include <JGL/Font.h>
|
||||
#include <JGL/FontCache.h>
|
||||
|
||||
namespace JGL::Detail
|
||||
{
|
||||
@@ -64,7 +65,7 @@ namespace JGL
|
||||
throw new std::runtime_error("Error::FREETYPE: FT_Library was not initialized before attempting to load a font!");
|
||||
|
||||
Font font;
|
||||
if (FT_New_Face(Detail::ft, path.c_str(), 0, &face)) {
|
||||
if (FT_New_Face(Detail::ft, path.string().c_str(), 0, &face)) {
|
||||
std::cout << "Error::FREETYPE: Failed to load font!" << std::endl;
|
||||
throw new std::runtime_error("Error::FREETYPE: Failed to load font!");
|
||||
//return -1;
|
||||
|
@@ -5,16 +5,17 @@
|
||||
#include <freetype2/ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_OUTLINE_H
|
||||
#include "jlog/jlog.hpp"
|
||||
|
||||
#endif
|
||||
#if _WIN32
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_OUTLINE_H
|
||||
#endif
|
||||
|
||||
#include <JGL/Font.h>
|
||||
#include <JGL/FontCache.h>
|
||||
#include <jlog/jlog.hpp>
|
||||
|
||||
namespace JGL {
|
||||
|
||||
|
Reference in New Issue
Block a user