| 57 | size_t GL3PlusSupport::getNumPriorityConfigOptions() const { return 0u; } |
| 58 | |
| 59 | void GL3PlusSupport::initialiseExtensions() |
| 60 | { |
| 61 | // get driver version. |
| 62 | // this is the recommended way for GL3 see: https://www.opengl.org/wiki/Get_Context_Info |
| 63 | glGetIntegerv( GL_MAJOR_VERSION, &mVersion.major ); |
| 64 | glGetIntegerv( GL_MINOR_VERSION, &mVersion.minor ); |
| 65 | |
| 66 | LogManager::getSingleton().logMessage( "GL Version = " + mVersion.toString() ); |
| 67 | |
| 68 | const GLubyte *pcVersion = glGetString( GL_VERSION ); |
| 69 | String tmpStr = (const char *)pcVersion; |
| 70 | LogManager::getSingleton().logMessage( "GL_VERSION = " + tmpStr ); |
| 71 | |
| 72 | // Get vendor |
| 73 | const GLubyte *pcVendor = glGetString( GL_VENDOR ); |
| 74 | tmpStr = (const char *)pcVendor; |
| 75 | LogManager::getSingleton().logMessage( "GL_VENDOR = " + tmpStr ); |
| 76 | mVendor = tmpStr.substr( 0, tmpStr.find( " " ) ); |
| 77 | |
| 78 | // Get renderer |
| 79 | const GLubyte *pcRenderer = glGetString( GL_RENDERER ); |
| 80 | tmpStr = (const char *)pcRenderer; |
| 81 | LogManager::getSingleton().logMessage( "GL_RENDERER = " + tmpStr ); |
| 82 | |
| 83 | // Set extension list |
| 84 | StringStream ext; |
| 85 | String str; |
| 86 | |
| 87 | GLint numExt; |
| 88 | glGetIntegerv( GL_NUM_EXTENSIONS, &numExt ); |
| 89 | |
| 90 | LogManager::getSingleton().logMessage( "GL_EXTENSIONS = " ); |
| 91 | for( int i = 0; i < numExt; i++ ) |
| 92 | { |
| 93 | const GLubyte *pcExt = glGetStringi( GL_EXTENSIONS, static_cast<GLuint>( i ) ); |
| 94 | assert( pcExt && "Problems getting GL extension string using glGetString" ); |
| 95 | str = String( (const char *)pcExt ); |
| 96 | LogManager::getSingleton().logMessage( str ); |
| 97 | extensionList.insert( str ); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | bool GL3PlusSupport::hasMinGLVersion( int major, int minor ) const |
| 102 | { |
no test coverage detected