Idk like make the viewport work maybe?
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 4m29s
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 4m29s
This commit is contained in:
@@ -27,7 +27,7 @@ CPMAddPackage(
|
||||
|
||||
CPMAddPackage(
|
||||
NAME ReWindow
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-3.zip
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-9.zip
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
|
5
main.cpp
5
main.cpp
@@ -99,6 +99,7 @@ public:
|
||||
|
||||
Vector3 textAngle = {0,0,0};
|
||||
void display() {
|
||||
JGL::Update(getSize());
|
||||
textAngle.y += 2.0f;
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
@@ -147,7 +148,7 @@ public:
|
||||
glSwapBuffers();
|
||||
}
|
||||
|
||||
bool OnResizeRequest(const ReWindow::WindowResizeRequestEvent& e) override {return true;}
|
||||
bool OnResizeRequest(const ReWindow::WindowResizeRequestEvent& e) override {/* glViewport(0, 0, e.Size.x, e.Size.y); std::cout << e.Size.x;*/ return true;}
|
||||
JGLDemoWindow() : ReWindow::RWindow() {}
|
||||
JGLDemoWindow(const std::string& title, int width, int height) : ReWindow::RWindow(title, width, height){}
|
||||
};
|
||||
@@ -157,7 +158,7 @@ int main(int argc, char** argv) {
|
||||
window->setRenderer(RenderingAPI::OPENGL);
|
||||
window->Open();
|
||||
window->initGL();
|
||||
window->setResizable(false);
|
||||
window->setResizable(true);
|
||||
|
||||
while (window->isAlive()) {
|
||||
window->pollEvents();
|
||||
|
@@ -30,14 +30,14 @@ namespace JGL {
|
||||
|
||||
|
||||
void J2D::Begin() {
|
||||
glViewport(0, 0, wS.x, wS.y);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(0, wS.x, wS.y, 0, -1, 1);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
||||
|
||||
//Get what the draw color was before we did anything.
|
||||
glGetFloatv(GL_CURRENT_COLOR, oldColor);
|
||||
glColor4f(baseColor[0], baseColor[1], baseColor[2], baseColor[3]);
|
||||
|
Reference in New Issue
Block a user