ported the University CGI demo from WINDOWS + GLUT + GLEW + GLU + OpenGL 4 to LINUX WAYLAND + EGL + GLES 2 with minimal cuts

This commit is contained in:
beno
2025-07-03 01:26:25 +02:00
commit 6c125fb35e
85 changed files with 91688 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#pragma once
#include <string>
#include <regex>
#include <iostream>
#include "./Curve.hpp"
#include "Bezier.hpp"
#include "NURBS.hpp"
class CurvesLoader {
static string currentCurveType;
static vector<glm::vec3>* pointsBuffer;
static vector<NURBS*> NURBSes;
static vector<Bezier3Segments*> beziers;
static unsigned int NURBSOrder;
static NURBSType NURBS_TYPE;
static vector<float>* NURBSWeights;
static char lineHeader[128];
static char* res;
static FILE* file;
static std::smatch pieces;
static void beginCurve(string str, std::smatch pieces, std::regex regex);
static NURBS* BasicNURBS();
static NURBS* ClampedNURBS();
static NURBS* CyclicNURBS();
static void closeNURBS();
static void closeBezier();
static void closePendingCurve();
static void parseVertexData(string str);
public:
static bool loadCurves(std::string path, vector<Curve*>& curves);
};