mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
Unimpl gl
This commit is contained in:
parent
26114b9a59
commit
f62bd09fb2
22 changed files with 547 additions and 932 deletions
51
src/window/detail/window_sdl.hpp
Normal file
51
src/window/detail/window_sdl.hpp
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
#include <SDL3/SDL_video.h>
|
||||
#include "window/window.hpp"
|
||||
|
||||
struct SDL_Window;
|
||||
|
||||
class window_sdl final : public Window {
|
||||
public:
|
||||
window_sdl(DisplaySettings *settings, std::string title) noexcept;
|
||||
~window_sdl();
|
||||
window_sdl(const window_sdl &) = delete;
|
||||
window_sdl(window_sdl &&) = default;
|
||||
window_sdl &operator=(const window_sdl &) = delete;
|
||||
window_sdl &operator=(window_sdl &&) = default;
|
||||
|
||||
void swapBuffers() const noexcept override;
|
||||
bool isMaximized() const override;
|
||||
bool isFocused() const override;
|
||||
bool isIconified() const override;
|
||||
|
||||
bool isShouldClose() const override;
|
||||
void setShouldClose(bool flag) override;
|
||||
|
||||
void setCursor(CursorShape shape) override;
|
||||
void toggleFullscreen() override;
|
||||
bool isFullscreen() const override;
|
||||
|
||||
void setIcon(const ImageData *image) override;
|
||||
|
||||
void pushScissor(glm::vec4 area) override;
|
||||
void popScissor() override;
|
||||
void resetScissor() override;
|
||||
|
||||
double time() override;
|
||||
|
||||
void setFramerate(int framerate) override;
|
||||
|
||||
// todo: move somewhere
|
||||
std::unique_ptr<ImageData> takeScreenshot() override;
|
||||
|
||||
[[nodiscard]] bool isValid() const override;
|
||||
private:
|
||||
bool isSuccessfull = true;
|
||||
bool maximized = false;
|
||||
bool focused = false;
|
||||
bool iconified = false;
|
||||
bool toClose = false;
|
||||
bool fullscreen = false;
|
||||
|
||||
SDL_Window *window;
|
||||
SDL_GLContext context;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue