1#ifndef OE_CORE_RENDERER_OPENGL_H
2#define OE_CORE_RENDERER_OPENGL_H
7#include <glue_chan/glue_chan.h>
8#include "../../util/non_copyable.h"
48 void resizeViewport(
const int32_t x,
const int32_t y,
const int32_t width,
const int32_t height);
59 void scissor(uint32_t x, uint32_t y, uint32_t width, uint32_t height);
68 assert(_instance !=
nullptr);
90 return _instance !=
nullptr;
100 return *_context_holder;
110 #ifdef OXYGEN_ENGINE_OPENGL_DEBUG_OUTPUT
111 static void APIENTRY debugCallback(
118 const void* userParam
130 thread_local static OpenGL* _instance;
132 Window* _context_holder =
nullptr;
static OpenGL * getInstance()
Get the OpenGL instance related to this thread.
Definition opengl.h:78
void scissor(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
Define the scissor area Only allow draws in this area, other draw calls are discarded.
void resizeViewport(const int32_t x, const int32_t y, const int32_t width, const int32_t height)
Resize screen viewport.
std::shared_ptr< render::ScreenQuad > getScreenQuad()
Get a screen covering quad render mesh for screen rendering.
Definition opengl.h:66
OpenGL(Window *context_holder)
Constructor.
void bindContextToWindow(Window &window)
Bind the OpenGL to a Window.
static bool hasContext()
Check if this thread has an OpenGL context.
Definition opengl.h:88
std::shared_ptr< render::ScreenQuad > _screen_quad
Mesh covering whole screen mainly used for post-processing.
Definition opengl.h:126
const Window & getWindow() const noexcept
Get a reference to the Window bound to the context.
Definition opengl.h:98
Definition screen_quad.h:11
Prevent class to be copied.
Definition non_copyable.h:12
Core functionality (windows, event handler, logger, ...).
Definition args.h:10
Render related abstractions (Shader, Framebuffer, Cubemaps, Textures).
Definition opengl.h:12