소스 검색

Cleanup of backend option strings.

Camilla Berglund 12 년 전
부모
커밋
5da8ed250a
5개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 1
      CMakeLists.txt
  2. 2 0
      src/cocoa_platform.h
  3. 1 1
      src/internal.h
  4. 2 0
      src/win32_platform.h
  5. 2 0
      src/x11_platform.h

+ 4 - 1
CMakeLists.txt

@@ -14,7 +14,10 @@ option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON)
 option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
 option(GLFW_NATIVE_API "Build the GLFW native API" OFF)
 option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
-option(GLFW_USE_EGL "Build for EGL and OpenGL ES platform (Currently only X11)" OFF)
+
+if (NOT APPLE)
+    option(GLFW_USE_EGL "Use EGL for context creation" OFF)
+endif()
 
 if (GLFW_USE_EGL)
     set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/modules)

+ 2 - 0
src/cocoa_platform.h

@@ -42,6 +42,8 @@ typedef void* id;
 
 #if defined(_GLFW_NSGL)
  #include "nsgl_platform.h"
+#else
+ #error "No supported context creation API selected"
 #endif
 
 #define _GLFW_PLATFORM_WINDOW_STATE         _GLFWwindowNS  NS

+ 1 - 1
src/internal.h

@@ -72,7 +72,7 @@ typedef struct _GLFWlibrary     _GLFWlibrary;
 #elif defined(_GLFW_X11)
  #include "x11_platform.h"
 #else
- #error "No supported platform selected"
+ #error "No supported window creation API selected"
 #endif
 
 

+ 2 - 0
src/win32_platform.h

@@ -111,6 +111,8 @@ typedef DWORD (WINAPI * TIMEGETTIME_T) (void);
  #define _GLFW_EGL_NATIVE_WINDOW  window->Win32.handle
  #define _GLFW_EGL_NATIVE_DISPLAY NULL
  #include "egl_platform.h"
+#else
+ #error "No supported context creation API selected"
 #endif
 
 #define _GLFW_PLATFORM_WINDOW_STATE         _GLFWwindowWin32  Win32

+ 2 - 0
src/x11_platform.h

@@ -61,6 +61,8 @@
  #define _GLFW_EGL_NATIVE_WINDOW  window->X11.handle
  #define _GLFW_EGL_NATIVE_DISPLAY _glfwLibrary.X11.display
  #include "egl_platform.h"
+#else
+ #error "No supported context creation API selected"
 #endif
 
 #define _GLFW_PLATFORM_WINDOW_STATE         _GLFWwindowX11  X11