Don't link to libGL at compile time

Get all OpenGL functions using SDL_GL_GetProcAddress(). This makes it
easier to cross-arch compile on Linux and add support for OpenGL ES
in the future.

Users still have to supply their own libSDL2 for cross-arch compiling
on Linux. But now the user does not have to re-install libgl1-mesa-dev
package for i386 or amd64 on Debian when switching between compiling
ioquake3 for x86 and x86_64.
This commit is contained in:
Zack Middleton 2017-10-01 18:59:01 -05:00
parent 51e9aa2df0
commit 20573bce43
4 changed files with 163 additions and 348 deletions

View file

@ -1036,7 +1036,7 @@ void GfxInfo_f( void )
GLint numExtensions;
int i;
glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
qglGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
for (i = 0; i < numExtensions; i++)
{
ri.Printf(PRINT_ALL, "%s ", qglGetStringi(GL_EXTENSIONS, i));