IMX6U-Game/src/Gfx/Platform/SDLDisplay.h

23 lines
450 B
C++

#pragma once
#include "Display.h"
#include <SDL.h>
namespace Platform
{
class SDLDisplay : public IDisplay
{
private:
SDL_Window* window = nullptr;
SDL_Renderer* renderer = nullptr;
SDL_Texture* texture = nullptr;
int width = 0;
int height = 0;
public:
bool init(int w, int h) override;
void present(const Core::FrameBuffer* framebuffer) override;
void poll_events(bool& should_quit) override;
void shutdown() override;
};
}