mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
8997084831
-=-=-=-=-=-=-=-=-=- -Moved drawing code to a single function that takes linked list (should make it easier to optimize in the future). -Implemented Z ordering of 2D nodes. Node2D and those that inherit have a visibility/Z property that affects drawing order (besides the tree order) -Removed OpenGL ES 1.x support. Good riddance!
42 lines
862 B
C++
42 lines
862 B
C++
/*************************************************/
|
|
/* context_gl.cpp */
|
|
/*************************************************/
|
|
/* This file is part of: */
|
|
/* GODOT ENGINE */
|
|
/*************************************************/
|
|
/* Source code within this file is: */
|
|
/* (c) 2007-2010 Juan Linietsky, Ariel Manzur */
|
|
/* All Rights Reserved. */
|
|
/*************************************************/
|
|
|
|
#include "context_gl.h"
|
|
|
|
|
|
#if defined(OPENGL_ENABLED) || defined(GLES2_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
|