VVGL/src/GLQtCtxWrapper.cpp
//	copy constructors- these do NOT create new GL contexts, they merely copy/retain the GL contexts from the passed var
copy constructors- these do NOT create new GL contexts, they merely copy/retain the GL contexts from the passed var
copy constructors - these do NOT create new GL contexts they merely copy / retain the GL contexts from the passed var
GLQtCtxHidden::GLQtCtxHidden(const GLQtCtxHidden * n)	{
	strongSurface = nullptr;
	weakSurface = nullptr;
	strongCtx.clear();
	weakCtx = nullptr;
	if (n != nullptr)	{
		if (n->weakSurface != nullptr)
			weakSurface = n->weakSurface;
		else if (n->strongSurface != nullptr)	{
			strongSurface = new QOffscreenSurface;
			strongSurface->create();
		}
		if (n->weakCtx != nullptr)
			weakCtx = n->weakCtx;
		else if (!n->strongCtx.isNull())
			strongCtx = n->strongCtx;
	}
}
GLQtCtxHidden :: GLQtCtxHidden ( const GLQtCtxHidden * n ) { strongSurface = nullptr ; weakSurface = nullptr ; strongCtx . clear ( ) ; weakCtx = nullptr ; if ( n != nullptr ) { if ( n -> weakSurface != nullptr ) weakSurface = n -> weakSurface ; else if ( n -> strongSurface != nullptr ) { strongSurface = new QOffscreenSurface ; strongSurface -> create ( ) ; } if ( n -> weakCtx != nullptr ) weakCtx = n -> weakCtx ; else if ( ! n -> strongCtx . isNull ( ) ) strongCtx = n -> strongCtx ; } }
copy constructors- these do NOT create new GL contexts, they merely copy/retain the GL contexts from the passed var
copy constructors - these do NOT create new GL contexts they merely copy / retain the GL contexts from the passed var
//	if the passed object has a weak surface (window/widget/etc), get a weak ref to it //	else the passed object either has a strong surface (offscreen, i need my own) or no surface (i need an offscreen) //	if the passed object has a weak ctx, get a weak ref to it //	else if the passed object has a strong ctx, i want to get a strong ref to it