/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/src/drivers/common/opengl/ogldrawsurface_manager.cpp

*/

#include "sgx/core/core.hpp"
#include "sgx/graphics/graphics.hpp"
#include "drivers/common/opengl/opengl.hpp"

CSGXDrawSurfaceManager *CDriverOpenGLDrawSurfaceManager::get() {
	if (!m_pSingleton) {
		m_pSingleton = new CDriverOpenGLDrawSurfaceManager();
	}
	return m_pSingleton;
}

CSGXDrawSurface *CDriverOpenGLDrawSurfaceManager ::createSurface(tUINT32 width, tUINT32 height) {
	return new CDriverOpenGLDrawSurface(width, height);
}

CSGXDrawSurface *CDriverOpenGLDrawSurfaceManager ::createDisplaySurface(tUINT32 width, tUINT32 height) {
	sgxAssert(m_pDisplay==NULL);
	return m_pDisplay = new CDriverOpenGLDrawSurface(width, height);
}

CSGXDrawSurface *CDriverOpenGLDrawSurfaceManager ::createWorkingSurface(tUINT32 width, tUINT32 height) {
	sgxAssert(m_pWorking==NULL);
	return m_pWorking = new CDriverOpenGLDrawSurface(width, height);
}


