niftools/nifskope — pull request #75 by scrawl (2014-12-01 13:43:31+00:00)
Title: Build fix: Use glActiveTexture and glClientActiveTexture directly

I'm not entirely sure if this is the best way to go about it, but this fixes a build error that I was getting on Ubuntu 14.04:

g++ -c -m64 -pipe -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG_OUPUT -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_URL_CAST_FROM_STRING -DQT_DISABLE_DEPRECATED_BEFORE=0x050200 -DNIFSKOPE_VERSION=\"1.2.0a2.dev3\" -DNIFSKOPE_REVISION=\"9875e51\" -DFSENGINE -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -Isrc -Ilib -Ilib/fsengine -Ilib/NvTriStrip -Ilib/qhull/src -I/usr/include/qt5 -I/usr/include/qt5/QtOpenGL -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/home/scrawl/Dev/nifskope/bin -I/home/scrawl/Dev/nifskope/bin -o gltex.o src/gl/gltex.cpp
src/gl/gltex.cpp: In function ‘bool activateTextureUnit(int)’:
src/gl/gltex.cpp:92:2: error: ‘PFNGLCLIENTACTIVETEXTUREPROC’ was not declared in this scope
PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture;
^
src/gl/gltex.cpp:92:31: error: expected ‘;’ before ‘glClientActiveTexture’
PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture;
^
src/gl/gltex.cpp:93:56: error: expected ‘;’ before ‘QOpenGLContext’
glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC)QOpenGLContext::currentContext()->getProcAddress( "glClientActiveTexture" );
^
src/gl/gltex.cpp: In function ‘void resetTextureUnits()’:
src/gl/gltex.cpp:113:2: error: ‘PFNGLCLIENTACTIVETEXTUREPROC’ was not declared in this scope
PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture;
^
src/gl/gltex.cpp:113:31: error: expected ‘;’ before ‘glClientActiveTexture’
PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture;
^
src/gl/gltex.cpp:114:56: error: expected ‘;’ before ‘QOpenGLContext’
glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC)QOpenGLContext::currentContext()->getProcAddress( "glClientActiveTexture" );
^
make: *** [gltex.o] Error 1