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