Exemplo n.º 1
0
/*
** GLimp_SharedContext_Create
*/
void *GLimp_SharedContext_Create( void )
{
	HGLRC ctx = qwglCreateContext( glw_state.hDC );
	if( ctx ) {
		qwglShareLists( glw_state.hGLRC, ctx );
	}
	return ctx;
}
Exemplo n.º 2
0
/*
** GLimp_SharedContext_Create
*/
bool GLimp_SharedContext_Create( void **context, void **surface )
{
	HGLRC ctx = qwglCreateContext( glw_state.hDC );
	if( !ctx ) {
		return false;
	}

	qwglShareLists( glw_state.hGLRC, ctx );
	*context = ctx;
	*surface = ( void * )1;
	return true;
}
Exemplo n.º 3
0
int CZWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	g_qeglobals.d_hwndZ = GetSafeHwnd();

  m_dcZ = ::GetDC(GetSafeHwnd());
  QEW_SetupPixelFormat(m_dcZ, false);
	if ((m_hglrcZ = qwglCreateContext(m_dcZ )) == 0)
	  Error("wglCreateContext in CZWnd::OnCreate failed");

	if (!qwglShareLists(g_qeglobals.d_hglrcBase, m_hglrcZ))
	  Error( "wglShareLists in CZWnd::OnCreate failed");

  if (!qwglMakeCurrent(m_dcZ, m_hglrcZ))
	  Error ("wglMakeCurrent in CZWnd::OnCreate failed");

	return 0;
}