Skip to content

Commit

Permalink
Remove GL and GLU wrapper headers
Browse files Browse the repository at this point in the history
Include them in pugl_gl.h instead, to simplify things and unclutter the include
directory.
  • Loading branch information
drobilla committed Oct 30, 2020
1 parent d3d0c55 commit 09fd119
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 89 deletions.
2 changes: 1 addition & 1 deletion examples/cube_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "demo_utils.h"

#include "pugl/gl.h"
#include "pugl/pugl_gl.h"

// clang-format off

Expand Down
1 change: 0 additions & 1 deletion examples/pugl_cursor_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include "test/test_utils.h"

#include "pugl/gl.h"
#include "pugl/pugl.h"
#include "pugl/pugl_gl.h"

Expand Down
1 change: 0 additions & 1 deletion examples/pugl_embed_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "demo_utils.h"
#include "test/test_utils.h"

#include "pugl/gl.h"
#include "pugl/pugl.h"
#include "pugl/pugl_gl.h"

Expand Down
41 changes: 0 additions & 41 deletions include/pugl/gl.h

This file was deleted.

41 changes: 0 additions & 41 deletions include/pugl/glu.h

This file was deleted.

29 changes: 29 additions & 0 deletions include/pugl/pugl_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,35 @@

#include "pugl/pugl.h"

// IWYU pragma: begin_exports

/* Unfortunately, GL includes vary across platforms, so include them here to
enable pure portable programs. */

#ifndef PUGL_NO_INCLUDE_GL_H
# ifdef __APPLE__
# include "OpenGL/gl.h"
# else
# ifdef _WIN32
# include <windows.h>
# endif
# include "GL/gl.h"
# endif
#endif

#ifndef PUGL_NO_INCLUDE_GLU_H
# ifdef __APPLE__
# include "OpenGL/glu.h"
# else
# ifdef _WIN32
# include <windows.h>
# endif
# include "GL/glu.h"
# endif
#endif

// IWYU pragma: end_exports

PUGL_BEGIN_DECLS

/**
Expand Down
2 changes: 0 additions & 2 deletions test/test_build.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

#define PUGL_DISABLE_DEPRECATED

#include "pugl/gl.h" // IWYU pragma: keep
#include "pugl/glu.h" // IWYU pragma: keep
#include "pugl/pugl.h" // IWYU pragma: keep
#include "pugl/pugl_cairo.h" // IWYU pragma: keep
#include "pugl/pugl_gl.h" // IWYU pragma: keep
Expand Down
2 changes: 0 additions & 2 deletions test/test_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

#define PUGL_DISABLE_DEPRECATED

#include "pugl/gl.h" // IWYU pragma: keep
#include "pugl/glu.h" // IWYU pragma: keep
#include "pugl/pugl.h" // IWYU pragma: keep
#include "pugl/pugl.hpp" // IWYU pragma: keep
#include "pugl/pugl.ipp" // IWYU pragma: keep
Expand Down

0 comments on commit 09fd119

Please sign in to comment.