2014-02-10 01:10:30 +00:00
|
|
|
/*************************************************/
|
|
|
|
/* context_gl.cpp */
|
|
|
|
/*************************************************/
|
|
|
|
/* This file is part of: */
|
|
|
|
/* GODOT ENGINE */
|
|
|
|
/*************************************************/
|
|
|
|
/* Source code within this file is: */
|
2016-01-01 13:50:53 +00:00
|
|
|
/* (c) 2007-2016 Juan Linietsky, Ariel Manzur */
|
2014-02-10 01:10:30 +00:00
|
|
|
/* All Rights Reserved. */
|
|
|
|
/*************************************************/
|
|
|
|
|
|
|
|
#include "context_gl.h"
|
|
|
|
|
|
|
|
|
2015-01-10 20:35:26 +00:00
|
|
|
#if defined(OPENGL_ENABLED) || defined(GLES2_ENABLED)
|
2014-02-10 01:10:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|