raylib 5.0.0.4__cp311-cp311-manylinux2014_x86_64.whl → 5.5.0.0.dev3__cp311-cp311-manylinux2014_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of raylib might be problematic. Click here for more details.

raylib/raymath.h.modified CHANGED
@@ -29,7 +29,7 @@
29
29
  *
30
30
  * LICENSE: zlib/libpng
31
31
  *
32
- * Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
32
+ * Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
33
33
  *
34
34
  * This software is provided "as-is", without any express or implied warranty. In no event
35
35
  * will the authors be held liable for any damages arising from the use of this software.
@@ -99,14 +99,21 @@ inline /* Functions may be inlined or external definition used*/ Vector2 Vector2
99
99
  inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Normalize(Vector2 v);// Transforms a Vector2 by a given Matrix
100
100
  inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Transform(Vector2 v, Matrix mat);// Calculate linear interpolation between two vectors
101
101
  inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount);// Calculate reflected vector to normal
102
- inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Reflect(Vector2 v, Vector2 normal);// Rotate vector by angle
102
+ inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Reflect(Vector2 v, Vector2 normal);// Get min value for each pair of components
103
+ inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Min(Vector2 v1, Vector2 v2);// Get max value for each pair of components
104
+ inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Max(Vector2 v1, Vector2 v2);// Rotate vector by angle
103
105
  inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Rotate(Vector2 v, float angle);// Move Vector towards target
104
106
  inline /* Functions may be inlined or external definition used*/ Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance);// Invert the given vector
105
107
  inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Invert(Vector2 v);// Clamp the components of the vector between
106
108
  // min and max values specified by the given vectors
107
109
  inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max);// Clamp the magnitude of the vector between two min and max values
108
110
  inline /* Functions may be inlined or external definition used*/ Vector2 Vector2ClampValue(Vector2 v, float min, float max);// Check whether two given vectors are almost equal
109
- inline /* Functions may be inlined or external definition used*/ int Vector2Equals(Vector2 p, Vector2 q);//----------------------------------------------------------------------------------
111
+ inline /* Functions may be inlined or external definition used*/ int Vector2Equals(Vector2 p, Vector2 q);// Compute the direction of a refracted ray
112
+ // v: normalized direction of the incoming ray
113
+ // n: normalized normal vector of the interface of two optical media
114
+ // r: ratio of the refractive index of the medium from where the ray comes
115
+ // to the refractive index of the medium on the other side of the surface
116
+ inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Refract(Vector2 v, Vector2 n, float r);//----------------------------------------------------------------------------------
110
117
  // Module Functions Definition - Vector3 math
111
118
  //----------------------------------------------------------------------------------
112
119
  // Vector with components value 0.0f
@@ -136,8 +143,11 @@ inline /* Functions may be inlined or external definition used*/ Vector3 Vector3
136
143
  inline /* Functions may be inlined or external definition used*/ void Vector3OrthoNormalize(Vector3 *v1, Vector3 *v2);// Transforms a Vector3 by a given Matrix
137
144
  inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Transform(Vector3 v, Matrix mat);// Transform a vector by quaternion rotation
138
145
  inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q);// Rotates a vector around an axis
139
- inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);// Calculate linear interpolation between two vectors
140
- inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);// Calculate reflected vector to normal
146
+ inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);// Move Vector towards target
147
+ inline /* Functions may be inlined or external definition used*/ Vector3 Vector3MoveTowards(Vector3 v, Vector3 target, float maxDistance);// Calculate linear interpolation between two vectors
148
+ inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);// Calculate cubic hermite interpolation between two vectors and their tangents
149
+ // as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic
150
+ inline /* Functions may be inlined or external definition used*/ Vector3 Vector3CubicHermite(Vector3 v1, Vector3 tangent1, Vector3 v2, Vector3 tangent2, float amount);// Calculate reflected vector to normal
141
151
  inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Reflect(Vector3 v, Vector3 normal);// Get min value for each pair of components
142
152
  inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Min(Vector3 v1, Vector3 v2);// Get max value for each pair of components
143
153
  inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Max(Vector3 v1, Vector3 v2);// Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c)
@@ -156,6 +166,21 @@ inline /* Functions may be inlined or external definition used*/ int Vector3Equa
156
166
  // r: ratio of the refractive index of the medium from where the ray comes
157
167
  // to the refractive index of the medium on the other side of the surface
158
168
  inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Refract(Vector3 v, Vector3 n, float r);//----------------------------------------------------------------------------------
169
+ // Module Functions Definition - Vector4 math
170
+ //----------------------------------------------------------------------------------
171
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Zero(void);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4One(void);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Add(Vector4 v1, Vector4 v2);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4AddValue(Vector4 v, float add);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Subtract(Vector4 v1, Vector4 v2);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4SubtractValue(Vector4 v, float add);inline /* Functions may be inlined or external definition used*/ float Vector4Length(Vector4 v);inline /* Functions may be inlined or external definition used*/ float Vector4LengthSqr(Vector4 v);inline /* Functions may be inlined or external definition used*/ float Vector4DotProduct(Vector4 v1, Vector4 v2);// Calculate distance between two vectors
172
+ inline /* Functions may be inlined or external definition used*/ float Vector4Distance(Vector4 v1, Vector4 v2);// Calculate square distance between two vectors
173
+ inline /* Functions may be inlined or external definition used*/ float Vector4DistanceSqr(Vector4 v1, Vector4 v2);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Scale(Vector4 v, float scale);// Multiply vector by vector
174
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Multiply(Vector4 v1, Vector4 v2);// Negate vector
175
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Negate(Vector4 v);// Divide vector by vector
176
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Divide(Vector4 v1, Vector4 v2);// Normalize provided vector
177
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Normalize(Vector4 v);// Get min value for each pair of components
178
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Min(Vector4 v1, Vector4 v2);// Get max value for each pair of components
179
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Max(Vector4 v1, Vector4 v2);// Calculate linear interpolation between two vectors
180
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Lerp(Vector4 v1, Vector4 v2, float amount);// Move Vector towards target
181
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4MoveTowards(Vector4 v, Vector4 target, float maxDistance);// Invert the given vector
182
+ inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Invert(Vector4 v);// Check whether two given vectors are almost equal
183
+ inline /* Functions may be inlined or external definition used*/ int Vector4Equals(Vector4 p, Vector4 q);//----------------------------------------------------------------------------------
159
184
  // Module Functions Definition - Matrix math
160
185
  //----------------------------------------------------------------------------------
161
186
  // Compute matrix determinant
@@ -182,7 +207,7 @@ inline /* Functions may be inlined or external definition used*/ Matrix MatrixRo
182
207
  // NOTE: Angle must be provided in radians
183
208
  inline /* Functions may be inlined or external definition used*/ Matrix MatrixRotateZYX(Vector3 angle);// Get scaling matrix
184
209
  inline /* Functions may be inlined or external definition used*/ Matrix MatrixScale(float x, float y, float z);// Get perspective projection matrix
185
- inline /* Functions may be inlined or external definition used*/ Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far);// Get perspective projection matrix
210
+ inline /* Functions may be inlined or external definition used*/ Matrix MatrixFrustum(double left, double right, double bottom, double top, double nearPlane, double farPlane);// Get perspective projection matrix
186
211
  // NOTE: Fovy angle must be provided in radians
187
212
  inline /* Functions may be inlined or external definition used*/ Matrix MatrixPerspective(double fovY, double aspect, double nearPlane, double farPlane);// Get orthographic projection matrix
188
213
  inline /* Functions may be inlined or external definition used*/ Matrix MatrixOrtho(double left, double right, double bottom, double top, double nearPlane, double farPlane);// Get camera look-at matrix (view matrix)
@@ -204,7 +229,9 @@ inline /* Functions may be inlined or external definition used*/ Quaternion Quat
204
229
  inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionDivide(Quaternion q1, Quaternion q2);// Calculate linear interpolation between two quaternions
205
230
  inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount);// Calculate slerp-optimized interpolation between two quaternions
206
231
  inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount);// Calculates spherical linear interpolation between two quaternions
207
- inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);// Calculate quaternion based on the rotation from one vector to another
232
+ inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);// Calculate quaternion cubic spline interpolation using Cubic Hermite Spline algorithm
233
+ // as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic
234
+ inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionCubicHermiteSpline(Quaternion q1, Quaternion outTangent1, Quaternion q2, Quaternion inTangent2, float t);// Calculate quaternion based on the rotation from one vector to another
208
235
  inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to);// Get a quaternion for a given rotation matrix
209
236
  inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromMatrix(Matrix mat);// Get a matrix for a given quaternion
210
237
  inline /* Functions may be inlined or external definition used*/ Matrix QuaternionToMatrix(Quaternion q);// Get rotation quaternion for an angle and axis
@@ -216,4 +243,5 @@ inline /* Functions may be inlined or external definition used*/ Quaternion Quat
216
243
  // NOTE: Angles are returned in a Vector3 struct in radians
217
244
  inline /* Functions may be inlined or external definition used*/ Vector3 QuaternionToEuler(Quaternion q);// Transform a quaternion given a transformation matrix
218
245
  inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionTransform(Quaternion q, Matrix mat);// Check whether two given quaternions are almost equal
219
- inline /* Functions may be inlined or external definition used*/ int QuaternionEquals(Quaternion p, Quaternion q);
246
+ inline /* Functions may be inlined or external definition used*/ int QuaternionEquals(Quaternion p, Quaternion q);// Decompose a transformation matrix into its rotational, translational and scaling components
247
+ inline /* Functions may be inlined or external definition used*/ void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotation, Vector3 *scale);
raylib/rlgl.h.modified CHANGED
@@ -1,6 +1,6 @@
1
1
  /**********************************************************************************************
2
2
  *
3
- * rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API
3
+ * rlgl v5.0 - A multi-OpenGL abstraction layer with an immediate-mode style API
4
4
  *
5
5
  * DESCRIPTION:
6
6
  * An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
@@ -62,18 +62,21 @@
62
62
  * When loading a shader, the following vertex attributes and uniform
63
63
  * location names are tried to be set automatically:
64
64
  *
65
- * #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: 0
66
- * #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: 1
67
- * #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: 2
68
- * #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: 3
69
- * #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: 4
70
- * #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: 5
65
+ * #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION
66
+ * #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD
67
+ * #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL
68
+ * #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR
69
+ * #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT
70
+ * #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2
71
+ * #define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEIDS "vertexBoneIds" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS
72
+ * #define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS "vertexBoneWeights" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS
71
73
  * #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix
72
74
  * #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix
73
75
  * #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix
74
76
  * #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix
75
- * #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView))
77
+ * #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView)))
76
78
  * #define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color)
79
+ * #define RL_DEFAULT_SHADER_UNIFORM_NAME_BONE_MATRICES "boneMatrices" // bone matrices
77
80
  * #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0)
78
81
  * #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
79
82
  * #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
@@ -85,7 +88,7 @@
85
88
  *
86
89
  * LICENSE: zlib/libpng
87
90
  *
88
- * Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
91
+ * Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
89
92
  *
90
93
  * This software is provided "as-is", without any express or implied warranty. In no event
91
94
  * will the authors be held liable for any damages arising from the use of this software.
@@ -103,8 +106,9 @@
103
106
  * 3. This notice may not be removed or altered from any source distribution.
104
107
  *
105
108
  **********************************************************************************************/
106
- // Function specifiers in case library is build/used as a shared library (Windows)
109
+ // Function specifiers in case library is build/used as a shared library
107
110
  // NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
111
+ // NOTE: visibility(default) attribute makes symbols "visible" when compiled with -fvisibility=hidden
108
112
  // Function specifiers definition
109
113
  // Support TRACELOG macros
110
114
  // Allow custom memory allocators
@@ -133,6 +137,7 @@
133
137
  // GL Shader type
134
138
  // GL blending factors
135
139
  // GL blending functions/equations
140
+ // Default shader vertex attribute locations
136
141
  //----------------------------------------------------------------------------------
137
142
  // Types and Structures Definition
138
143
  //----------------------------------------------------------------------------------
@@ -141,10 +146,11 @@ typedef struct rlVertexBuffer {
141
146
  int elementCount; // Number of elements in the buffer (QUADS)
142
147
  float *vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
143
148
  float *texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
149
+ float *normals; // Vertex normal (XYZ - 3 components per vertex) (shader-location = 2)
144
150
  unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
145
151
  unsigned int *indices; // Vertex indices (in case vertex data comes indexed) (6 indices per quad)
146
152
  unsigned int vaoId; // OpenGL Vertex Array Object id
147
- unsigned int vboId[4]; // OpenGL Vertex Buffer Objects id (4 types of vertex data)
153
+ unsigned int vboId[5]; // OpenGL Vertex Buffer Objects id (5 types of vertex data)
148
154
  } rlVertexBuffer;
149
155
  // Draw call type
150
156
  // NOTE: Only texture changes register a new draw, other state-change-related elements are not
@@ -279,6 +285,10 @@ typedef enum {
279
285
  RL_SHADER_UNIFORM_IVEC2, // Shader uniform type: ivec2 (2 int)
280
286
  RL_SHADER_UNIFORM_IVEC3, // Shader uniform type: ivec3 (3 int)
281
287
  RL_SHADER_UNIFORM_IVEC4, // Shader uniform type: ivec4 (4 int)
288
+ RL_SHADER_UNIFORM_UINT, // Shader uniform type: unsigned int
289
+ RL_SHADER_UNIFORM_UIVEC2, // Shader uniform type: uivec2 (2 unsigned int)
290
+ RL_SHADER_UNIFORM_UIVEC3, // Shader uniform type: uivec3 (3 unsigned int)
291
+ RL_SHADER_UNIFORM_UIVEC4, // Shader uniform type: uivec4 (4 unsigned int)
282
292
  RL_SHADER_UNIFORM_SAMPLER2D // Shader uniform type: sampler2d
283
293
  } rlShaderUniformDataType;
284
294
  // Shader attribute data types
@@ -332,6 +342,9 @@ typedef enum {
332
342
  void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar);
333
343
  void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar);
334
344
  void rlViewport(int x, int y, int width, int height); // Set the viewport area
345
+ void rlSetClipPlanes(double nearPlane, double farPlane); // Set clip planes distances
346
+ double rlGetCullDistanceNear(void); // Get cull plane distance near
347
+ double rlGetCullDistanceFar(void); // Get cull plane distance far
335
348
  //------------------------------------------------------------------------------------
336
349
  // Functions Declaration - Vertex level operations
337
350
  //------------------------------------------------------------------------------------
@@ -355,10 +368,10 @@ typedef enum {
355
368
  void rlDisableVertexArray(void); // Disable vertex array (VAO, if supported)
356
369
  void rlEnableVertexBuffer(unsigned int id); // Enable vertex buffer (VBO)
357
370
  void rlDisableVertexBuffer(void); // Disable vertex buffer (VBO)
358
- void rlEnableVertexBufferElement(unsigned int id);// Enable vertex buffer element (VBO element)
371
+ void rlEnableVertexBufferElement(unsigned int id); // Enable vertex buffer element (VBO element)
359
372
  void rlDisableVertexBufferElement(void); // Disable vertex buffer element (VBO element)
360
373
  void rlEnableVertexAttribute(unsigned int index); // Enable vertex attribute index
361
- void rlDisableVertexAttribute(unsigned int index);// Disable vertex attribute index
374
+ void rlDisableVertexAttribute(unsigned int index); // Disable vertex attribute index
362
375
  // Textures state
363
376
  void rlActiveTextureSlot(int slot); // Select and active a texture slot
364
377
  void rlEnableTexture(unsigned int id); // Enable texture
@@ -373,8 +386,10 @@ typedef enum {
373
386
  // Framebuffer state
374
387
  void rlEnableFramebuffer(unsigned int id); // Enable render texture (fbo)
375
388
  void rlDisableFramebuffer(void); // Disable render texture (fbo), return to default framebuffer
389
+ unsigned int rlGetActiveFramebuffer(void); // Get the currently active render texture (fbo), 0 for default framebuffer
376
390
  void rlActiveDrawBuffers(int count); // Activate multiple draw color buffers
377
391
  void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask); // Blit active framebuffer to main framebuffer
392
+ void rlBindFramebuffer(unsigned int target, unsigned int framebuffer); // Bind framebuffer (FBO)
378
393
  // General render state
379
394
  void rlEnableColorBlend(void); // Enable color blending
380
395
  void rlDisableColorBlend(void); // Disable color blending
@@ -384,13 +399,14 @@ typedef enum {
384
399
  void rlDisableDepthMask(void); // Disable depth write
385
400
  void rlEnableBackfaceCulling(void); // Enable backface culling
386
401
  void rlDisableBackfaceCulling(void); // Disable backface culling
402
+ void rlColorMask(bool r, bool g, bool b, bool a); // Color mask control
387
403
  void rlSetCullFace(int mode); // Set face culling mode
388
404
  void rlEnableScissorTest(void); // Enable scissor test
389
405
  void rlDisableScissorTest(void); // Disable scissor test
390
406
  void rlScissor(int x, int y, int width, int height); // Scissor test
391
407
  void rlEnableWireMode(void); // Enable wire mode
392
- void rlEnablePointMode(void); // Enable point mode
393
- void rlDisableWireMode(void); // Disable wire mode ( and point ) maybe rename
408
+ void rlEnablePointMode(void); // Enable point mode
409
+ void rlDisableWireMode(void); // Disable wire (and point) mode
394
410
  void rlSetLineWidth(float width); // Set the line drawing width
395
411
  float rlGetLineWidth(void); // Get the line drawing width
396
412
  void rlEnableSmoothLines(void); // Enable line aliasing
@@ -432,24 +448,24 @@ typedef enum {
432
448
  //------------------------------------------------------------------------------------------------------------------------
433
449
  // Vertex buffers management
434
450
  unsigned int rlLoadVertexArray(void); // Load vertex array (vao) if supported
435
- unsigned int rlLoadVertexBuffer(const void *buffer, int size, bool dynamic); // Load a vertex buffer attribute
436
- unsigned int rlLoadVertexBufferElement(const void *buffer, int size, bool dynamic); // Load a new attributes element buffer
437
- void rlUpdateVertexBuffer(unsigned int bufferId, const void *data, int dataSize, int offset); // Update GPU buffer with new data
438
- void rlUpdateVertexBufferElements(unsigned int id, const void *data, int dataSize, int offset); // Update vertex buffer elements with new data
439
- void rlUnloadVertexArray(unsigned int vaoId);
440
- void rlUnloadVertexBuffer(unsigned int vboId);
441
- void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, const void *pointer);
442
- void rlSetVertexAttributeDivisor(unsigned int index, int divisor);
443
- void rlSetVertexAttributeDefault(int locIndex, const void *value, int attribType, int count); // Set vertex attribute default value
444
- void rlDrawVertexArray(int offset, int count);
445
- void rlDrawVertexArrayElements(int offset, int count, const void *buffer);
446
- void rlDrawVertexArrayInstanced(int offset, int count, int instances);
447
- void rlDrawVertexArrayElementsInstanced(int offset, int count, const void *buffer, int instances);
451
+ unsigned int rlLoadVertexBuffer(const void *buffer, int size, bool dynamic); // Load a vertex buffer object
452
+ unsigned int rlLoadVertexBufferElement(const void *buffer, int size, bool dynamic); // Load vertex buffer elements object
453
+ void rlUpdateVertexBuffer(unsigned int bufferId, const void *data, int dataSize, int offset); // Update vertex buffer object data on GPU buffer
454
+ void rlUpdateVertexBufferElements(unsigned int id, const void *data, int dataSize, int offset); // Update vertex buffer elements data on GPU buffer
455
+ void rlUnloadVertexArray(unsigned int vaoId); // Unload vertex array (vao)
456
+ void rlUnloadVertexBuffer(unsigned int vboId); // Unload vertex buffer object
457
+ void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, int offset); // Set vertex attribute data configuration
458
+ void rlSetVertexAttributeDivisor(unsigned int index, int divisor); // Set vertex attribute data divisor
459
+ void rlSetVertexAttributeDefault(int locIndex, const void *value, int attribType, int count); // Set vertex attribute default value, when attribute to provided
460
+ void rlDrawVertexArray(int offset, int count); // Draw vertex array (currently active vao)
461
+ void rlDrawVertexArrayElements(int offset, int count, const void *buffer); // Draw vertex array elements
462
+ void rlDrawVertexArrayInstanced(int offset, int count, int instances); // Draw vertex array (currently active vao) with instancing
463
+ void rlDrawVertexArrayElementsInstanced(int offset, int count, const void *buffer, int instances); // Draw vertex array elements with instancing
448
464
  // Textures management
449
- unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount); // Load texture in GPU
465
+ unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount); // Load texture data
450
466
  unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer); // Load depth texture/renderbuffer (to be attached to fbo)
451
- unsigned int rlLoadTextureCubemap(const void *data, int size, int format); // Load texture cubemap
452
- void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data); // Update GPU texture with new data
467
+ unsigned int rlLoadTextureCubemap(const void *data, int size, int format); // Load texture cubemap data
468
+ void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data); // Update texture with new data on GPU
453
469
  void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType); // Get OpenGL internal formats
454
470
  const char *rlGetPixelFormatName(unsigned int format); // Get name string for pixel format
455
471
  void rlUnloadTexture(unsigned int id); // Unload texture from GPU memory
@@ -457,7 +473,7 @@ typedef enum {
457
473
  void *rlReadTexturePixels(unsigned int id, int width, int height, int format); // Read texture pixel data
458
474
  unsigned char *rlReadScreenPixels(int width, int height); // Read screen pixel data (color buffer)
459
475
  // Framebuffer management (fbo)
460
- unsigned int rlLoadFramebuffer(int width, int height); // Load an empty framebuffer
476
+ unsigned int rlLoadFramebuffer(void); // Load an empty framebuffer
461
477
  void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType, int texType, int mipLevel); // Attach texture/renderbuffer to a framebuffer
462
478
  bool rlFramebufferComplete(unsigned int id); // Verify framebuffer is complete
463
479
  void rlUnloadFramebuffer(unsigned int id); // Delete framebuffer from GPU
@@ -470,6 +486,7 @@ typedef enum {
470
486
  int rlGetLocationAttrib(unsigned int shaderId, const char *attribName); // Get shader location attribute
471
487
  void rlSetUniform(int locIndex, const void *value, int uniformType, int count); // Set shader value uniform
472
488
  void rlSetUniformMatrix(int locIndex, Matrix mat); // Set shader value matrix
489
+ void rlSetUniformMatrices(int locIndex, const Matrix *mat, int count); // Set shader value matrices
473
490
  void rlSetUniformSampler(int locIndex, unsigned int textureId); // Set shader value sampler
474
491
  void rlSetShader(unsigned int id, int *locs); // Set shader currently active (id and locations)
475
492
  // Compute shader management
raylib/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "5.0.0.4"
1
+ __version__ = "5.5.0.0.dev3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: raylib
3
- Version: 5.0.0.4
3
+ Version: 5.5.0.0.dev3
4
4
  Summary: Python CFFI bindings for Raylib
5
5
  Home-page: https://github.com/electronstudio/raylib-python-cffi
6
6
  Author: Electron Studio
@@ -19,9 +19,11 @@ Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
20
  Requires-Dist: cffi>=1.17.1
21
21
 
22
- # Python Bindings for Raylib 5.0
22
+ # Python Bindings for Raylib 5.5
23
+ ## Libraries: raymath, raygui, rlgl, physac and GLFW
24
+ ## Backends: Desktop, SDL, DRM, Web
23
25
 
24
- Chatroom: [Discord](https://discord.gg/fKDwt85aX6) or [Matrix](https://matrix.to/#/#raylib-python-cffi:matrix.org)
26
+ Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
25
27
 
26
28
  New CFFI API static bindings.
27
29
  * Automatically generated to be as close as possible to
@@ -29,23 +31,23 @@ original Raylib.
29
31
  * Faster, fewer bugs and easier to maintain than ctypes.
30
32
  * Commercial-friendly license.
31
33
  * Docstrings and auto-completion.
32
- * **Now includes extra libraries: raymath, raygui, rlgl, physac and GLFW**
34
+
33
35
 
34
36
  [Full documentation](http://electronstudio.github.io/raylib-python-cffi)
35
37
 
36
38
  # Quickstart
37
39
 
38
- `pip3 install raylib`
39
-
40
- from pyray import *
41
- init_window(800, 450, "Hello")
42
- while not window_should_close():
43
- begin_drawing()
44
- clear_background(WHITE)
45
- draw_text("Hello world", 190, 200, 20, VIOLET)
46
- end_drawing()
47
- close_window()
48
-
40
+ `pip3 install raylib==5.0.0.4`
41
+ ```python
42
+ from pyray import *
43
+ init_window(800, 450, "Hello")
44
+ while not window_should_close():
45
+ begin_drawing()
46
+ clear_background(WHITE)
47
+ draw_text("Hello world", 190, 200, 20, VIOLET)
48
+ end_drawing()
49
+ close_window()
50
+ ```
49
51
 
50
52
  # Installation
51
53
 
@@ -56,13 +58,41 @@ First make sure you have the latest pip installed:
56
58
  Then install
57
59
 
58
60
  python3 -m pip install setuptools
59
- python3 -m pip install raylib
60
-
61
- On most platforms it should install a binary wheel (Windows 10 x64, MacOS 12 x64/arm64, Linux Ubuntu2004 x64/arm64).
61
+ python3 -m pip install raylib==5.0.0.4
62
62
 
63
- If yours isn't available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g.
63
+ On most platforms it should install a binary wheel. If yours isn't available then pip will attempt to build from
64
+ source, in which case you will need to have Raylib development libs installed, e.g.
64
65
  using homebrew, apt, etc.
65
66
 
67
+ ## Windows
68
+
69
+ Binaries require x64 Windows 10 or newer. (For x86 or older Windows you will have to build from source.)
70
+
71
+ Use an [official Windows Python release](https://www.python.org/downloads/windows/) rather than WSL, MSYS, etc.
72
+
73
+ ## MacOS
74
+
75
+ Binaries require:
76
+ * arm64 MacOS 14
77
+ * x64 MacOS 10.13, or newer.
78
+
79
+ Older MacOS requires building from source but this is usually simple:
80
+
81
+ brew install pkg-config
82
+ brew install raylib
83
+ python3 -m pip install raylib==5.0.0.4
84
+
85
+ (I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
86
+ if you want to test them.)
87
+
88
+ ## Linux
89
+
90
+ Binaries require OS newer than Ubuntu 2020, x64 or arm64. Otherwise build from source.
91
+ (Pip should attempt automatically but will need Raylib itself installed and also pkg-config.)
92
+
93
+ The arm64 binaries are built on Raspberry Pi arm64 Bullseye with OpenGL 2.0
94
+ so may not work on other boards.
95
+
66
96
  ## Raspberry Pi
67
97
 
68
98
  [Using on Rasperry Pi](RPI.rst)
@@ -71,38 +101,52 @@ using homebrew, apt, etc.
71
101
 
72
102
  There is now a separate dynamic version of this binding:
73
103
 
104
+ python3 -m pip uninstall raylib
74
105
  python3 -m pip install raylib_dynamic
75
106
 
76
107
  It works on some systems where the static version doesn't, [but be sure to read these caveats before using it](https://electronstudio.github.io/raylib-python-cffi/dynamic.html)
77
108
 
78
- ## Beta testing
109
+ ## SDL backend
110
+
111
+ This is not well tested but has better support for controllers:
112
+
113
+ python3 -m pip uninstall raylib
114
+ python3 -m pip install raylib_sdl
115
+
116
+ You can't have multiple raylib packages installed at once.
117
+
118
+ ## DRM backend
119
+
120
+ This uses the Linux framebuffer for devices that don't run X11/Wayland:
79
121
 
80
- If you find a bug, it may be fixed in the [latest dev release](https://github.com/electronstudio/raylib-python-cffi/releases).
81
- You can install an alpha or beta version by specifying the exact version number like this:
122
+ python3 -m pip uninstall raylib
123
+ python3 -m pip install raylib_drm
82
124
 
83
- python3 -m pip install raylib==4.2.0.0.dev4
125
+ You can't have multiple raylib packages installed at once.
84
126
 
85
127
  ## Problems?
86
128
 
87
129
  If it doesn't work, [try to build manually.](BUILDING.rst). If that works then [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues)
88
130
  to let us know what you did.
89
131
 
90
- If you need help you can try asking [on Discord](https://discord.gg/raylib).
132
+ If you need help you can try asking on [our discord](https://discord.gg/fKDwt85aX6). There is also a large [Raylib discord](https://discord.gg/raylib)
133
+ for issues that are not Python-specific.
91
134
 
92
135
  If it still doesn't work, [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues).
93
136
 
94
137
 
95
138
  # How to use
96
139
 
97
- There are two APIs, you can use either or both:
140
+ There are two modules in the raylib package, `raylib` and `pyray`. (There is no separate package for
141
+ pyray). You can use either or both:
98
142
 
99
143
  ### If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API
100
144
 
101
- Use [the C API](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
145
+ Use [the raylib module](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
102
146
 
103
- ### If you prefer a slightly more Pythonistic API and don't mind it might be slightly slower
147
+ ### If you prefer a more Pythonistic API
104
148
 
105
- Use [the Python API](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
149
+ Use [the pyray module](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
106
150
 
107
151
  # Running in a web browser
108
152
 
@@ -164,9 +208,9 @@ A related library (that is a work in progress!):
164
208
  * Converting more examples from C to Python
165
209
  * Testing on more platforms
166
210
 
167
- # License (updated)
211
+ # License
168
212
 
169
- The bindings are now under the Eclipse Public License, so you are free to
213
+ Eclipse Public License, so you are free to
170
214
  statically link and use in non-free / proprietary / commercial projects!
171
215
 
172
216
  # Performance
@@ -0,0 +1,21 @@
1
+ pyray/__init__.py,sha256=6sEm8KxRaK2B2PQo7ZlbXkHoxBDLW43wYSs_Cl7rUMg,7119
2
+ pyray/__init__.pyi,sha256=FcO-AAvJVTyfYlM5ddXSAXTP3y0J5lj7lYz6ZjBxVxM,158204
3
+ raylib/__init__.py,sha256=DWXPmoq7tC5wzZsrt6rReGy1RflyZwk-SdF-9lBZHok,919
4
+ raylib/__init__.pyi,sha256=0jozQX2T1oJgjIF65v0x1BaMDaAxcgoSMIyI_khuKj8,146157
5
+ raylib/_raylib_cffi.cpython-311-x86_64-linux-gnu.so,sha256=gEewhKJxaXMJIoDAJF6YvPUeDwi0hkTLQvvjaqjl-60,6383360
6
+ raylib/build.py,sha256=vF0eAp5y3CZv6dLM-4EQnXWmkXwohQ9Z17vTy9AD2cY,9964
7
+ raylib/colors.py,sha256=_u-mYrpdx7_v_4wnJrnSu_m36ixKJWbort780_V6rTw,1523
8
+ raylib/defines.py,sha256=_brO9OSA1Kzg9aiGXhiYyMmiJxbOkvHU_kLjLLNLJB4,16983
9
+ raylib/enums.py,sha256=pT4AwJYqrjVKVyWtYdgDStGY35X1q-pT7kEP3jPxTkk,17818
10
+ raylib/glfw3.h.modified,sha256=jC6-1XuWxG2FMnRhuXTKuI7KIEhPTwwO2OtNGEDOcvs,213261
11
+ raylib/physac.h.modified,sha256=UG9-bqfL71k4MxaW3DcaP9a5Mcga66CrufVHaUhgYjM,9724
12
+ raylib/raygui.h.modified,sha256=75djppnwPjTjTfNVcUaXKxGau2PqUisL9oy_yVXQgV8,46107
13
+ raylib/raylib.h.modified,sha256=HNhnWJtQrifFgqGxo9bljHC9bgrf8uH_n6jMwg-uOpY,104779
14
+ raylib/raymath.h.modified,sha256=jV6K62Nck8nTv89pqJoBVMouhwuj4yJAodjP7fQk128,28166
15
+ raylib/rlgl.h.modified,sha256=CWlw2nho5Yzn-CizWGqhEVNfp4_lFB30HjSlV6he1EM,36729
16
+ raylib/version.py,sha256=xA5FaUfbrXveqp9pWJaECG35S4zfEyItHUpEpZUlYGE,28
17
+ raylib-5.5.0.0.dev3.dist-info/LICENSE,sha256=C-zxZWe-t3-iUrdmRjHdF3yPmhiJ5ImVtFN5xxMOUwM,14198
18
+ raylib-5.5.0.0.dev3.dist-info/METADATA,sha256=TonyD-nnB4muy2lJgk-KX99hWZOugc79u0jltOaYZm0,9189
19
+ raylib-5.5.0.0.dev3.dist-info/WHEEL,sha256=psqLctY23KHVzJBRA0eV4Xgo09aO-tWXBAEHEiSxnw8,113
20
+ raylib-5.5.0.0.dev3.dist-info/top_level.txt,sha256=PnMBDWaUP4jsbn_NewagcC9FjHYpzSAIQuhxNzt9hkg,13
21
+ raylib-5.5.0.0.dev3.dist-info/RECORD,,
@@ -1,21 +0,0 @@
1
- pyray/__init__.py,sha256=6sEm8KxRaK2B2PQo7ZlbXkHoxBDLW43wYSs_Cl7rUMg,7119
2
- pyray/__init__.pyi,sha256=NzZYOclAa6OEJkekHN704GI9AKnAXh-YrSv_QR-1TQg,149512
3
- raylib/__init__.py,sha256=zTSGLz_KdS8jJZKAXOGeaaWHZZPsrmFKAwxRt4iDFvU,1193
4
- raylib/__init__.pyi,sha256=3YBqdluKw1mXCDJI_vkp188Y7N2uxd3FKMHGJ6xlx0I,137557
5
- raylib/_raylib_cffi.cpython-311-x86_64-linux-gnu.so,sha256=vm-bNIQCeh8I_VoSi7jtc-TnoiFEBdMAINPzKrSiDRM,6184688
6
- raylib/build.py,sha256=2ALzT9DBkpN8qReIarxFcAlVJ3fcrmxpZBX2CEm7QRQ,8679
7
- raylib/colors.py,sha256=_u-mYrpdx7_v_4wnJrnSu_m36ixKJWbort780_V6rTw,1523
8
- raylib/defines.py,sha256=lMv6zU8WSkaH5Dj5Ydx0AlggeA-r76xePcA1M7EudnA,15951
9
- raylib/enums.py,sha256=RtQpN23zViI2mQSHPPc0Ay4IvNdiDk_xggdMPLCR0ng,17586
10
- raylib/glfw3.h.modified,sha256=6VQbQFZxwFW4_Vd-M_s9Grc4tHz3sjjDbCw4kZQ7etc,207625
11
- raylib/physac.h.modified,sha256=UG9-bqfL71k4MxaW3DcaP9a5Mcga66CrufVHaUhgYjM,9724
12
- raylib/raygui.h.modified,sha256=5NKMOQHYZsoD51ewmIezTkNuTKdERqde486NXjbys6M,44607
13
- raylib/raylib.h.modified,sha256=T2j__nsY816A5hVeVeMZhdB9Lb3Ye5f2ui6UpzGL8_k,100092
14
- raylib/raymath.h.modified,sha256=GaiB8wHjC-Hzfx7DWrK9geLH555QFBJyAMszTWP9q0g,23185
15
- raylib/rlgl.h.modified,sha256=S-RbGmpmLHWA8jhzmeC3UT31moQThb2Fs3To8t3cnu8,34594
16
- raylib/version.py,sha256=7YmbDFmWZPZKOZqitJnrUneL1FBdpe2uqlQyUxEp7QY,23
17
- raylib-5.0.0.4.dist-info/LICENSE,sha256=C-zxZWe-t3-iUrdmRjHdF3yPmhiJ5ImVtFN5xxMOUwM,14198
18
- raylib-5.0.0.4.dist-info/METADATA,sha256=Vc3oE0IXmcCn4eX7BpoXBclnI4BWO5QviFT4pdCV1NE,8070
19
- raylib-5.0.0.4.dist-info/WHEEL,sha256=psqLctY23KHVzJBRA0eV4Xgo09aO-tWXBAEHEiSxnw8,113
20
- raylib-5.0.0.4.dist-info/top_level.txt,sha256=PnMBDWaUP4jsbn_NewagcC9FjHYpzSAIQuhxNzt9hkg,13
21
- raylib-5.0.0.4.dist-info/RECORD,,