1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #include "context_gl.h"
- #if defined(OPENGL_ENABLED) || defined(GLES_ENABLED)
- ContextGL *ContextGL::singleton = NULL;
- ContextGL *ContextGL::get_singleton() {
- return singleton;
- }
- ContextGL::ContextGL() {
- ERR_FAIL_COND(singleton);
- singleton = this;
- }
- ContextGL::~ContextGL() {
- if (singleton == this)
- singleton = NULL;
- }
- #endif
|