6400b455b8
This splits the GL header inclusion from cogl-defines.h into a separate headear called cogl-gl-header.h which we will only include internally. That way we don't leak GL declarations out of our public headers. The texture functions that were using GLenum and GLuint in the public header have now changed to just use unsigned int. Note however that if an EGL winsys is enabled then it will still publicly include an EGL header. This is a bit more awkward to fix because we have public API which returns an EGLDisplay and we can't determine what type that is. There is also a conformance test which just verifies that no GL header has been included while compiling. The test isn't added to test-conform-main because it doesn't actually test anything at runtime. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit ef5680d3fda5df929dbd0b420c8f598ded58dfee)
18 lines
309 B
C
18 lines
309 B
C
#include <cogl/cogl.h>
|
|
|
|
#include "test-utils.h"
|
|
|
|
/* If you just include cogl/cogl.h, you shouldn't end up including any
|
|
GL headers */
|
|
#ifdef GL_TRUE
|
|
#error "Including cogl.h shouldn't be including any GL headers"
|
|
#endif
|
|
|
|
void
|
|
test_no_gl_header (void)
|
|
{
|
|
if (cogl_test_verbose ())
|
|
g_print ("OK\n");
|
|
}
|
|
|