コード例 #1
0
ファイル: vid_glx.c プロジェクト: Hanzo-nex/DarkPlacesRM
void *GL_GetProcAddress(const char *name)
{
	void *p = NULL;
	if (qglXGetProcAddressARB != NULL)
		p = (void *) qglXGetProcAddressARB((GLubyte *)name);
	if (p == NULL)
		p = (void *) dlsym(prjobj, name);
	return p;
}
コード例 #2
0
ファイル: unix_qgl.c プロジェクト: Picmip/qfusion
/*
** qglGetProcAddress
*/
void *qglGetProcAddress( const GLubyte *procName ) {
#if 1
	if( qglXGetProcAddressARB ) {
		return qglXGetProcAddressARB( procName );
	}
#endif
	if( glw_state.OpenGLLib ) {
		return (void *)dlsym( glw_state.OpenGLLib, (char *) procName );
	}
	return NULL;
}
コード例 #3
0
bool QGL_constructExtensionFunc (Func& func, const char *symbol)
{
	func = reinterpret_cast<Func>(
#if defined(__linux__) || defined (__FreeBSD__) || defined(__APPLE__)
		qglXGetProcAddressARB ? qglXGetProcAddressARB(reinterpret_cast<GLubyte const*>(symbol)) : 0
#elif defined(_WIN32)
		wglGetProcAddress(symbol)
#else
#error "unsupported platform"
#endif
	);
	return func != 0;
}