cpp-sdl2
C++ header-only SDL2 wrapper
|
Nested class that represent a managed OpenGL Context by the SDL. More...
#include <window.hpp>
Public Member Functions | |
GlContext (SDL_Window *w) | |
Create a GlContext for the given window. More... | |
GlContext ()=default | |
Construct an invalid GLContext object where you will need to move a new one. More... | |
~GlContext () | |
Dtor will call SDL_GL_DeleteContext on the enclosed context. More... | |
GlContext (GlContext const &)=delete | |
GlContext & | operator= (GlContext const &)=delete |
GlContext (GlContext &&other) noexcept | |
GlContext & | operator= (GlContext &&other) noexcept |
void | make_current () const |
SDL_GLContext | ptr () const |
Private Attributes | |
SDL_GLContext | context_ = nullptr |
SDL_Window * | owner_ = nullptr |
Nested class that represent a managed OpenGL Context by the SDL.
Definition at line 340 of file window.hpp.
|
inline |
Create a GlContext for the given window.
You should use sdl::Window::gl_create_context() instead of this
Definition at line 345 of file window.hpp.
|
default |
Construct an invalid GLContext object where you will need to move a new one.
|
inline |
Dtor will call SDL_GL_DeleteContext on the enclosed context.
Definition at line 354 of file window.hpp.
References sdl::Window::operator=().
|
delete |
|
inlinenoexcept |
Definition at line 360 of file window.hpp.
|
inline |
Definition at line 373 of file window.hpp.
Definition at line 362 of file window.hpp.
References context_.
|
inline |
Definition at line 378 of file window.hpp.
|
private |
Definition at line 381 of file window.hpp.
Referenced by operator=().
|
private |
Definition at line 382 of file window.hpp.