Header option macro fixes and documentation work.

This adds compile-time checks and documentation warning about defining
header option macros during compilation of GLFW.

Fixes #445.
This commit is contained in:
Camilla Berglund
2015-03-17 16:33:21 +01:00
parent eb7688df8f
commit 8f08661d9e
5 changed files with 31 additions and 5 deletions

View File

@@ -35,6 +35,17 @@
#define _GLFW_VERSION_NUMBER "3.1.1"
#if defined(GLFW_INCLUDE_GLCOREARB) || \
defined(GLFW_INCLUDE_ES1) || \
defined(GLFW_INCLUDE_ES2) || \
defined(GLFW_INCLUDE_ES3) || \
defined(GLFW_INCLUDE_NONE) || \
defined(GLFW_INCLUDE_GLEXT) || \
defined(GLFW_INCLUDE_GLU) || \
defined(GLFW_DLL)
#error "You may not define any header option macros when compiling GLFW"
#endif
#if defined(_GLFW_USE_OPENGL)
// This is the default for glfw3.h
#elif defined(_GLFW_USE_GLESV1)