mirror of
https://github.com/glfw/glfw.git
synced 2026-11-18 04:44:54 +00:00
Added support for GLESv1_CM and GLESv2 client libraries.
This commit is contained in:
@@ -64,6 +64,13 @@
|
||||
// Define this to 1 if glXGetProcAddressEXT is available
|
||||
#cmakedefine _GLFW_HAS_GLXGETPROCADDRESSEXT
|
||||
|
||||
// Define this to 1 if using OpenGL as the client library
|
||||
#cmakedefine _GLFW_USE_OPENGL
|
||||
// Define this to 1 if using OpenGL ES 1.1 as the client library
|
||||
#cmakedefine _GLFW_USE_GLESV1
|
||||
// Define this to 1 if using OpenGL ES 2.0 as the client library
|
||||
#cmakedefine _GLFW_USE_GLESV2
|
||||
|
||||
// The GLFW version as used by glfwGetVersionString
|
||||
#define _GLFW_VERSION_FULL "@GLFW_VERSION_FULL@"
|
||||
|
||||
|
||||
@@ -390,6 +390,7 @@ GLboolean _glfwRefreshContextParams(void)
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
#if defined(_GLFW_USE_OPENGL)
|
||||
if (window->glMajor > 2)
|
||||
{
|
||||
// OpenGL 3.0+ uses a different function for extension string retrieval
|
||||
@@ -472,6 +473,7 @@ GLboolean _glfwRefreshContextParams(void)
|
||||
window->glRobustness = GLFW_NO_RESET_NOTIFICATION;
|
||||
}
|
||||
}
|
||||
#endif // _GLFW_USE_OPENGL
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
@@ -659,6 +661,7 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
|
||||
return GL_TRUE;
|
||||
}
|
||||
}
|
||||
#if defined(_GLFW_USE_OPENGL)
|
||||
else
|
||||
{
|
||||
int i;
|
||||
@@ -677,6 +680,7 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // _GLFW_USE_OPENGL
|
||||
|
||||
// Check if extension is in the platform-specific string
|
||||
return _glfwPlatformExtensionSupported(extension);
|
||||
|
||||
+14
-4
@@ -81,16 +81,24 @@ typedef struct _GLFWmonitor _GLFWmonitor;
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if defined(_GLFW_USE_GLESV1)
|
||||
#define GLFW_INCLUDE_ES1
|
||||
#elif defined(_GLFW_USE_GLESV2)
|
||||
#define GLFW_INCLUDE_ES2
|
||||
#endif
|
||||
|
||||
// Disable the inclusion of the platform glext.h by gl.h to allow proper
|
||||
// inclusion of our own, newer glext.h below
|
||||
#define GL_GLEXT_LEGACY
|
||||
|
||||
#include "../include/GL/glfw3.h"
|
||||
|
||||
// This path may need to be changed if you build GLFW using your own setup
|
||||
// We ship and use our own copy of glext.h since GLFW uses fairly new
|
||||
// extensions and not all operating systems come with an up-to-date version
|
||||
#include "../support/GL/glext.h"
|
||||
#if defined(_GLFW_USE_OPENGL)
|
||||
// This path may need to be changed if you build GLFW using your own setup
|
||||
// GLFW comes with its own copy of glext.h since it uses fairly new extensions
|
||||
// and not all development environments come with an up-to-date version
|
||||
#include "../support/GL/glext.h"
|
||||
#endif
|
||||
|
||||
#if defined(_GLFW_COCOA)
|
||||
#include "cocoa_platform.h"
|
||||
@@ -227,7 +235,9 @@ struct _GLFWwindow
|
||||
GLboolean glForward, glDebug;
|
||||
int glProfile;
|
||||
int glRobustness;
|
||||
#if defined(_GLFW_USE_OPENGL)
|
||||
PFNGLGETSTRINGIPROC GetStringi;
|
||||
#endif
|
||||
|
||||
GLFWwindowposfun windowPosCallback;
|
||||
GLFWwindowsizefun windowSizeCallback;
|
||||
|
||||
Reference in New Issue
Block a user