GLClearColor class
#include <nCine/Graphics/GL/GLClearColor.h>
Manages the OpenGL clear color.
Static wrapper that caches the clear color used by glClear (set with glClearColor) so that redundant OpenGL calls are skipped when the requested color matches the cached one.
Public types
- struct State
- Holds the cached clear color state.
Public static functions
- static auto GetColor() -> Colorf
- Returns the current clear color.
- static void SetColor(const Colorf& color)
- Sets the clear color.
- static void SetColor(float red, float green, float blue, float alpha)
- Sets the clear color from individual components.
- static auto GetState() -> State
- Returns the whole cached clear color state.
- static void SetState(State newState)
- Restores the whole clear color state.
Constructors, destructors, conversion operators
- GLClearColor() deleted
- ~GLClearColor() deleted
Function documentation
static void nCine:: GLClearColor:: SetColor(float red,
float green,
float blue,
float alpha)
Sets the clear color from individual components.
| Parameters | |
|---|---|
| red | Red component |
| green | Green component |
| blue | Blue component |
| alpha | Alpha component |