Commit b09e0f70 authored by Robert Menzel's avatar Robert Menzel

fixes for the core profile and warnings

parent 5612a254
......@@ -45,11 +45,15 @@ inline GLint getGLTypeSize ( GLenum _type )
inline GLuint getNumberOfChannels( GLenum _format )
{
// GLES formats:
if (_format == GL_ALPHA || _format == GL_LUMINANCE || _format == GL_DEPTH_COMPONENT) return 1;
if (_format == GL_LUMINANCE_ALPHA) return 2;
if (_format == GL_ALPHA || _format == GL_DEPTH_COMPONENT) return 1;
if (_format == GL_RGB) return 3;
if (_format == GL_RGBA) return 4;
#ifdef ACGL_OPENGL_CORE_PROFILE
// removed from core:
if (_format == GL_LUMINANCE) return 1;
if (_format == GL_LUMINANCE_ALPHA) return 2;
#endif
#ifndef ACGL_OPENGL_ES
// additional desktop formats:
if ( _format == GL_R8I || _format == GL_R16I || _format == GL_R32I
......
......@@ -33,7 +33,7 @@ bool init(void)
#endif
return false;
}
#elif ACGL_EXTENSION_LOADER_GLLOADGEN
#elif defined( ACGL_EXTENSION_LOADER_GLLOADGEN )
int loaded = ogl_LoadFunctions();
if (loaded == ogl_LOAD_FAILED)
{
......@@ -48,9 +48,9 @@ bool init(void)
Utils::debug() << "OpenGL Version: " << OpenGL::getOpenGLMajorVersionNumber() << "." << OpenGL::getOpenGLMinorVersionNumber() << std::endl;
#ifdef ACGL_OPENGL_ES
int versionToTest = ACGL_OPENGLES_VERSION ;
unsigned int versionToTest = ACGL_OPENGLES_VERSION ;
#else
int versionToTest = ACGL_OPENGL_VERSION ;
unsigned int versionToTest = ACGL_OPENGL_VERSION ;
#endif
if (OpenGL::getOpenGLVersionNumber() < versionToTest) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment