Ejemplo n.º 1
0
void glx_CheckExtensions(Display *display, int screen)
{
  ClearExtensionVariables();
  
  {
    ProcExtsFromExtString((const char *)glXQueryExtensionsString(display, screen));
  }
}
Ejemplo n.º 2
0
int glx_LoadFunctions(Display *display, int screen)
{
	ClearExtensionVars();
	
	
	ProcExtsFromExtString((const char *)glXQueryExtensionsString(display, screen));
	return glx_LOAD_SUCCEEDED;
}
Ejemplo n.º 3
0
int sfglx_LoadFunctions(Display* display, int screen)
{
    ClearExtensionVars();


    ProcExtsFromExtString(reinterpret_cast<const char*>(glXQueryExtensionsString(display, screen)));
    return sfglx_LOAD_SUCCEEDED;
}
Ejemplo n.º 4
0
int sfogl_LoadFunctions()
{
	int numFailed = 0;
	ClearExtensionVars();

	const char* extensionString = NULL;

	if (sfogl_GetMajorVersion() < 3)
	{
		// Try to load the < 3.0 way
		glCheck(extensionString = (const char *)glGetString(GL_EXTENSIONS));

		ProcExtsFromExtString(extensionString);
	}
	else
	{
		// Try to load the >= 3.0 way
		const GLubyte* (CODEGEN_FUNCPTR *glGetStringiFunc)(GLenum, GLuint) = NULL;
		glGetStringiFunc = (const GLubyte* (CODEGEN_FUNCPTR *)(GLenum, GLuint))IntGetProcAddress("glGetStringi");

		if (glGetStringiFunc)
		{
			int numExtensions = 0;
			glCheck(glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions));

			if (numExtensions)
			{
				for (unsigned int i = 0; i < static_cast<unsigned int>(numExtensions); ++i)
				{
					glCheck(extensionString = (const char *)glGetStringiFunc(GL_EXTENSIONS, i));

					ProcExtsFromExtString(extensionString);
				}
			}
		}
	}

	numFailed = Load_Version_1_1();

	if (numFailed == 0)
		return sfogl_LOAD_SUCCEEDED;
	else
		return sfogl_LOAD_SUCCEEDED + numFailed;
}
int wgl_LoadFunctions(HDC hdc)
{
	ClearExtensionVars();
	
	_ptrc_wglGetExtensionsStringARB = (const char * (CODEGEN_FUNCPTR *)(HDC))IntGetProcAddress("wglGetExtensionsStringARB");
	if(!_ptrc_wglGetExtensionsStringARB) return wgl_LOAD_FAILED;
	
	ProcExtsFromExtString((const char *)_ptrc_wglGetExtensionsStringARB(hdc));
	return wgl_LOAD_SUCCEEDED;
}
Ejemplo n.º 6
0
void wgl_CheckExtensions(HDC hdc)
{
  ClearExtensionVariables();
  
  {
    typedef const char * (CODEGEN_FUNCPTR *MYGETEXTSTRINGPROC)(HDC);
    MYGETEXTSTRINGPROC InternalGetExtensionString = (MYGETEXTSTRINGPROC)IntGetProcAddress("wglGetExtensionsStringARB");
    if(!InternalGetExtensionString) return;
    ProcExtsFromExtString((const char *)InternalGetExtensionString(hdc));
  }
}
Ejemplo n.º 7
0
static int InternalLoad(HDC hdc)
{
	ClearExtensionVars();
	
	_funcptr_wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)IntGetProcAddress("wglGetExtensionsStringARB");
	if(!_funcptr_wglGetExtensionsStringARB) return 0;
	
	ProcExtsFromExtString((const char *)_funcptr_wglGetExtensionsStringARB(hdc));
	
	return wgl_LOAD_SUCCEEDED;
}