lmgl 1.0.0
A lightweight OpenGL graphics engine library written in C++
Loading...
Searching...
No Matches
engine.hpp File Reference

Declaration of the Engine class for managing the main application loop using GLFW. More...

#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <functional>
#include <string>

Go to the source code of this file.

Classes

class  lmgl::core::Engine
 A singleton class that manages the main application loop using GLFW. More...
 

Namespaces

namespace  lmgl
 Forward declarations for Assimp Material structure.
 
namespace  core
 Core components of the LMGL project.
 

Enumerations

enum class  lmgl::core::Key {
  Key0 = 48 , Key1 = 49 , Key2 = 50 , Key3 = 51 ,
  Key4 = 52 , Key5 = 53 , Key6 = 54 , Key7 = 55 ,
  Key8 = 56 , Key9 = 57 , A = 65 , B = 66 ,
  C = 67 , D = 68 , E = 69 , F = 70 ,
  G = 71 , H = 72 , I = 73 , J = 74 ,
  K = 75 , L = 76 , M = 77 , N = 78 ,
  O = 79 , P = 80 , Q = 81 , R = 82 ,
  S = 83 , T = 84 , U = 85 , V = 86 ,
  W = 87 , X = 88 , Y = 89 , Z = 90 ,
  Space = 32 , Esc = 256 , Enter = 257 , Tab = 258 ,
  Backspace = 259 , Right = 262 , Left = 263 , Down = 264 ,
  Up = 265 , F1 = 290 , F2 = 291 , F3 = 292 ,
  F4 = 293 , F5 = 294 , F6 = 295 , F7 = 296 ,
  F8 = 297 , F9 = 298 , F10 = 299 , F11 = 300 ,
  F12 = 301 , LShift = 340 , LCtrl = 341 , LAlt = 342 ,
  RShift = 344 , RCtrl = 345 , RAlt = 346
}
 Input key codes.
 
enum class  lmgl::core::MouseButton { Left = 0 , Right = 1 , Middle = 2 }
 Mouse button codes.
 
enum class  lmgl::core::InputState { Released = 0 , Pressed = 1 , Repeat = 2 }
 Key/button states.
 
enum class  lmgl::core::CursorMode { Normal , Hidden , Disabled }
 Cursor mode. More...
 
enum class  lmgl::core::VSyncMode { Off = 0 , On = 1 , Adaptive = -1 }
 VSync mode. More...
 

Detailed Description

Declaration of the Engine class for managing the main application loop using GLFW.

Author
Luca Mazza

This file contains the declaration of the Engine class, which is responsible for initializing the GLFW window, running the main loop, and handling delta time calculations. The Engine class is implemented as a singleton to ensure that only one instance exists throughout the application lifecycle.

Enumeration Type Documentation

◆ CursorMode

enum class lmgl::core::CursorMode
strong

Cursor mode.

Enumerator
Normal 

Cursor is visible and behaves normally.

Hidden 

Cursor is invisible but can still move freely.

Disabled 

Cursor is locked to window center (FPS mode)

◆ VSyncMode

enum class lmgl::core::VSyncMode
strong

VSync mode.

Enumerator
Off 

Disabled VSync - unlimited FPS.

On 

Standard VSync - Locks to monitor refresh rate.

Adaptive 

Adaptive VSync - Only when FPS exceeds refresh rate.