Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ACGL
acgl
Commits
b09e0f70
Commit
b09e0f70
authored
Jan 06, 2013
by
Robert Menzel
Browse files
fixes for the core profile and warnings
parent
5612a254
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Tools.hh
View file @
b09e0f70
...
...
@@ -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
...
...
src/ACGL/ACGL.cc
View file @
b09e0f70
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment