examples/Qt/ISFEditor/ISFEditor_app/Spout/SpoutGLDXinterop.cpp
//
//	Load the Nvidia gl/dx extensions
//

Load the Nvidia gl/dx extensions
Load the Nvidia gl / dx extensions
bool spoutGLDXinterop::LoadGLextensions() 
{
	m_caps = loadGLextensions(); 
	char buffer [33];
	_itoa_s(m_caps, buffer, 2);
	if(m_caps == 0) {
		return false;
	}
	if(m_caps & GLEXT_SUPPORT_FBO)       m_bFBOavailable  = true;
	if(m_caps & GLEXT_SUPPORT_FBO_BLIT)  m_bBLITavailable = true;
	if(m_caps & GLEXT_SUPPORT_SWAP)      m_bSWAPavailable = true;
	if(m_caps & GLEXT_SUPPORT_BGRA)      m_bBGRAavailable = true;
	if(m_caps & GLEXT_SUPPORT_NVINTEROP) m_bGLDXavailable = true; 
	if(!m_bFBOavailable)
		return false;
	if(!m_bGLDXavailable) {
		m_bUseCPU = true;
		spoutdx.WriteDwordToRegistry((DWORD)m_bUseCPU, "Software\\Leading Edge\\Spout", "CPU");
	}
	return true;
}
bool spoutGLDXinterop :: LoadGLextensions ( ) { m_caps = loadGLextensions ( ) ; char buffer [ 33 ] ; _itoa_s ( m_caps , buffer , 2 ) ; if ( m_caps == 0 ) { return false ; } if ( m_caps & GLEXT_SUPPORT_FBO ) m_bFBOavailable = true ; if ( m_caps & GLEXT_SUPPORT_FBO_BLIT ) m_bBLITavailable = true ; if ( m_caps & GLEXT_SUPPORT_SWAP ) m_bSWAPavailable = true ; if ( m_caps & GLEXT_SUPPORT_BGRA ) m_bBGRAavailable = true ; if ( m_caps & GLEXT_SUPPORT_NVINTEROP ) m_bGLDXavailable = true ; if ( ! m_bFBOavailable ) return false ; if ( ! m_bGLDXavailable ) { m_bUseCPU = true ; spoutdx . WriteDwordToRegistry ( ( DWORD ) m_bUseCPU , " \\ \\ " , " " ) ; } return true ; }
Load the Nvidia gl/dx extensions
Load the Nvidia gl / dx extensions
// in spoutGLextensions
 // GLEXT_SUPPORT_PBO - set by SetBufferMode()
 // Interop needed for texture sharing
 // FBO not available is terminal
 // If the GL/DX extensions failed to load, then it has to be CPU access
