summaryrefslogtreecommitdiff
path: root/graphics.hpp
blob: 98ad848d82885265ad6fea61148aef3f58d802eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* SPDX-License-Identifier: Unlicense
 */

#pragma once

class VDP;

#if defined(HAS_GRAPHICS) && HAS_GRAPHICS == 1
# include "SDL.h"
#endif

class Graphics {
public:
    Graphics();
    ~Graphics();
    bool IsOk() const { return _initialized_ok; }
    void Render(const VDP&);
    void ReRender();

private:
    bool _initialized_ok{};
#if defined(HAS_GRAPHICS) && HAS_GRAPHICS == 1
    SDL_Renderer* _renderer{};
    SDL_Window* _window{};
    SDL_Texture* _render_texture{};
#endif
};