Files
untitled-game/inc/engine/opengl.hpp
2025-11-25 16:15:40 +00:00

33 lines
565 B
C++

#ifndef OPENGL_HPP
#define OPENGL_HPP
// Includes
#include <SDL3/SDL_opengl.h>
#include "engine/sdl.hpp"
#include "engine/buffers.hpp"
#include "engine/shaders.hpp"
#include "engine/camera.hpp"
#include "engine/textures.hpp"
// OpenGL Context Class
class OpenGLContext {
public:
OpenGLContext(SDLWindow& window);
~OpenGLContext();
bool isInitialized() const;
void makeCurrent();
void swapBuffers();
float getFrameTime();
private:
SDLWindow& window;
SDL_GLContext glContext;
Uint32 lastTime;
float frameTime;
};
#endif