Code cleanup

This commit is contained in:
Enrico Turri 2018-06-27 12:49:38 +02:00
parent 8db4fdc24c
commit 06f44a9e4b
8 changed files with 0 additions and 200 deletions

View file

@ -114,25 +114,13 @@ std::string GLCanvas3DManager::GLInfo::to_string(bool format_as_html, bool exten
}
GLCanvas3DManager::GLCanvas3DManager()
//#################################################################################################################
: m_current(nullptr)
// : m_context(nullptr)
// , m_current(nullptr)
//#################################################################################################################
, m_gl_initialized(false)
, m_use_legacy_opengl(false)
, m_use_VBOs(false)
{
}
GLCanvas3DManager::~GLCanvas3DManager()
{
//#################################################################################################################
// if (m_context != nullptr)
// delete m_context;
//#################################################################################################################
}
bool GLCanvas3DManager::add(wxGLCanvas* canvas)
{
if (canvas == nullptr)
@ -141,19 +129,7 @@ bool GLCanvas3DManager::add(wxGLCanvas* canvas)
if (_get_canvas(canvas) != m_canvases.end())
return false;
//#################################################################################################################
// if (m_context == nullptr)
// {
// m_context = new wxGLContext(canvas);
// if (m_context == nullptr)
// return false;
// }
//#################################################################################################################
//#################################################################################################################
GLCanvas3D* canvas3D = new GLCanvas3D(canvas);
// GLCanvas3D* canvas3D = new GLCanvas3D(canvas, m_context);
//#################################################################################################################
if (canvas3D == nullptr)
return false;
@ -223,43 +199,6 @@ bool GLCanvas3DManager::init(wxGLCanvas* canvas)
return false;
}
//#################################################################################################################
//bool GLCanvas3DManager::set_current(wxGLCanvas* canvas, bool force)
//{
// // given canvas is already current, return
// if (m_current == canvas)
// return true;
//
// if (canvas == nullptr)
// {
// m_current = nullptr;
// return true;
// }
//
// // set given canvas as current
// CanvasesMap::iterator it = _get_canvas(canvas);
// if (it != m_canvases.end())
// {
// bool res = it->second->set_current(force);
// if (res)
// {
// m_current = canvas;
// return true;
// }
// }
//
// m_current = nullptr;
// return false;
//}
//
//void GLCanvas3DManager::set_active(wxGLCanvas* canvas, bool active)
//{
// CanvasesMap::iterator it = _get_canvas(canvas);
// if (it != m_canvases.end())
// it->second->set_active(active);
//}
//#################################################################################################################
void GLCanvas3DManager::set_as_dirty(wxGLCanvas* canvas)
{
CanvasesMap::iterator it = _get_canvas(canvas);