OpenGL renderer.
More...
#include <OxygenEngine/core/renderer/opengl.h>
|
| static OpenGL * | getInstance () |
| | Get the OpenGL instance related to this thread.
|
| static bool | hasContext () |
| | Check if this thread has an OpenGL context.
|
|
|
std::shared_ptr< render::ScreenQuad > | _screen_quad |
| | Mesh covering whole screen mainly used for post-processing.
|
|
|
| NonCopyable (NonCopyable &&)=default |
|
NonCopyable & | operator= (NonCopyable &&)=default |
OpenGL renderer.
- Note
- Should extends Renderer
◆ OpenGL()
| oe::core::OpenGL::OpenGL |
( |
Window * | context_holder | ) |
|
Constructor.
- Parameters
-
| context_holder | Window to bind to this context |
◆ bindContextToWindow()
| void oe::core::OpenGL::bindContextToWindow |
( |
Window & | window | ) |
|
◆ getInstance()
| OpenGL * oe::core::OpenGL::getInstance |
( |
| ) |
|
|
inlinestatic |
Get the OpenGL instance related to this thread.
- Returns
- OpenGL instance related to this thread or null if no one has been init
◆ getScreenQuad()
Get a screen covering quad render mesh for screen rendering.
- Returns
- Pointer to the screen quad
◆ getWindow()
| const Window & oe::core::OpenGL::getWindow |
( |
| ) |
const |
|
inlinenoexcept |
Get a reference to the Window bound to the context.
- Returns
- Window bound to the context
◆ hasContext()
| bool oe::core::OpenGL::hasContext |
( |
| ) |
|
|
inlinestatic |
Check if this thread has an OpenGL context.
- Returns
- true if this thread has an OpenGL context
◆ resizeViewport()
| void oe::core::OpenGL::resizeViewport |
( |
const int32_t | x, |
|
|
const int32_t | y, |
|
|
const int32_t | width, |
|
|
const int32_t | height ) |
Resize screen viewport.
- Parameters
-
| x | Lower left corner x value of the viewport rectangle, in pixels |
| y | Lower left corner y value of the viewport rectangle, in pixels |
| width | viewport width, in pixels |
| height | viewport height, in pixels |
◆ scissor()
| void oe::core::OpenGL::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.
- Parameters
-
| x | Lower left corner x value of the scissor rectangle, in pixels |
| y | Lower left corner y value of the scissor rectangle, in pixels |
| width | scissor width, in pixels |
| height | scissor height, in pixels |
The documentation for this class was generated from the following file: