Remove GLU dependency
gluGetString, gluBuild2DMipmaps, and gluErrorString are all functions from the GLU library, which is not part of OpenGL. This lets the game run without libGLU1 (or whatever it's called on a given distro). Update README.md
This commit is contained in:
@@ -44,11 +44,11 @@ You can choose between using the installer or using the portable build. Using th
|
|||||||
|
|
||||||
* **Debian-based**:
|
* **Debian-based**:
|
||||||
|
|
||||||
* `sudo apt install libgdk-pixbuf-2.0-0 libgl1 libglu1-mesa libglvnd0 libgtk-3-0 libusb-0.1-4 libxinerama1 libxtst6`
|
* `sudo apt install libgdk-pixbuf-2.0-0 libgl1 libglvnd0 libgtk-3-0 libusb-0.1-4 libxinerama1 libxtst6`
|
||||||
|
|
||||||
* **Fedora-based**:
|
* **Fedora-based**:
|
||||||
|
|
||||||
* `sudo yum install gdk-pixbuf2 mesa-libGLU gtk3 libusb-compat-0.1 libXinerama libXtst`
|
* `sudo yum install gdk-pixbuf2 gtk3 libusb-compat-0.1 libXinerama libXtst`
|
||||||
|
|
||||||
* **Arch Linux**:
|
* **Arch Linux**:
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ You can choose between using the installer or using the portable build. Using th
|
|||||||
|
|
||||||
* **OpenSUSE**:
|
* **OpenSUSE**:
|
||||||
|
|
||||||
* `sudo zypper install libGLU1`
|
* OpenSUSE comes with everything you need pre-installed.
|
||||||
|
|
||||||
|
|
||||||
### Build From Source
|
### Build From Source
|
||||||
|
|||||||
+7
-16
@@ -484,12 +484,11 @@ RString RageDisplay_Legacy::Init( const VideoModeParams &p, bool bAllowUnacceler
|
|||||||
|
|
||||||
// Log driver details
|
// Log driver details
|
||||||
g_pWind->LogDebugInformation();
|
g_pWind->LogDebugInformation();
|
||||||
LOG->Info( "OGL Vendor: %s", glGetString(GL_VENDOR) );
|
LOG->Info("OGL Vendor: %s", reinterpret_cast<const char*>(glGetString(GL_VENDOR)));
|
||||||
LOG->Info( "OGL Renderer: %s", glGetString(GL_RENDERER) );
|
LOG->Info("OGL Renderer: %s", reinterpret_cast<const char*>(glGetString(GL_RENDERER)));
|
||||||
LOG->Info( "OGL Version: %s", glGetString(GL_VERSION) );
|
LOG->Info("OGL Version: %s", reinterpret_cast<const char*>(glGetString(GL_VERSION)));
|
||||||
LOG->Info("OGL Max texture size: %i", GetMaxTextureSize());
|
LOG->Info("OGL Max texture size: %i", GetMaxTextureSize());
|
||||||
LOG->Info("OGL Texture units: %i", g_iMaxTextureUnits);
|
LOG->Info("OGL Texture units: %i", g_iMaxTextureUnits);
|
||||||
LOG->Info( "GLU Version: %s", gluGetString(GLU_VERSION) );
|
|
||||||
|
|
||||||
/* Pretty-print the extension string: */
|
/* Pretty-print the extension string: */
|
||||||
LOG->Info( "OGL Extensions:" );
|
LOG->Info( "OGL Extensions:" );
|
||||||
@@ -2289,7 +2288,7 @@ std::uintptr_t RageDisplay_Legacy::CreateTexture(
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOG->Trace("%s (format %s, %ix%i, format %s, type %s, pixfmt %i, imgpixfmt %i)",
|
LOG->Trace("%s (format %s, %ix%i, format %s, type %s, pixfmt %i, imgpixfmt %i)",
|
||||||
bGenerateMipMaps? "gluBuild2DMipmaps":"glTexImage2D",
|
"glTexImage2D",
|
||||||
GLToString(glTexFormat).c_str(),
|
GLToString(glTexFormat).c_str(),
|
||||||
pImg->w, pImg->h,
|
pImg->w, pImg->h,
|
||||||
GLToString(glImageFormat).c_str(),
|
GLToString(glImageFormat).c_str(),
|
||||||
@@ -2297,16 +2296,6 @@ std::uintptr_t RageDisplay_Legacy::CreateTexture(
|
|||||||
|
|
||||||
DebugFlushGLErrors();
|
DebugFlushGLErrors();
|
||||||
|
|
||||||
if (bGenerateMipMaps)
|
|
||||||
{
|
|
||||||
GLenum error = gluBuild2DMipmaps(
|
|
||||||
GL_TEXTURE_2D, glTexFormat,
|
|
||||||
pImg->w, pImg->h,
|
|
||||||
glImageFormat, glImageType, pImg->pixels );
|
|
||||||
ASSERT_M( error == 0, (char *) gluErrorString(error) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
glTexImage2D(
|
glTexImage2D(
|
||||||
GL_TEXTURE_2D, 0, glTexFormat,
|
GL_TEXTURE_2D, 0, glTexFormat,
|
||||||
power_of_two(pImg->w), power_of_two(pImg->h), 0,
|
power_of_two(pImg->w), power_of_two(pImg->h), 0,
|
||||||
@@ -2317,9 +2306,11 @@ std::uintptr_t RageDisplay_Legacy::CreateTexture(
|
|||||||
pImg->w, pImg->h,
|
pImg->w, pImg->h,
|
||||||
glImageFormat, glImageType, pImg->pixels );
|
glImageFormat, glImageType, pImg->pixels );
|
||||||
|
|
||||||
DebugAssertNoGLError();
|
if (bGenerateMipMaps) {
|
||||||
|
glGenerateMipmap(GL_TEXTURE_2D);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DebugAssertNoGLError();
|
||||||
|
|
||||||
/* Sanity check: */
|
/* Sanity check: */
|
||||||
if (pixfmt == RagePixelFormat_PAL)
|
if (pixfmt == RagePixelFormat_PAL)
|
||||||
|
|||||||
Reference in New Issue
Block a user