mirror of https://github.com/axmolengine/axmol.git
Update glad to v2.0.0
This commit is contained in:
parent
0dda4a2776
commit
c77e9b9e0f
|
@ -1198,8 +1198,8 @@ bool GLViewImpl::loadGL()
|
|||
|
||||
// glad: load all OpenGL function pointers
|
||||
// ---------------------------------------
|
||||
# if defined(AX_USE_GL)
|
||||
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
|
||||
# if defined(AX_USE_GL)
|
||||
if (!gladLoadGL(glfwGetProcAddress))
|
||||
{
|
||||
log("glad: Failed to Load GL");
|
||||
return false;
|
||||
|
@ -1213,7 +1213,7 @@ bool GLViewImpl::loadGL()
|
|||
log("Not totally ready :(");
|
||||
}
|
||||
# else
|
||||
if (!gladLoadGLES2Loader((GLADloadproc)glfwGetProcAddress))
|
||||
if (!gladLoadGLES2(glfwGetProcAddress))
|
||||
{
|
||||
log("glad: Failed to Load GLES2");
|
||||
return false;
|
||||
|
|
|
@ -24,4 +24,4 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "glad/glad.h"
|
||||
#include "glad/gl.h"
|
||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||
#include "platform/CCPlatformConfig.h"
|
||||
#if AX_TARGET_PLATFORM == AX_PLATFORM_WIN32
|
||||
|
||||
# include "glad/glad.h"
|
||||
# include "glad/gl.h"
|
||||
|
||||
# if defined(AX_USE_GLES)
|
||||
# undef GL_DEPTH_STENCIL
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
## Glad
|
||||
- [![Upstream](https://img.shields.io/github/v/tag/Dav1dde/glad?label=Upstream)](https://github.com/Dav1dde/glad)
|
||||
- Version: 0.1.34
|
||||
- Version: 2.0.0
|
||||
- License: MIT
|
||||
|
||||
## glfw
|
||||
|
|
|
@ -8,8 +8,8 @@ include(../cmake/AXConfigThirdparty.cmake)
|
|||
|
||||
add_library(${target_name}
|
||||
${${target_name}_src}
|
||||
include/glad/glad.h
|
||||
src/glad.c
|
||||
"include/glad/gl.h"
|
||||
src/gl.c
|
||||
)
|
||||
|
||||
#~ set_target_properties(${target_name} PROPERTIES
|
||||
|
@ -18,8 +18,8 @@ add_library(${target_name}
|
|||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(${target_name}
|
||||
PUBLIC GLAD_GLAPI_EXPORT=1
|
||||
PRIVATE GLAD_GLAPI_EXPORT_BUILD=1
|
||||
PUBLIC GLAD_API_CALL_EXPORT=1
|
||||
PRIVATE GLAD_API_CALL_EXPORT_BUILD=1
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -153,6 +153,20 @@ typedef int64_t khronos_int64_t;
|
|||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
/*
|
||||
* To support platform where unsigned long cannot be used interchangeably with
|
||||
* inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
|
||||
* Ideally, we could just use (u)intptr_t everywhere, but this could result in
|
||||
* ABI breakage if khronos_uintptr_t is changed from unsigned long to
|
||||
* unsigned long long or similar (this results in different C++ name mangling).
|
||||
* To avoid changes for existing platforms, we restrict usage of intptr_t to
|
||||
* platforms where the size of a pointer is larger than the size of long.
|
||||
*/
|
||||
#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
|
||||
#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
|
||||
#define KHRONOS_USE_INTPTR_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#elif defined(__VMS ) || defined(__sgi)
|
||||
|
||||
|
@ -235,14 +249,21 @@ typedef unsigned short int khronos_uint16_t;
|
|||
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||
* to be the only LLP64 architecture in current use.
|
||||
*/
|
||||
#ifdef _WIN64
|
||||
#ifdef KHRONOS_USE_INTPTR_T
|
||||
typedef intptr_t khronos_intptr_t;
|
||||
typedef uintptr_t khronos_uintptr_t;
|
||||
#elif defined(_WIN64)
|
||||
typedef signed long long int khronos_intptr_t;
|
||||
typedef unsigned long long int khronos_uintptr_t;
|
||||
typedef signed long long int khronos_ssize_t;
|
||||
typedef unsigned long long int khronos_usize_t;
|
||||
#else
|
||||
typedef signed long int khronos_intptr_t;
|
||||
typedef unsigned long int khronos_uintptr_t;
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64)
|
||||
typedef signed long long int khronos_ssize_t;
|
||||
typedef unsigned long long int khronos_usize_t;
|
||||
#else
|
||||
typedef signed long int khronos_ssize_t;
|
||||
typedef unsigned long int khronos_usize_t;
|
||||
#endif
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue