virtualx-engine/drivers/gl_context/context_gl.cpp

42 lines
862 B
C++
Raw Normal View History

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"
#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