aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

This commit is contained in:
2024-07-11 12:40:06 -04:00
parent 736478d627
commit abc9a756dd
2 changed files with 19 additions and 31 deletions

6
.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
/.idea
/.cache
/.ccls-cache
/compile_commands.json
/cmake-build-debug
/build

View File

@@ -17,60 +17,42 @@
class JUIDevelopmentTestWindow : public ReWindow::RWindow {
public:
void initGL() {
gladLoadGL();
JGL::Update(getSize());
JGL::InitTextEngine();
glClearColor(0.f, 0.f, 0.f, 0.f);
}
JUIDevelopmentTestWindow(const std::string& title, int w, int h) : ReWindow::RWindow(title, w, h) {}
void OnRefresh(float elapsed) override {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
JGL::Update(getSize());
JGL::J2D::Begin();
JGL::J2D::FillRect(JGL::Color3(255,0,0), {0,0}, {50, 50});
JGL::J2D::End();
glSwapBuffers();
}
bool OnResizeRequest(const ReWindow::WindowResizeRequestEvent &e) override {
}
//bool OnResizeRequest(const ReWindow::WindowResizeRequestEvent &e) override {}
JUIDevelopmentTestWindow() : ReWindow::RWindow() {}
};
int main()
{
auto* window = new JUIDevelopmentTestWindow("Test Window", 600, 480);
window->setRenderer(RenderingAPI::OPENGL);
window->Open();
gladLoadGL();
JGL::InitTextEngine();
glClearColor(0.f, 0.f, 0.f, 0.f);
glViewport(0,0,600,480);
window->initGL();
window->setFullscreen(false);
window->setVsyncEnabled(false);
window->setResizable(true);
while (window->isAlive()) {
window->pollEvents();
window->refresh();
window->glSwapBuffers();
}
std::cout << "Hello, World!" << std::endl;
return 0;
}