opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
graphics_context.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <future>
8#include <string>
9
10struct SDL_Window;
11
12namespace osc
13{
14 // graphics context
15 //
16 // should be initialized exactly once by the application
18 public:
25
27
30
32 void set_debug_mode(bool);
33
35
36 // Returns a future that asynchronously yields a complete screenshot
37 // of the next frame once it has been rendered.
38 //
39 // - Completion of the future depends on the main thread continuing to
40 // draw/pump stuff, so you can't `get()` this future from the main
41 // thread (it's a deadlock or, at least, an exception, to do so).
43
44 // execute the "swap chain" operation, which makes the current backbuffer the frontbuffer and
45 // the frontbuffer the backbuffer
47
48 // human-readable identifier strings: useful for printouts/debugging
53
54 class Impl;
55 private:
56 // no data - it uses globals (you can only have one of these, globally)
57 };
58}
Definition anti_aliasing_level.h:11
Definition graphics_context.h:17
bool vsync_enabled() const
std::string backend_renderer_string() const
void swap_buffers(SDL_Window &)
void set_vsync_enabled(bool)
GraphicsContext(SDL_Window &)
std::future< Texture2D > request_screenshot()
GraphicsContext(GraphicsContext &&) noexcept=delete
AntiAliasingLevel max_antialiasing_level() const
std::string backend_shading_language_version_string() const
std::string backend_vendor_string() const
std::string backend_version_string() const
void main_window_clear(const Color &)
void set_debug_mode(bool)
bool debug_mode() const
GraphicsContext(const GraphicsContext &)=delete
Definition texture2d.h:22
Definition custom_decoration_generator.h:5
constexpr U to(T &&value)
Definition conversion.h:56