update mac to 2.6
This commit is contained in:
parent
92dcc91b82
commit
ba8b1760df
17 changed files with 3178 additions and 2338 deletions
BIN
libraylib_mac.a
BIN
libraylib_mac.a
Binary file not shown.
|
@ -6,8 +6,8 @@ materials of a model. But now it __seems__ to work
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
# Probably unnecessary, just covering all bases in case people add or remove dlls
|
# Probably unnecessary, just covering all bases in case people add or remove dlls
|
||||||
MAC_NAMES = ['libraylib.2.5.0.dylib', 'libraylib.2.dylib', 'libraylib.dylib']
|
MAC_NAMES = ['libraylib.2.6.0.dylib', 'libraylib.261.dylib', 'libraylib.dylib']
|
||||||
LINUX_NAMES = ['libraylib.so.2.5.0','libraylib.so.2', 'libraylib.so']
|
LINUX_NAMES = ['libraylib.so.2.6.0','libraylib.so.2', 'libraylib.so']
|
||||||
WINDOWS_NAMES = ['raylib.dll', 'libraylib.dll']
|
WINDOWS_NAMES = ['raylib.dll', 'libraylib.dll']
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
BIN
raylib/dynamic/libraylib.2.6.0.dylib
Executable file
BIN
raylib/dynamic/libraylib.2.6.0.dylib
Executable file
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
libraylib.2.5.0.dylib
|
|
BIN
raylib/dynamic/libraylib.261.dylib
Executable file
BIN
raylib/dynamic/libraylib.261.dylib
Executable file
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
libraylib.2.5.0.dylib
|
|
BIN
raylib/dynamic/libraylib.dylib
Executable file
BIN
raylib/dynamic/libraylib.dylib
Executable file
Binary file not shown.
|
@ -52,7 +52,7 @@
|
||||||
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
* BSD-like license that allows static linking with closed source software:
|
* BSD-like license that allows static linking with closed source software:
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5)
|
* Copyright (c) 2013-2020 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||||
* will the authors be held liable for any damages arising from the use of this software.
|
* will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
@ -76,12 +76,15 @@
|
||||||
|
|
||||||
#include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback
|
#include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(BUILD_LIBTYPE_SHARED)
|
#define RLAPI // We are building or using raylib as a static library (or Linux shared library)
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
// Microsoft attibutes to tell compiler that symbols are imported/exported from a .dll
|
||||||
|
#if defined(BUILD_LIBTYPE_SHARED)
|
||||||
#define RLAPI __declspec(dllexport) // We are building raylib as a Win32 shared library (.dll)
|
#define RLAPI __declspec(dllexport) // We are building raylib as a Win32 shared library (.dll)
|
||||||
#elif defined(_WIN32) && defined(USE_LIBTYPE_SHARED)
|
#elif defined(USE_LIBTYPE_SHARED)
|
||||||
#define RLAPI __declspec(dllimport) // We are using raylib as a Win32 shared library (.dll)
|
#define RLAPI __declspec(dllimport) // We are using raylib as a Win32 shared library (.dll)
|
||||||
#else
|
#endif
|
||||||
#define RLAPI // We are building or using raylib as a static library (or Linux shared library)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
@ -103,6 +106,9 @@
|
||||||
#ifndef RL_CALLOC
|
#ifndef RL_CALLOC
|
||||||
#define RL_CALLOC(n,sz) calloc(n,sz)
|
#define RL_CALLOC(n,sz) calloc(n,sz)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef RL_REALLOC
|
||||||
|
#define RL_REALLOC(n,sz) realloc(n,sz)
|
||||||
|
#endif
|
||||||
#ifndef RL_FREE
|
#ifndef RL_FREE
|
||||||
#define RL_FREE(p) free(p)
|
#define RL_FREE(p) free(p)
|
||||||
#endif
|
#endif
|
||||||
|
@ -624,14 +630,16 @@ typedef enum {
|
||||||
// This is here just for error checking
|
// This is here just for error checking
|
||||||
GAMEPAD_BUTTON_UNKNOWN = 0,
|
GAMEPAD_BUTTON_UNKNOWN = 0,
|
||||||
|
|
||||||
// This is normally [A,B,X,Y]/[Circle,Triangle,Square,Cross]
|
// This is normally a DPAD
|
||||||
// No support for 6 button controllers though..
|
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_UP,
|
GAMEPAD_BUTTON_LEFT_FACE_UP,
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_RIGHT,
|
GAMEPAD_BUTTON_LEFT_FACE_RIGHT,
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_DOWN,
|
GAMEPAD_BUTTON_LEFT_FACE_DOWN,
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_LEFT,
|
GAMEPAD_BUTTON_LEFT_FACE_LEFT,
|
||||||
|
|
||||||
// This is normally a DPAD
|
// This normally corresponds with PlayStation and Xbox controllers
|
||||||
|
// XBOX: [Y,X,A,B]
|
||||||
|
// PS3: [Triangle,Square,Cross,Circle]
|
||||||
|
// No support for 6 button controllers though..
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_UP,
|
GAMEPAD_BUTTON_RIGHT_FACE_UP,
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT,
|
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT,
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_DOWN,
|
GAMEPAD_BUTTON_RIGHT_FACE_DOWN,
|
||||||
|
@ -912,6 +920,7 @@ RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a r
|
||||||
RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix)
|
RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix)
|
||||||
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Returns camera 2d transform matrix
|
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Returns camera 2d transform matrix
|
||||||
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position
|
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position
|
||||||
|
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Returns size position for a 3d world space position
|
||||||
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Returns the screen space position for a 2d camera world space position
|
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Returns the screen space position for a 2d camera world space position
|
||||||
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Returns the world space position for a 2d camera screen space position
|
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Returns the world space position for a 2d camera screen space position
|
||||||
|
|
||||||
|
@ -975,8 +984,8 @@ RLAPI bool IsKeyPressed(int key); // Detect if a key
|
||||||
RLAPI bool IsKeyDown(int key); // Detect if a key is being pressed
|
RLAPI bool IsKeyDown(int key); // Detect if a key is being pressed
|
||||||
RLAPI bool IsKeyReleased(int key); // Detect if a key has been released once
|
RLAPI bool IsKeyReleased(int key); // Detect if a key has been released once
|
||||||
RLAPI bool IsKeyUp(int key); // Detect if a key is NOT being pressed
|
RLAPI bool IsKeyUp(int key); // Detect if a key is NOT being pressed
|
||||||
RLAPI int GetKeyPressed(void); // Get latest key pressed
|
|
||||||
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
|
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
|
||||||
|
RLAPI int GetKeyPressed(void); // Get key pressed, call it multiple times for chars queued
|
||||||
|
|
||||||
// Input-related functions: gamepads
|
// Input-related functions: gamepads
|
||||||
RLAPI bool IsGamepadAvailable(int gamepad); // Detect if a gamepad is available
|
RLAPI bool IsGamepadAvailable(int gamepad); // Detect if a gamepad is available
|
||||||
|
@ -1050,6 +1059,8 @@ RLAPI void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, i
|
||||||
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
|
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
|
||||||
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
||||||
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
||||||
|
RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
|
||||||
|
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
|
||||||
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring
|
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring
|
||||||
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring outline
|
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring outline
|
||||||
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
||||||
|
@ -1068,6 +1079,7 @@ RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color);
|
||||||
RLAPI void DrawTriangleFan(Vector2 *points, int numPoints, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
RLAPI void DrawTriangleFan(Vector2 *points, int numPoints, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||||
RLAPI void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color); // Draw a triangle strip defined by points
|
RLAPI void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color); // Draw a triangle strip defined by points
|
||||||
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
||||||
|
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
||||||
|
|
||||||
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Define default texture used to draw shapes
|
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Define default texture used to draw shapes
|
||||||
|
|
||||||
|
@ -1183,15 +1195,17 @@ RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color co
|
||||||
RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
|
RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
|
||||||
RLAPI void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
|
RLAPI void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
|
||||||
RLAPI void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint,
|
RLAPI void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint,
|
||||||
int selectStart, int selectLength, Color selectText, Color selectBack); // Draw text using font inside rectangle limits with support for text selection
|
int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection
|
||||||
|
RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float scale, Color tint); // Draw one character (codepoint)
|
||||||
|
|
||||||
// Text misc. functions
|
// Text misc. functions
|
||||||
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
||||||
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
|
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
|
||||||
RLAPI int GetGlyphIndex(Font font, int character); // Get index position for a unicode character on font
|
RLAPI int GetGlyphIndex(Font font, int codepoint); // Get index position for a unicode character on font
|
||||||
|
|
||||||
// Text strings management functions (no utf8 strings, only byte chars)
|
// Text strings management functions (no utf8 strings, only byte chars)
|
||||||
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
||||||
|
RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
|
||||||
RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
|
RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
|
||||||
RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
|
RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
|
||||||
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf style)
|
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf style)
|
||||||
|
@ -1220,6 +1234,7 @@ RLAPI const char *CodepointToUtf8(int codepoint, int *byteLength); // Encode
|
||||||
|
|
||||||
// Basic geometric 3D shapes drawing functions
|
// Basic geometric 3D shapes drawing functions
|
||||||
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
||||||
|
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
||||||
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
||||||
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
||||||
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
||||||
|
@ -1328,7 +1343,7 @@ RLAPI Matrix GetMatrixProjection(void); // Get
|
||||||
|
|
||||||
// Texture maps generation (PBR)
|
// Texture maps generation (PBR)
|
||||||
// NOTE: Required shaders should be provided
|
// NOTE: Required shaders should be provided
|
||||||
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D skyHDR, int size); // Generate cubemap texture from HDR texture
|
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size); // Generate cubemap texture from 2D texture
|
||||||
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
|
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
|
||||||
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
|
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
|
||||||
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture
|
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Raylib.h version 2.5-github modified by hand so it can be processed by CFFI
|
// Raylib.h version 2.6-release modified by hand so it can be processed by CFFI
|
||||||
/**********************************************************************************************
|
/**********************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
* raylib - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
* BSD-like license that allows static linking with closed source software:
|
* BSD-like license that allows static linking with closed source software:
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5)
|
* Copyright (c) 2013-2020 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||||
* will the authors be held liable for any damages arising from the use of this software.
|
* will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
@ -74,8 +74,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Some basic Defines
|
// Some basic Defines
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
@ -86,9 +84,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Structures Definition
|
// Structures Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
@ -207,7 +202,7 @@ typedef struct Font {
|
||||||
CharInfo *chars; // Characters info data
|
CharInfo *chars; // Characters info data
|
||||||
} Font;
|
} Font;
|
||||||
|
|
||||||
typedef Font SpriteFont; // SpriteFont type fallback, defaults to Font
|
|
||||||
|
|
||||||
// Camera type, defines a camera position/orientation in 3d space
|
// Camera type, defines a camera position/orientation in 3d space
|
||||||
typedef struct Camera3D {
|
typedef struct Camera3D {
|
||||||
|
@ -557,14 +552,16 @@ typedef enum {
|
||||||
// This is here just for error checking
|
// This is here just for error checking
|
||||||
GAMEPAD_BUTTON_UNKNOWN = 0,
|
GAMEPAD_BUTTON_UNKNOWN = 0,
|
||||||
|
|
||||||
// This is normally [A,B,X,Y]/[Circle,Triangle,Square,Cross]
|
// This is normally a DPAD
|
||||||
// No support for 6 button controllers though..
|
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_UP,
|
GAMEPAD_BUTTON_LEFT_FACE_UP,
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_RIGHT,
|
GAMEPAD_BUTTON_LEFT_FACE_RIGHT,
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_DOWN,
|
GAMEPAD_BUTTON_LEFT_FACE_DOWN,
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_LEFT,
|
GAMEPAD_BUTTON_LEFT_FACE_LEFT,
|
||||||
|
|
||||||
// This is normally a DPAD
|
// This normally corresponds with PlayStation and Xbox controllers
|
||||||
|
// XBOX: [Y,X,A,B]
|
||||||
|
// PS3: [Triangle,Square,Cross,Circle]
|
||||||
|
// No support for 6 button controllers though..
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_UP,
|
GAMEPAD_BUTTON_RIGHT_FACE_UP,
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT,
|
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT,
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_DOWN,
|
GAMEPAD_BUTTON_RIGHT_FACE_DOWN,
|
||||||
|
@ -774,8 +771,8 @@ typedef enum {
|
||||||
NPT_3PATCH_HORIZONTAL // Npatch defined by 3x1 tiles
|
NPT_3PATCH_HORIZONTAL // Npatch defined by 3x1 tiles
|
||||||
} NPatchType;
|
} NPatchType;
|
||||||
|
|
||||||
// Callbacks to be implemented by users
|
|
||||||
//typedef void (*TraceLogCallback)(int logType, const char *text, va_list args);
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
@ -842,6 +839,7 @@ RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a r
|
||||||
RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix)
|
RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix)
|
||||||
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Returns camera 2d transform matrix
|
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Returns camera 2d transform matrix
|
||||||
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position
|
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position
|
||||||
|
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Returns size position for a 3d world space position
|
||||||
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Returns the screen space position for a 2d camera world space position
|
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Returns the screen space position for a 2d camera world space position
|
||||||
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Returns the world space position for a 2d camera screen space position
|
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Returns the world space position for a 2d camera screen space position
|
||||||
|
|
||||||
|
@ -864,7 +862,6 @@ RLAPI Color Fade(Color color, float alpha); // Color fade-
|
||||||
RLAPI void SetConfigFlags(unsigned int flags); // Setup window configuration flags (view FLAGS)
|
RLAPI void SetConfigFlags(unsigned int flags); // Setup window configuration flags (view FLAGS)
|
||||||
RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level
|
RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level
|
||||||
RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level
|
RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level
|
||||||
//RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging
|
|
||||||
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
|
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
|
||||||
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
|
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
|
||||||
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
|
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
|
||||||
|
@ -905,8 +902,8 @@ RLAPI bool IsKeyPressed(int key); // Detect if a key
|
||||||
RLAPI bool IsKeyDown(int key); // Detect if a key is being pressed
|
RLAPI bool IsKeyDown(int key); // Detect if a key is being pressed
|
||||||
RLAPI bool IsKeyReleased(int key); // Detect if a key has been released once
|
RLAPI bool IsKeyReleased(int key); // Detect if a key has been released once
|
||||||
RLAPI bool IsKeyUp(int key); // Detect if a key is NOT being pressed
|
RLAPI bool IsKeyUp(int key); // Detect if a key is NOT being pressed
|
||||||
RLAPI int GetKeyPressed(void); // Get latest key pressed
|
|
||||||
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
|
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
|
||||||
|
RLAPI int GetKeyPressed(void); // Get key pressed, call it multiple times for chars queued
|
||||||
|
|
||||||
// Input-related functions: gamepads
|
// Input-related functions: gamepads
|
||||||
RLAPI bool IsGamepadAvailable(int gamepad); // Detect if a gamepad is available
|
RLAPI bool IsGamepadAvailable(int gamepad); // Detect if a gamepad is available
|
||||||
|
@ -980,6 +977,8 @@ RLAPI void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, i
|
||||||
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
|
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
|
||||||
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
||||||
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
||||||
|
RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
|
||||||
|
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
|
||||||
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring
|
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring
|
||||||
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring outline
|
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring outline
|
||||||
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
||||||
|
@ -998,6 +997,7 @@ RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color);
|
||||||
RLAPI void DrawTriangleFan(Vector2 *points, int numPoints, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
RLAPI void DrawTriangleFan(Vector2 *points, int numPoints, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||||
RLAPI void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color); // Draw a triangle strip defined by points
|
RLAPI void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color); // Draw a triangle strip defined by points
|
||||||
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
||||||
|
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
||||||
|
|
||||||
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Define default texture used to draw shapes
|
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Define default texture used to draw shapes
|
||||||
|
|
||||||
|
@ -1113,15 +1113,17 @@ RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color co
|
||||||
RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
|
RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
|
||||||
RLAPI void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
|
RLAPI void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
|
||||||
RLAPI void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint,
|
RLAPI void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint,
|
||||||
int selectStart, int selectLength, Color selectText, Color selectBack); // Draw text using font inside rectangle limits with support for text selection
|
int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection
|
||||||
|
RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float scale, Color tint); // Draw one character (codepoint)
|
||||||
|
|
||||||
// Text misc. functions
|
// Text misc. functions
|
||||||
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
||||||
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
|
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
|
||||||
RLAPI int GetGlyphIndex(Font font, int character); // Get index position for a unicode character on font
|
RLAPI int GetGlyphIndex(Font font, int codepoint); // Get index position for a unicode character on font
|
||||||
|
|
||||||
// Text strings management functions (no utf8 strings, only byte chars)
|
// Text strings management functions (no utf8 strings, only byte chars)
|
||||||
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
||||||
|
RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
|
||||||
RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
|
RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
|
||||||
RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
|
RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
|
||||||
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf style)
|
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf style)
|
||||||
|
@ -1150,6 +1152,7 @@ RLAPI const char *CodepointToUtf8(int codepoint, int *byteLength); // Encode
|
||||||
|
|
||||||
// Basic geometric 3D shapes drawing functions
|
// Basic geometric 3D shapes drawing functions
|
||||||
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
||||||
|
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
||||||
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
||||||
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
||||||
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
||||||
|
@ -1258,7 +1261,7 @@ RLAPI Matrix GetMatrixProjection(void); // Get
|
||||||
|
|
||||||
// Texture maps generation (PBR)
|
// Texture maps generation (PBR)
|
||||||
// NOTE: Required shaders should be provided
|
// NOTE: Required shaders should be provided
|
||||||
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D skyHDR, int size); // Generate cubemap texture from HDR texture
|
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size); // Generate cubemap texture from 2D texture
|
||||||
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
|
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
|
||||||
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
|
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
|
||||||
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture
|
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture
|
||||||
|
@ -1350,3 +1353,5 @@ RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pit
|
||||||
// IN PROGRESS: Check rnet.h for reference
|
// IN PROGRESS: Check rnet.h for reference
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,7 @@
|
||||||
from cffi import FFI
|
from cffi import FFI
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
import sys
|
||||||
ffibuilder = FFI()
|
ffibuilder = FFI()
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +15,10 @@ ffibuilder.set_source("_raylib_cffi",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Hack to produce static linked lib using static librarylib.a supplied by us
|
# Hack to produce static linked lib using static librarylib.a supplied by us
|
||||||
command = "clang -bundle -undefined dynamic_lookup ./_raylib_cffi.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib ../../libraylib_mac.a -F/System/Library/Frameworks -framework OpenGL -framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo -o ./_raylib_cffi.cpython-35m-darwin.so"
|
version = sys.implementation.cache_tag
|
||||||
|
if version == 'cpython-36' or version == 'cpython-37':
|
||||||
|
version += 'm'
|
||||||
|
command = "clang -bundle -undefined dynamic_lookup ./_raylib_cffi.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib ../../libraylib_mac.a -F/System/Library/Frameworks -framework OpenGL -framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo -o ./_raylib_cffi."+version+"-darwin.so"
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
ffibuilder.compile(verbose=True)
|
ffibuilder.compile(verbose=True)
|
||||||
|
|
11
raylib/static/build_mac_multi.sh
Executable file
11
raylib/static/build_mac_multi.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
rm *darwin.so
|
||||||
|
pyenv global 3.8.1
|
||||||
|
pip3 install cffi
|
||||||
|
python build_mac.py
|
||||||
|
pyenv global 3.7.5
|
||||||
|
pip3 install cffi
|
||||||
|
python build_mac.py
|
||||||
|
pyenv global 3.6.9
|
||||||
|
pip3 install cffi
|
||||||
|
python build_mac.py
|
Reference in a new issue