2D Text Context!!!

This commit is contained in:
2024-07-06 23:50:30 -04:00
parent 463895a44f
commit c2077481c3

View File

@@ -47,6 +47,26 @@ void FreeCam::jglRenderPass() {
//JGL::J3D::DrawString3D(JGL::Colors::White, "Framecount: " + std::to_string(engine->frameCount), {0,0.25,0}, -0.005125, 48, Fonts::ModeSeven);
//JGL::J3D::DrawString3D(JGL::Colors::White, "Frame dT: " + std::to_string(engine->frameDelta), {0,0.5,0}, -0.005125, 48, Fonts::ModeSeven);
JGL::J2D::DrawString2D(JGL::Colors::White, "FPS: " + std::to_string((int) engine->framerate()), 0, -1, -0.005125, 48, Fonts::ModeSeven);
JGL::J2D::DrawString2D(JGL::Colors::White, "Framecount: " + std::to_string(engine->frameCount), 0, 0, -0.000125,8192, Fonts::Jupiteroid);
// HOLY SHYT!!!!
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(0.0f, engine->window->getWidth(), engine->window->getHeight(), 0.0f, -1.f, 1.f);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
JGL::J2D::DrawString2D(JGL::Colors::White, "FPS: " + std::to_string((int) engine->framerate()), 200, 50, 1, 16, Fonts::ModeSeven);
JGL::J2D::DrawString2D(JGL::Colors::White, "Framecount: " + std::to_string(engine->frameCount), 200, 75, 1,16, Fonts::Jupiteroid);
JGL::J2D::FillRect2D({255,0,0}, {25.f, 25.f}, {50, 50});
//glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
}