2019-08-31 01:46:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
2022-10-28 20:58:52 +00:00
|
|
|
#include <SDL.h>
|
|
|
|
#include <glad/gl.h>
|
2019-08-31 01:46:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Platform
|
|
|
|
{
|
2022-10-28 20:58:52 +00:00
|
|
|
friend class Imgui;
|
|
|
|
|
2019-08-31 01:46:28 +00:00
|
|
|
public:
|
|
|
|
Platform(char const* title, int windowWidth, int windowHeight, int textureWidth, int textureHeight);
|
|
|
|
~Platform();
|
|
|
|
void Update(void const* buffer, int pitch);
|
|
|
|
bool ProcessInput(uint8_t* keys);
|
|
|
|
|
|
|
|
private:
|
|
|
|
SDL_Window* window{};
|
2022-10-28 20:58:52 +00:00
|
|
|
SDL_GLContext gl_context{};
|
|
|
|
GLuint framebuffer_texture;
|
2019-08-31 01:46:28 +00:00
|
|
|
SDL_Renderer* renderer{};
|
|
|
|
SDL_Texture* texture{};
|
|
|
|
};
|