mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Adding requested changes
This commit is contained in:
parent
57dd782d2a
commit
a0d99c8b59
@ -333,6 +333,13 @@ if (_GLFW_COCOA)
|
|||||||
set(glfw_PKG_LIBS "-framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo")
|
set(glfw_PKG_LIBS "-framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# Use Android APIs for window creation
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
if (_GLFW_ANDROID)
|
||||||
|
list(APPEND glfw_INCLUDE_DIRS "${ANDROID_NDK}/sources/android/native_app_glue/")
|
||||||
|
endif()
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Export GLFW library dependencies
|
# Export GLFW library dependencies
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
@ -197,7 +197,7 @@ extern "C" {
|
|||||||
#include <OpenGL/glu.h>
|
#include <OpenGL/glu.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif !defined(ANDROID) /*__APPLE__*/
|
#else /*__APPLE__*/
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#if defined(GLFW_INCLUDE_GLEXT)
|
#if defined(GLFW_INCLUDE_GLEXT)
|
||||||
|
@ -123,6 +123,9 @@ extern "C" {
|
|||||||
#include <GL/osmesa.h>
|
#include <GL/osmesa.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(GLFW_EXPOSE_NATIVE_ANDROID)
|
||||||
|
#include <android_native_app_glue.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* Functions
|
* Functions
|
||||||
|
@ -100,8 +100,7 @@ target_include_directories(glfw PUBLIC
|
|||||||
target_include_directories(glfw PRIVATE
|
target_include_directories(glfw PRIVATE
|
||||||
"${GLFW_SOURCE_DIR}/src"
|
"${GLFW_SOURCE_DIR}/src"
|
||||||
"${GLFW_BINARY_DIR}/src"
|
"${GLFW_BINARY_DIR}/src"
|
||||||
${glfw_INCLUDE_DIRS}
|
${glfw_INCLUDE_DIRS})
|
||||||
${ANDROID_NDK}/sources/android/native_app_glue/)
|
|
||||||
|
|
||||||
# HACK: When building on MinGW, WINVER and UNICODE need to be defined before
|
# HACK: When building on MinGW, WINVER and UNICODE need to be defined before
|
||||||
# the inclusion of stddef.h (by glfw3.h), which is itself included before
|
# the inclusion of stddef.h (by glfw3.h), which is itself included before
|
||||||
|
@ -82,6 +82,6 @@ void _glfwPlatformTerminate(void)
|
|||||||
|
|
||||||
const char* _glfwPlatformGetVersionString(void)
|
const char* _glfwPlatformGetVersionString(void)
|
||||||
{
|
{
|
||||||
return _GLFW_VERSION_NUMBER " Android";
|
return _GLFW_VERSION_NUMBER " Android EGL";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,10 +47,10 @@
|
|||||||
|
|
||||||
#define _GLFW_PLATFORM_CONTEXT_STATE
|
#define _GLFW_PLATFORM_CONTEXT_STATE
|
||||||
#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE
|
#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE
|
||||||
|
#define _GLFW_EGL_NATIVE_DISPLAY EGL_DEFAULT_DISPLAY
|
||||||
|
|
||||||
struct android_app *app;
|
struct android_app *app;
|
||||||
|
|
||||||
|
|
||||||
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
||||||
|
|
||||||
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
||||||
|
@ -393,11 +393,8 @@ GLFWbool _glfwInitEGL(void)
|
|||||||
_glfwTerminateEGL();
|
_glfwTerminateEGL();
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
#if !defined(ANDROID)
|
|
||||||
_glfw.egl.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY);
|
_glfw.egl.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY);
|
||||||
#else
|
|
||||||
_glfw.egl.display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (_glfw.egl.display == EGL_NO_DISPLAY)
|
if (_glfw.egl.display == EGL_NO_DISPLAY)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user