VEGA is a modern 2D/3D game engine built with C++ and OpenGL. It is designed with a modular layer-based architecture and a powerful ECS system using entt.
The workspace is divided into several main components:
- VEGA: The core engine library containing the renderer, scene management, ECS, and core utilities.
- VEGA_EDITOR: A built-in editor application for scene manipulation, built using ImGui.
- vendor: Contains third-party dependencies such as
GLFW,Glad,glm,entt,ImGui, andyaml-cpp. - sandbox: A boilerplate project for testing engine features.
| Component | Description |
|---|---|
Core.h |
Macros, logging, and base definitions. |
Application |
Main engine class that handles the main loop, window management, and LayerStack. |
Renderer |
High-level rendering API (Buffers, Shaders, Textures, Framebuffers). Supports 2D and 3D. |
Scene |
ECS-based scene management. Uses entt for entity storage. |
Events |
Event dispatch system for window, keyboard, and mouse events. |
Animation |
Dedicated 2D/Sprite animation system. |
VEGA uses a command-based rendering architecture.
- Platform/OpenGL: Specific implementation for the OpenGL backend.
- RendererAPI: Abstract interface for different rendering backends.
- RenderCommand: Static methods to execute draws and clears.
VEGA supports both CMake and Premake.
- CMake: Recommended for modern IDE integration (VS Code, CLion, Visual Studio).
mkdir build cd build cmake .. - Premake: Traditional workspace generation.
premake5 vs2022
Components are defined as simple structs in VEGA/src/VEGA/Scene/Components.h.
struct MyComponent {
float MyData = 0.0f;
// ...
};Entities are created via the Scene object.
auto entity = m_ActiveScene->CreateEntity("MyEntity");
entity.AddComponent<SpriteRendererComponent>(glm::vec4{1, 0, 0, 1});Inherit from high-level event classes or use the OnEvent function in your Layer.
void MyLayer::OnEvent(VEGA::Event& e) {
EventDispatcher dispatcher(e);
dispatcher.Dispatch<WindowResizeEvent>(BIND_EVENT_FN(MyLayer::OnWindowResize));
}