Merge pull request #148 from sol-prog/master
OS X compatiblity changes and compiled library
This commit is contained in:
commit
7921d85dc8
BIN
release/osx/libraylib.a
Normal file
BIN
release/osx/libraylib.a
Normal file
Binary file not shown.
12
src/Makefile
12
src/Makefile
@ -169,15 +169,15 @@ endif
|
|||||||
|
|
||||||
# compile core module
|
# compile core module
|
||||||
core.o : core.c raylib.h rlgl.h utils.h raymath.h
|
core.o : core.c raylib.h rlgl.h utils.h raymath.h
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE) -D$(PLATFORM)
|
$(CC) -c $< $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
|
||||||
|
|
||||||
# compile rlgl module
|
# compile rlgl module
|
||||||
rlgl.o : rlgl.c rlgl.h raymath.h
|
rlgl.o : rlgl.c rlgl.h raymath.h
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE) -D$(GRAPHICS)
|
$(CC) -c $< $(CFLAGS) $(INCLUDES) -D$(GRAPHICS)
|
||||||
|
|
||||||
# compile shapes module
|
# compile shapes module
|
||||||
shapes.o : shapes.c raylib.h rlgl.h
|
shapes.o : shapes.c raylib.h rlgl.h
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE)
|
$(CC) -c $< $(CFLAGS) $(INCLUDES)
|
||||||
|
|
||||||
# compile textures module
|
# compile textures module
|
||||||
textures.o : textures.c rlgl.h utils.h
|
textures.o : textures.c rlgl.h utils.h
|
||||||
@ -185,11 +185,11 @@ textures.o : textures.c rlgl.h utils.h
|
|||||||
|
|
||||||
# compile text module
|
# compile text module
|
||||||
text.o : text.c raylib.h utils.h
|
text.o : text.c raylib.h utils.h
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE)
|
$(CC) -c $< $(CFLAGS) $(INCLUDES)
|
||||||
|
|
||||||
# compile models module
|
# compile models module
|
||||||
models.o : models.c raylib.h rlgl.h raymath.h
|
models.o : models.c raylib.h rlgl.h raymath.h
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE) -D$(PLATFORM)
|
$(CC) -c $< $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
|
||||||
|
|
||||||
# compile audio module
|
# compile audio module
|
||||||
audio.o : audio.c raylib.h
|
audio.o : audio.c raylib.h
|
||||||
@ -209,7 +209,7 @@ camera.o : camera.c raylib.h
|
|||||||
|
|
||||||
#compile gestures module
|
#compile gestures module
|
||||||
gestures.o : gestures.c raylib.h
|
gestures.o : gestures.c raylib.h
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE)
|
$(CC) -c $< $(CFLAGS) $(INCLUDES)
|
||||||
|
|
||||||
# It installs generated and needed files to compile projects using raylib.
|
# It installs generated and needed files to compile projects using raylib.
|
||||||
# The installation works manually.
|
# The installation works manually.
|
||||||
|
@ -268,10 +268,14 @@
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
// Boolean type
|
// Boolean type
|
||||||
|
#ifndef __APPLE__
|
||||||
#if !defined(_STDBOOL_H)
|
#if !defined(_STDBOOL_H)
|
||||||
typedef enum { false, true } bool;
|
typedef enum { false, true } bool;
|
||||||
#define _STDBOOL_H
|
#define _STDBOOL_H
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#include <stdbool.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// byte type
|
// byte type
|
||||||
|
@ -1275,15 +1275,21 @@ void rlglLoadExtensions(void *loader)
|
|||||||
{
|
{
|
||||||
#if defined(GRAPHICS_API_OPENGL_21) || defined(GRAPHICS_API_OPENGL_33)
|
#if defined(GRAPHICS_API_OPENGL_21) || defined(GRAPHICS_API_OPENGL_33)
|
||||||
// NOTE: glad is generated and contains only required OpenGL 3.3 Core extensions (and lower versions)
|
// NOTE: glad is generated and contains only required OpenGL 3.3 Core extensions (and lower versions)
|
||||||
|
#ifndef __APPLE__
|
||||||
if (!gladLoadGLLoader((GLADloadproc)loader)) TraceLog(WARNING, "GLAD: Cannot load OpenGL extensions");
|
if (!gladLoadGLLoader((GLADloadproc)loader)) TraceLog(WARNING, "GLAD: Cannot load OpenGL extensions");
|
||||||
else TraceLog(INFO, "GLAD: OpenGL extensions loaded successfully");
|
else TraceLog(INFO, "GLAD: OpenGL extensions loaded successfully");
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(GRAPHICS_API_OPENGL_21)
|
#if defined(GRAPHICS_API_OPENGL_21)
|
||||||
|
#ifndef __APPLE__
|
||||||
if (GLAD_GL_VERSION_2_1) TraceLog(INFO, "OpenGL 2.1 profile supported");
|
if (GLAD_GL_VERSION_2_1) TraceLog(INFO, "OpenGL 2.1 profile supported");
|
||||||
|
#endif
|
||||||
#elif defined(GRAPHICS_API_OPENGL_33)
|
#elif defined(GRAPHICS_API_OPENGL_33)
|
||||||
|
#ifndef __APPLE__
|
||||||
if(GLAD_GL_VERSION_3_3) TraceLog(INFO, "OpenGL 3.3 Core profile supported");
|
if(GLAD_GL_VERSION_3_3) TraceLog(INFO, "OpenGL 3.3 Core profile supported");
|
||||||
else TraceLog(ERROR, "OpenGL 3.3 Core profile not supported");
|
else TraceLog(ERROR, "OpenGL 3.3 Core profile not supported");
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// With GLAD, we can check if an extension is supported using the GLAD_GL_xxx booleans
|
// With GLAD, we can check if an extension is supported using the GLAD_GL_xxx booleans
|
||||||
//if (GLAD_GL_ARB_vertex_array_object) // Use GL_ARB_vertex_array_object
|
//if (GLAD_GL_ARB_vertex_array_object) // Use GL_ARB_vertex_array_object
|
||||||
|
Loading…
Reference in New Issue
Block a user