Revert "Merge remote-tracking branch 'origin/master'"
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m20s

This reverts commit 240fa7ddbc, reversing
changes made to d89f79e70e.
This commit is contained in:
2024-08-05 15:04:22 -04:00
parent 240fa7ddbc
commit 2a1085df2d
5 changed files with 19 additions and 45 deletions

View File

@@ -71,8 +71,6 @@ private:
Texture* image;
Texture* reloaded_image;
//The Re3D style base projection.
std::vector<GLfloat> perspective(float fov, float aspect, float nearPlane, float farPlane) {
std::vector<float> result(16);
@@ -155,15 +153,10 @@ public:
glDepthFunc(GL_LESS);
glDepthMask(GL_TRUE);
image = new Texture("assets/sprites/Re3D.png", TextureFilteringMode::BILINEAR);
auto* software_texture = new SoftwareTexture(image->GetSoftwareTexture());
reloaded_image = new Texture(software_texture, TextureFilteringMode::BILINEAR, TextureWrappingMode::CLAMP_TO_EDGE);
delete software_texture;
}
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);
@@ -182,7 +175,7 @@ public:
J2D::Begin();
J2D::FillQuad(Color4(Colors::Red), {500, 52}, {500, 152}, {600, 152}, {600, 52});
J2D::FillRect(Colors::Blue, {0,52}, {100,100});
J2D::DrawSprite(*reloaded_image, {200, 252}, {0.5, 0.5}, {2, 1});
J2D::DrawSprite(*image, {200, 252}, {0.5, 0.5}, {2, 1});
J2D::FillRect(Colors::Pinks::HotPink, {68, 120}, {32, 32});
J2D::FillGradientRect(Colors::Red, Colors::Blue, Gradient::DiagonalBottomLeft, {100,52}, {100,100});
J2D::FillRoundedRect(Colors::Red, {200, 52}, {100, 100}, 8, 8);
@@ -229,7 +222,6 @@ public:
glSwapBuffers();
}
bool OnResizeRequest(const ReWindow::WindowResizeRequestEvent& e) override {/* glViewport(0, 0, e.Size.x, e.Size.y); std::cout << e.Size.x;*/ return true;}
void OnMouseButtonDown(const ReWindow::WindowEvents::MouseButtonDownEvent & ev) override
{
@@ -249,7 +241,7 @@ public:
d.Release();
}
bool OnResizeRequest(const ReWindow::WindowResizeRequestEvent& e) override {return true;}
JGLDemoWindow() : ReWindow::RWindow() {}
JGLDemoWindow(const std::string& title, int width, int height) : ReWindow::RWindow(title, width, height){}
};
@@ -259,7 +251,7 @@ int main(int argc, char** argv) {
window->setRenderer(RenderingAPI::OPENGL);
window->Open();
window->initGL();
window->setResizable(true);
window->setResizable(false);
while (window->isAlive()) {
window->pollEvents();