A Graphical Engine written in C++ for abstract OpenGL

Lukeda Graphical Engine (LGE)

It's a simple graphical library, written in C++ with OpenGL(GLEW) and GLFW

Start as a fork from my other project named "OpenGL", it grow up when I needed for my class "Geometrical Algorithms", and then I decided created this library

Bugs && Ideias

  • Leak memory probably comming from m_VAO from Grometry.h

Implementation

Provides an abstraction for creating windows, GUI, and render uneder LGE namespace. It's necessary create a class inheriting from LGE::Scene_t, overloading OnUpdate(), OnRender() and OnImGui() methods. In main, creates a LGE::Application object, register the Scenes you want with App.RegisterClass<Scene>(name). And then run the Application App.run();

#include "Application.h"

class My_Scene : public LGE::Scene_t
{
private:
    std::unique_ptr<Shader> m_Shader;
    std::unique_ptr<SPoint> m_SPoints;
    glm::mat4 m_Proj;

    std::vector<Point2D> m_PointsIn;


public:
    QuadTree(int argc = 0, char** argv = nullptr)
        : m_Proj(glm::ortho(0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, -1.0f, 1.0f))
    {
        m_Shader = std::make_unique<Shader>("res/shaders/Basic_2D.shader");
        m_Shader->Bind();

        for (int i = 0; i < 10; ++i)
        {
            Point2D p;
            p.Position =
            {
                LGE::rand(0.0f, SCREEN_WIDTH),
                LGE::rand(0.0f, SCREEN_HEIGHT)
            };
            m_PointsIn.push_back(p);
        }

        m_SPoints = std::make_unique<SPoint>(&m_PointsIn[0], m_PointsIn.size());

    }

    ~QuadTree()
    {
        m_Shader->Unbind();
    }

    void OnUpdate(float deltaTime) override
    {
        
    }

    void OnRender() override
    {
        // m_Shader->Bind();
        m_Shader->SetUniformMat4f("u_MVP", m_Proj);
        m_SPoints->Draw();
    }

    void OnImGuiRender() override 
    {

    }

};

int main(int argc, char** argv)
{
    LGE::Application Demo;
    Demo.RegisterScene<My_Scene>("Scene name");
    Demo.Run();

    return 0;
}

TODO:

  • Finish Line and Polygon Modes
  • 2D Camera
  • 3D Camera
  • Abstract Shapes and Shader into Application:
    • In the Scene just call DrawSomething, who handle Shader and etc It's the own Application
  • LGE compile to static lib and it's linked in other projects

DONE:

  • Library
  • OpenGL Abstraction:
    • Vertex Array Objects
    • Vertex Buffer
    • Index Buffer
    • Layouts
    • Shaders
  • Scenes Layout
  • Geometry:
    • Points
    • Lines
    • Polygons
  • Application Architecture
Owner
Similar Resources

Simple font renderer library written in Opengl 3.3 using stb_truetype.h to load a packed bitmap into texture of a .ttf font.

Simple font renderer library written in Opengl 3.3 using stb_truetype.h to load a packed bitmap into texture of a .ttf font.

mv_easy_font Simple font renderer library written in Opengl 3.3 using stb_truetype.h to load a packed bitmap into texture of a .ttf font. Uses instanc

May 13, 2022

Cross-platform sandbox RPG game written in C++ with OpenGL and SDL2.

Cross-platform sandbox RPG game written in C++ with OpenGL and SDL2.

Forradia test Forradia is a cross-platform sandbox survival/RPG game written in C++ with OpenGL and SDL2. The engine loads 3D models in Wavefront-form

Nov 9, 2022

Love 6's Regular Expression Engine. Support Concat/Select/Closure Basic function. Hope u can enjoy this tiny engine :)

Love 6's Regular Expression Engine. Support Concat/Select/Closure Basic function. Hope u can enjoy this tiny engine :)

Regex_Engine Love 6's Blog Website: https://love6.blog.csdn.net/ Love 6's Regular Expression Engine Hope u can love my tiny regex engine :) maybe a fe

May 24, 2022

Sword Engine is a fork of Psych Engine that plans on adding more features and quality of life improvements.

Sword Engine is a fork of Psych Engine that plans on adding more features and quality of life improvements.

⚠️ WARNING: This README is currently incomplete, This warning will be removed once it's complete. Friday Night Funkin' - Sword Engine Sword Engine is

Jul 9, 2022

Two Tribes Engine; the engine which we used to create Toki Tori 2+ and RIVE with

Two Tribes Engine We, Two Tribes, have used this engine for over a decade. It started with early development on the Nintendo DS and ultimately resulte

Nov 28, 2022

ASMotor is a portable and generic assembler engine and development system written in ANSI C99

ASMotor is a portable and generic assembler engine and development system written in ANSI C99 and licensed under the GNU Public License v3. The package consists of the assembler, the librarian and the linker. It can be used as either a cross or native development system.

Nov 18, 2022

this is my simple voxel engine, appart from librairies like glad it is entierly written in C++ and GLSL

simple-voxel-raycaster this is my simple voxel engine, appart from librairies like glad it is entierly written in C++ and GLSL here is a gif: https://

Sep 26, 2022

My first Real-Time 3D Game Engine learning project written in C++.

EyeEngine-Cpp FOA, sry for my poor English. What is Eye Engine? Eye Engine is my first Real-Time 3D Game Engine learning project. There are two editio

Apr 6, 2022

MicroPather is a path finder and A* solver (astar or a-star) written in platform independent C++ that can be easily integrated into existing code. MicroPather focuses on being a path finding engine for video games but is a generic A* solver.

MicroPather MicroPather is a path finder and A* solver (astar or a-star) written in platform independent C++ that can be easily integrated into existi

Nov 16, 2022
Comments
  • Memory Leak

    Memory Leak

    Tem algum leak de memória, minha melhor estimativa é que é o dobro do que deveria + um uso excessivo. Ex: tinha que ocupar 22Mb na CPU + na GPU (22Mb), total deveriam ser 44Mb, mas o total está em 88Mb+

Related tags
Step-by-step guide through the abstract and complex universe of Fragment Shaders.

The Book of Shaders by Patricio Gonzalez Vivo and Jen Lowe This is a gentle step-by-step guide through the abstract and complex universe of Fragment S

Nov 30, 2022
This is a helper library to abstract away interfacing with floppy disk drives in a cross-platform and open source library.
This is a helper library to abstract away interfacing with floppy disk drives in a cross-platform and open source library.

Adafruit Floppy This is a helper library to abstract away interfacing with floppy disk drives in a cross-platform and open source library. Adafruit Fl

Nov 14, 2022
Several GX2 test programs to compare it with OpenGL. (With additional GLFW+OpenGL implementation provided)

GX2-Tests Provided are GX2 test programs and samples for comparison with OpenGL and with additional GLFW+OpenGL implementation for test on PC. These s

Nov 15, 2021
C++/openGL/Vulkan 3D engine

Deus In Machina engine C++/GL/Vulkan 3D graphic engine This project should be an abstraction of the engine that I am using on BOC: Birth of Cultures,

May 19, 2022
A graphical interface to set options on devices with coreboot firmware
A graphical interface to set options on devices with coreboot firmware

Corevantage A graphical interface to set options on devices with coreboot firmware. Introduction This is a utility that allows users to view and modif

Sep 22, 2022
SerenityOS - Graphical Unix-like operating system for x86 computers. 🐞
 SerenityOS - Graphical Unix-like operating system for x86 computers. 🐞

SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.

Dec 4, 2022
Remote Arduino Uno-based TFT graphical display for VSR Mini Mega Alternator Regulator

VSMMAR_Remote_Display Remote Arduino Uno-based TFT graphical display for VSR Mini Mega Alternator Regulator This project is an optional accessory for

Nov 6, 2021
The foundation for many embedded graphical display implementations

Ubuntu Frame Description The foundation for many embedded graphical display implementations. ubuntu-frame is a simple fullscreen shell (based on Wayla

Nov 22, 2022
Legacy stepper motor analyzer - A DYI minimalist hardware stepper motor analyzer with graphical touch screen.
Legacy stepper motor analyzer - A DYI minimalist hardware stepper motor analyzer with graphical touch screen.

Simple Stepper Motor Analyzer NOTE: This is the legacy STM32 based design which was replaced by the single board, Raspberry Pi Pico design at https://

Oct 23, 2022
A graphical application to enhance user experience with Ubuntu on WSL during the distro installation process.

Ubuntu WSL Splash TODO: Place a CI badge here. TODO: Put a nice screenshot here when we get one. A graphical application to enhance user experience wi

Oct 17, 2022