raylib 5.5.0.4__cp312-cp312-manylinux2014_x86_64.manylinux_2_17_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.
- pyray/__init__.py +159 -0
- pyray/__init__.pyi +4555 -0
- pyray/py.typed +0 -0
- raylib/__init__.py +34 -0
- raylib/__init__.pyi +4423 -0
- raylib/_raylib_cffi.cpython-312-x86_64-linux-gnu.so +0 -0
- raylib/build.py +327 -0
- raylib/colors.py +41 -0
- raylib/defines.py +508 -0
- raylib/enums.py +759 -0
- raylib/glfw3.h.modified +5618 -0
- raylib/physac.h.modified +171 -0
- raylib/py.typed +0 -0
- raylib/raygui.h.modified +865 -0
- raylib/raylib.h.modified +1448 -0
- raylib/raymath.h.modified +249 -0
- raylib/rlgl.h.modified +522 -0
- raylib/version.py +1 -0
- raylib-5.5.0.4.dist-info/METADATA +316 -0
- raylib-5.5.0.4.dist-info/RECORD +23 -0
- raylib-5.5.0.4.dist-info/WHEEL +6 -0
- raylib-5.5.0.4.dist-info/licenses/LICENSE +277 -0
- raylib-5.5.0.4.dist-info/top_level.txt +2 -0
raylib/rlgl.h.modified
ADDED
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
/**********************************************************************************************
|
|
2
|
+
*
|
|
3
|
+
* rlgl v5.0 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
|
4
|
+
*
|
|
5
|
+
* DESCRIPTION:
|
|
6
|
+
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0, ES 3.0)
|
|
7
|
+
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
|
|
8
|
+
*
|
|
9
|
+
* ADDITIONAL NOTES:
|
|
10
|
+
* When choosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
|
|
11
|
+
* initialized on rlglInit() to accumulate vertex data
|
|
12
|
+
*
|
|
13
|
+
* When an internal state change is required all the stored vertex data is renderer in batch,
|
|
14
|
+
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch
|
|
15
|
+
*
|
|
16
|
+
* Some resources are also loaded for convenience, here the complete list:
|
|
17
|
+
* - Default batch (RLGL.defaultBatch): RenderBatch system to accumulate vertex data
|
|
18
|
+
* - Default texture (RLGL.defaultTextureId): 1x1 white pixel R8G8B8A8
|
|
19
|
+
* - Default shader (RLGL.State.defaultShaderId, RLGL.State.defaultShaderLocs)
|
|
20
|
+
*
|
|
21
|
+
* Internal buffer (and resources) must be manually unloaded calling rlglClose()
|
|
22
|
+
*
|
|
23
|
+
* CONFIGURATION:
|
|
24
|
+
* #define GRAPHICS_API_OPENGL_11
|
|
25
|
+
* #define GRAPHICS_API_OPENGL_21
|
|
26
|
+
* #define GRAPHICS_API_OPENGL_33
|
|
27
|
+
* #define GRAPHICS_API_OPENGL_43
|
|
28
|
+
* #define GRAPHICS_API_OPENGL_ES2
|
|
29
|
+
* #define GRAPHICS_API_OPENGL_ES3
|
|
30
|
+
* Use selected OpenGL graphics backend, should be supported by platform
|
|
31
|
+
* Those preprocessor defines are only used on rlgl module, if OpenGL version is
|
|
32
|
+
* required by any other module, use rlGetVersion() to check it
|
|
33
|
+
*
|
|
34
|
+
* #define RLGL_IMPLEMENTATION
|
|
35
|
+
* Generates the implementation of the library into the included file
|
|
36
|
+
* If not defined, the library is in header only mode and can be included in other headers
|
|
37
|
+
* or source files without problems. But only ONE file should hold the implementation
|
|
38
|
+
*
|
|
39
|
+
* #define RLGL_RENDER_TEXTURES_HINT
|
|
40
|
+
* Enable framebuffer objects (fbo) support (enabled by default)
|
|
41
|
+
* Some GPUs could not support them despite the OpenGL version
|
|
42
|
+
*
|
|
43
|
+
* #define RLGL_SHOW_GL_DETAILS_INFO
|
|
44
|
+
* Show OpenGL extensions and capabilities detailed logs on init
|
|
45
|
+
*
|
|
46
|
+
* #define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
|
|
47
|
+
* Enable debug context (only available on OpenGL 4.3)
|
|
48
|
+
*
|
|
49
|
+
* rlgl capabilities could be customized just defining some internal
|
|
50
|
+
* values before library inclusion (default values listed):
|
|
51
|
+
*
|
|
52
|
+
* #define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 8192 // Default internal render batch elements limits
|
|
53
|
+
* #define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
|
|
54
|
+
* #define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture)
|
|
55
|
+
* #define RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS 4 // Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
|
|
56
|
+
*
|
|
57
|
+
* #define RL_MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack
|
|
58
|
+
* #define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported
|
|
59
|
+
* #define RL_CULL_DISTANCE_NEAR 0.01 // Default projection matrix near cull distance
|
|
60
|
+
* #define RL_CULL_DISTANCE_FAR 1000.0 // Default projection matrix far cull distance
|
|
61
|
+
*
|
|
62
|
+
* When loading a shader, the following vertex attributes and uniform
|
|
63
|
+
* location names are tried to be set automatically:
|
|
64
|
+
*
|
|
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
|
|
73
|
+
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix
|
|
74
|
+
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix
|
|
75
|
+
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix
|
|
76
|
+
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix
|
|
77
|
+
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView)))
|
|
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
|
|
80
|
+
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0)
|
|
81
|
+
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
|
|
82
|
+
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
|
|
83
|
+
*
|
|
84
|
+
* DEPENDENCIES:
|
|
85
|
+
* - OpenGL libraries (depending on platform and OpenGL version selected)
|
|
86
|
+
* - GLAD OpenGL extensions loading library (only for OpenGL 3.3 Core, 4.3 Core)
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
* LICENSE: zlib/libpng
|
|
90
|
+
*
|
|
91
|
+
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
|
92
|
+
*
|
|
93
|
+
* This software is provided "as-is", without any express or implied warranty. In no event
|
|
94
|
+
* will the authors be held liable for any damages arising from the use of this software.
|
|
95
|
+
*
|
|
96
|
+
* Permission is granted to anyone to use this software for any purpose, including commercial
|
|
97
|
+
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
|
98
|
+
*
|
|
99
|
+
* 1. The origin of this software must not be misrepresented; you must not claim that you
|
|
100
|
+
* wrote the original software. If you use this software in a product, an acknowledgment
|
|
101
|
+
* in the product documentation would be appreciated but is not required.
|
|
102
|
+
*
|
|
103
|
+
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
|
|
104
|
+
* as being the original software.
|
|
105
|
+
*
|
|
106
|
+
* 3. This notice may not be removed or altered from any source distribution.
|
|
107
|
+
*
|
|
108
|
+
**********************************************************************************************/
|
|
109
|
+
// Function specifiers in case library is build/used as a shared library
|
|
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
|
|
112
|
+
// Function specifiers definition
|
|
113
|
+
// Support TRACELOG macros
|
|
114
|
+
// Allow custom memory allocators
|
|
115
|
+
// Security check in case no GRAPHICS_API_OPENGL_* defined
|
|
116
|
+
// Security check in case multiple GRAPHICS_API_OPENGL_* defined
|
|
117
|
+
// OpenGL 2.1 uses most of OpenGL 3.3 Core functionality
|
|
118
|
+
// WARNING: Specific parts are checked with #if defines
|
|
119
|
+
// OpenGL 4.3 uses OpenGL 3.3 Core functionality
|
|
120
|
+
// OpenGL ES 3.0 uses OpenGL ES 2.0 functionality (and more)
|
|
121
|
+
// Support framebuffer objects by default
|
|
122
|
+
// NOTE: Some driver implementation do not support it, despite they should
|
|
123
|
+
//----------------------------------------------------------------------------------
|
|
124
|
+
// Defines and Macros
|
|
125
|
+
//----------------------------------------------------------------------------------
|
|
126
|
+
// Default internal render batch elements limits
|
|
127
|
+
// This is the maximum amount of elements (quads) per batch
|
|
128
|
+
// NOTE: Be careful with text, every letter maps to a quad
|
|
129
|
+
// Internal Matrix stack
|
|
130
|
+
// Shader limits
|
|
131
|
+
// Projection matrix culling
|
|
132
|
+
// Texture parameters (equivalent to OpenGL defines)
|
|
133
|
+
// Matrix modes (equivalent to OpenGL)
|
|
134
|
+
// Primitive assembly draw modes
|
|
135
|
+
// GL equivalent data types
|
|
136
|
+
// GL buffer usage hint
|
|
137
|
+
// GL Shader type
|
|
138
|
+
// GL blending factors
|
|
139
|
+
// GL blending functions/equations
|
|
140
|
+
// Default shader vertex attribute locations
|
|
141
|
+
//----------------------------------------------------------------------------------
|
|
142
|
+
// Types and Structures Definition
|
|
143
|
+
//----------------------------------------------------------------------------------
|
|
144
|
+
// Dynamic vertex buffers (position + texcoords + colors + indices arrays)
|
|
145
|
+
typedef struct rlVertexBuffer {
|
|
146
|
+
int elementCount; // Number of elements in the buffer (QUADS)
|
|
147
|
+
float *vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
|
|
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)
|
|
150
|
+
unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
|
|
151
|
+
unsigned int *indices; // Vertex indices (in case vertex data comes indexed) (6 indices per quad)
|
|
152
|
+
unsigned int vaoId; // OpenGL Vertex Array Object id
|
|
153
|
+
unsigned int vboId[5]; // OpenGL Vertex Buffer Objects id (5 types of vertex data)
|
|
154
|
+
} rlVertexBuffer;
|
|
155
|
+
// Draw call type
|
|
156
|
+
// NOTE: Only texture changes register a new draw, other state-change-related elements are not
|
|
157
|
+
// used at this moment (vaoId, shaderId, matrices), raylib just forces a batch draw call if any
|
|
158
|
+
// of those state-change happens (this is done in core module)
|
|
159
|
+
typedef struct rlDrawCall {
|
|
160
|
+
int mode; // Drawing mode: LINES, TRIANGLES, QUADS
|
|
161
|
+
int vertexCount; // Number of vertex of the draw
|
|
162
|
+
int vertexAlignment; // Number of vertex required for index alignment (LINES, TRIANGLES)
|
|
163
|
+
//unsigned int vaoId; // Vertex array id to be used on the draw -> Using RLGL.currentBatch->vertexBuffer.vaoId
|
|
164
|
+
//unsigned int shaderId; // Shader id to be used on the draw -> Using RLGL.currentShaderId
|
|
165
|
+
unsigned int textureId; // Texture id to be used on the draw -> Use to create new draw call if changes
|
|
166
|
+
//Matrix projection; // Projection matrix for this draw -> Using RLGL.projection by default
|
|
167
|
+
//Matrix modelview; // Modelview matrix for this draw -> Using RLGL.modelview by default
|
|
168
|
+
} rlDrawCall;
|
|
169
|
+
// rlRenderBatch type
|
|
170
|
+
typedef struct rlRenderBatch {
|
|
171
|
+
int bufferCount; // Number of vertex buffers (multi-buffering support)
|
|
172
|
+
int currentBuffer; // Current buffer tracking in case of multi-buffering
|
|
173
|
+
rlVertexBuffer *vertexBuffer; // Dynamic buffer(s) for vertex data
|
|
174
|
+
rlDrawCall *draws; // Draw calls array, depends on textureId
|
|
175
|
+
int drawCounter; // Draw calls counter
|
|
176
|
+
float currentDepth; // Current depth value for next draw
|
|
177
|
+
} rlRenderBatch;
|
|
178
|
+
// OpenGL version
|
|
179
|
+
typedef enum {
|
|
180
|
+
RL_OPENGL_11 = 1, // OpenGL 1.1
|
|
181
|
+
RL_OPENGL_21, // OpenGL 2.1 (GLSL 120)
|
|
182
|
+
RL_OPENGL_33, // OpenGL 3.3 (GLSL 330)
|
|
183
|
+
RL_OPENGL_43, // OpenGL 4.3 (using GLSL 330)
|
|
184
|
+
RL_OPENGL_ES_20, // OpenGL ES 2.0 (GLSL 100)
|
|
185
|
+
RL_OPENGL_ES_30 // OpenGL ES 3.0 (GLSL 300 es)
|
|
186
|
+
} rlGlVersion;
|
|
187
|
+
// Trace log level
|
|
188
|
+
// NOTE: Organized by priority level
|
|
189
|
+
typedef enum {
|
|
190
|
+
RL_LOG_ALL = 0, // Display all logs
|
|
191
|
+
RL_LOG_TRACE, // Trace logging, intended for internal use only
|
|
192
|
+
RL_LOG_DEBUG, // Debug logging, used for internal debugging, it should be disabled on release builds
|
|
193
|
+
RL_LOG_INFO, // Info logging, used for program execution info
|
|
194
|
+
RL_LOG_WARNING, // Warning logging, used on recoverable failures
|
|
195
|
+
RL_LOG_ERROR, // Error logging, used on unrecoverable failures
|
|
196
|
+
RL_LOG_FATAL, // Fatal logging, used to abort program: exit(EXIT_FAILURE)
|
|
197
|
+
RL_LOG_NONE // Disable logging
|
|
198
|
+
} rlTraceLogLevel;
|
|
199
|
+
// Texture pixel formats
|
|
200
|
+
// NOTE: Support depends on OpenGL version
|
|
201
|
+
typedef enum {
|
|
202
|
+
RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, // 8 bit per pixel (no alpha)
|
|
203
|
+
RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA, // 8*2 bpp (2 channels)
|
|
204
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5, // 16 bpp
|
|
205
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8, // 24 bpp
|
|
206
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha)
|
|
207
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha)
|
|
208
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, // 32 bpp
|
|
209
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R32, // 32 bpp (1 channel - float)
|
|
210
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32, // 32*3 bpp (3 channels - float)
|
|
211
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, // 32*4 bpp (4 channels - float)
|
|
212
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R16, // 16 bpp (1 channel - half float)
|
|
213
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16, // 16*3 bpp (3 channels - half float)
|
|
214
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16, // 16*4 bpp (4 channels - half float)
|
|
215
|
+
RL_PIXELFORMAT_COMPRESSED_DXT1_RGB, // 4 bpp (no alpha)
|
|
216
|
+
RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha)
|
|
217
|
+
RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA, // 8 bpp
|
|
218
|
+
RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA, // 8 bpp
|
|
219
|
+
RL_PIXELFORMAT_COMPRESSED_ETC1_RGB, // 4 bpp
|
|
220
|
+
RL_PIXELFORMAT_COMPRESSED_ETC2_RGB, // 4 bpp
|
|
221
|
+
RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA, // 8 bpp
|
|
222
|
+
RL_PIXELFORMAT_COMPRESSED_PVRT_RGB, // 4 bpp
|
|
223
|
+
RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA, // 4 bpp
|
|
224
|
+
RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA, // 8 bpp
|
|
225
|
+
RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA // 2 bpp
|
|
226
|
+
} rlPixelFormat;
|
|
227
|
+
// Texture parameters: filter mode
|
|
228
|
+
// NOTE 1: Filtering considers mipmaps if available in the texture
|
|
229
|
+
// NOTE 2: Filter is accordingly set for minification and magnification
|
|
230
|
+
typedef enum {
|
|
231
|
+
RL_TEXTURE_FILTER_POINT = 0, // No filter, just pixel approximation
|
|
232
|
+
RL_TEXTURE_FILTER_BILINEAR, // Linear filtering
|
|
233
|
+
RL_TEXTURE_FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps)
|
|
234
|
+
RL_TEXTURE_FILTER_ANISOTROPIC_4X, // Anisotropic filtering 4x
|
|
235
|
+
RL_TEXTURE_FILTER_ANISOTROPIC_8X, // Anisotropic filtering 8x
|
|
236
|
+
RL_TEXTURE_FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x
|
|
237
|
+
} rlTextureFilter;
|
|
238
|
+
// Color blending modes (pre-defined)
|
|
239
|
+
typedef enum {
|
|
240
|
+
RL_BLEND_ALPHA = 0, // Blend textures considering alpha (default)
|
|
241
|
+
RL_BLEND_ADDITIVE, // Blend textures adding colors
|
|
242
|
+
RL_BLEND_MULTIPLIED, // Blend textures multiplying colors
|
|
243
|
+
RL_BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
|
|
244
|
+
RL_BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
|
|
245
|
+
RL_BLEND_ALPHA_PREMULTIPLY, // Blend premultiplied textures considering alpha
|
|
246
|
+
RL_BLEND_CUSTOM, // Blend textures using custom src/dst factors (use rlSetBlendFactors())
|
|
247
|
+
RL_BLEND_CUSTOM_SEPARATE // Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate())
|
|
248
|
+
} rlBlendMode;
|
|
249
|
+
// Shader location point type
|
|
250
|
+
typedef enum {
|
|
251
|
+
RL_SHADER_LOC_VERTEX_POSITION = 0, // Shader location: vertex attribute: position
|
|
252
|
+
RL_SHADER_LOC_VERTEX_TEXCOORD01, // Shader location: vertex attribute: texcoord01
|
|
253
|
+
RL_SHADER_LOC_VERTEX_TEXCOORD02, // Shader location: vertex attribute: texcoord02
|
|
254
|
+
RL_SHADER_LOC_VERTEX_NORMAL, // Shader location: vertex attribute: normal
|
|
255
|
+
RL_SHADER_LOC_VERTEX_TANGENT, // Shader location: vertex attribute: tangent
|
|
256
|
+
RL_SHADER_LOC_VERTEX_COLOR, // Shader location: vertex attribute: color
|
|
257
|
+
RL_SHADER_LOC_MATRIX_MVP, // Shader location: matrix uniform: model-view-projection
|
|
258
|
+
RL_SHADER_LOC_MATRIX_VIEW, // Shader location: matrix uniform: view (camera transform)
|
|
259
|
+
RL_SHADER_LOC_MATRIX_PROJECTION, // Shader location: matrix uniform: projection
|
|
260
|
+
RL_SHADER_LOC_MATRIX_MODEL, // Shader location: matrix uniform: model (transform)
|
|
261
|
+
RL_SHADER_LOC_MATRIX_NORMAL, // Shader location: matrix uniform: normal
|
|
262
|
+
RL_SHADER_LOC_VECTOR_VIEW, // Shader location: vector uniform: view
|
|
263
|
+
RL_SHADER_LOC_COLOR_DIFFUSE, // Shader location: vector uniform: diffuse color
|
|
264
|
+
RL_SHADER_LOC_COLOR_SPECULAR, // Shader location: vector uniform: specular color
|
|
265
|
+
RL_SHADER_LOC_COLOR_AMBIENT, // Shader location: vector uniform: ambient color
|
|
266
|
+
RL_SHADER_LOC_MAP_ALBEDO, // Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE)
|
|
267
|
+
RL_SHADER_LOC_MAP_METALNESS, // Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR)
|
|
268
|
+
RL_SHADER_LOC_MAP_NORMAL, // Shader location: sampler2d texture: normal
|
|
269
|
+
RL_SHADER_LOC_MAP_ROUGHNESS, // Shader location: sampler2d texture: roughness
|
|
270
|
+
RL_SHADER_LOC_MAP_OCCLUSION, // Shader location: sampler2d texture: occlusion
|
|
271
|
+
RL_SHADER_LOC_MAP_EMISSION, // Shader location: sampler2d texture: emission
|
|
272
|
+
RL_SHADER_LOC_MAP_HEIGHT, // Shader location: sampler2d texture: height
|
|
273
|
+
RL_SHADER_LOC_MAP_CUBEMAP, // Shader location: samplerCube texture: cubemap
|
|
274
|
+
RL_SHADER_LOC_MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance
|
|
275
|
+
RL_SHADER_LOC_MAP_PREFILTER, // Shader location: samplerCube texture: prefilter
|
|
276
|
+
RL_SHADER_LOC_MAP_BRDF // Shader location: sampler2d texture: brdf
|
|
277
|
+
} rlShaderLocationIndex;
|
|
278
|
+
// Shader uniform data type
|
|
279
|
+
typedef enum {
|
|
280
|
+
RL_SHADER_UNIFORM_FLOAT = 0, // Shader uniform type: float
|
|
281
|
+
RL_SHADER_UNIFORM_VEC2, // Shader uniform type: vec2 (2 float)
|
|
282
|
+
RL_SHADER_UNIFORM_VEC3, // Shader uniform type: vec3 (3 float)
|
|
283
|
+
RL_SHADER_UNIFORM_VEC4, // Shader uniform type: vec4 (4 float)
|
|
284
|
+
RL_SHADER_UNIFORM_INT, // Shader uniform type: int
|
|
285
|
+
RL_SHADER_UNIFORM_IVEC2, // Shader uniform type: ivec2 (2 int)
|
|
286
|
+
RL_SHADER_UNIFORM_IVEC3, // Shader uniform type: ivec3 (3 int)
|
|
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)
|
|
292
|
+
RL_SHADER_UNIFORM_SAMPLER2D // Shader uniform type: sampler2d
|
|
293
|
+
} rlShaderUniformDataType;
|
|
294
|
+
// Shader attribute data types
|
|
295
|
+
typedef enum {
|
|
296
|
+
RL_SHADER_ATTRIB_FLOAT = 0, // Shader attribute type: float
|
|
297
|
+
RL_SHADER_ATTRIB_VEC2, // Shader attribute type: vec2 (2 float)
|
|
298
|
+
RL_SHADER_ATTRIB_VEC3, // Shader attribute type: vec3 (3 float)
|
|
299
|
+
RL_SHADER_ATTRIB_VEC4 // Shader attribute type: vec4 (4 float)
|
|
300
|
+
} rlShaderAttributeDataType;
|
|
301
|
+
// Framebuffer attachment type
|
|
302
|
+
// NOTE: By default up to 8 color channels defined, but it can be more
|
|
303
|
+
typedef enum {
|
|
304
|
+
RL_ATTACHMENT_COLOR_CHANNEL0 = 0, // Framebuffer attachment type: color 0
|
|
305
|
+
RL_ATTACHMENT_COLOR_CHANNEL1 = 1, // Framebuffer attachment type: color 1
|
|
306
|
+
RL_ATTACHMENT_COLOR_CHANNEL2 = 2, // Framebuffer attachment type: color 2
|
|
307
|
+
RL_ATTACHMENT_COLOR_CHANNEL3 = 3, // Framebuffer attachment type: color 3
|
|
308
|
+
RL_ATTACHMENT_COLOR_CHANNEL4 = 4, // Framebuffer attachment type: color 4
|
|
309
|
+
RL_ATTACHMENT_COLOR_CHANNEL5 = 5, // Framebuffer attachment type: color 5
|
|
310
|
+
RL_ATTACHMENT_COLOR_CHANNEL6 = 6, // Framebuffer attachment type: color 6
|
|
311
|
+
RL_ATTACHMENT_COLOR_CHANNEL7 = 7, // Framebuffer attachment type: color 7
|
|
312
|
+
RL_ATTACHMENT_DEPTH = 100, // Framebuffer attachment type: depth
|
|
313
|
+
RL_ATTACHMENT_STENCIL = 200, // Framebuffer attachment type: stencil
|
|
314
|
+
} rlFramebufferAttachType;
|
|
315
|
+
// Framebuffer texture attachment type
|
|
316
|
+
typedef enum {
|
|
317
|
+
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, // Framebuffer texture attachment type: cubemap, +X side
|
|
318
|
+
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1, // Framebuffer texture attachment type: cubemap, -X side
|
|
319
|
+
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2, // Framebuffer texture attachment type: cubemap, +Y side
|
|
320
|
+
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3, // Framebuffer texture attachment type: cubemap, -Y side
|
|
321
|
+
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4, // Framebuffer texture attachment type: cubemap, +Z side
|
|
322
|
+
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5, // Framebuffer texture attachment type: cubemap, -Z side
|
|
323
|
+
RL_ATTACHMENT_TEXTURE2D = 100, // Framebuffer texture attachment type: texture2d
|
|
324
|
+
RL_ATTACHMENT_RENDERBUFFER = 200, // Framebuffer texture attachment type: renderbuffer
|
|
325
|
+
} rlFramebufferAttachTextureType;
|
|
326
|
+
// Face culling mode
|
|
327
|
+
typedef enum {
|
|
328
|
+
RL_CULL_FACE_FRONT = 0,
|
|
329
|
+
RL_CULL_FACE_BACK
|
|
330
|
+
} rlCullMode;
|
|
331
|
+
//------------------------------------------------------------------------------------
|
|
332
|
+
// Functions Declaration - Matrix operations
|
|
333
|
+
//------------------------------------------------------------------------------------
|
|
334
|
+
void rlMatrixMode(int mode); // Choose the current matrix to be transformed
|
|
335
|
+
void rlPushMatrix(void); // Push the current matrix to stack
|
|
336
|
+
void rlPopMatrix(void); // Pop latest inserted matrix from stack
|
|
337
|
+
void rlLoadIdentity(void); // Reset current matrix to identity matrix
|
|
338
|
+
void rlTranslatef(float x, float y, float z); // Multiply the current matrix by a translation matrix
|
|
339
|
+
void rlRotatef(float angle, float x, float y, float z); // Multiply the current matrix by a rotation matrix
|
|
340
|
+
void rlScalef(float x, float y, float z); // Multiply the current matrix by a scaling matrix
|
|
341
|
+
void rlMultMatrixf(const float *matf); // Multiply the current matrix by another matrix
|
|
342
|
+
void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar);
|
|
343
|
+
void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar);
|
|
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
|
|
348
|
+
//------------------------------------------------------------------------------------
|
|
349
|
+
// Functions Declaration - Vertex level operations
|
|
350
|
+
//------------------------------------------------------------------------------------
|
|
351
|
+
void rlBegin(int mode); // Initialize drawing mode (how to organize vertex)
|
|
352
|
+
void rlEnd(void); // Finish vertex providing
|
|
353
|
+
void rlVertex2i(int x, int y); // Define one vertex (position) - 2 int
|
|
354
|
+
void rlVertex2f(float x, float y); // Define one vertex (position) - 2 float
|
|
355
|
+
void rlVertex3f(float x, float y, float z); // Define one vertex (position) - 3 float
|
|
356
|
+
void rlTexCoord2f(float x, float y); // Define one vertex (texture coordinate) - 2 float
|
|
357
|
+
void rlNormal3f(float x, float y, float z); // Define one vertex (normal) - 3 float
|
|
358
|
+
void rlColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a); // Define one vertex (color) - 4 byte
|
|
359
|
+
void rlColor3f(float x, float y, float z); // Define one vertex (color) - 3 float
|
|
360
|
+
void rlColor4f(float x, float y, float z, float w); // Define one vertex (color) - 4 float
|
|
361
|
+
//------------------------------------------------------------------------------------
|
|
362
|
+
// Functions Declaration - OpenGL style functions (common to 1.1, 3.3+, ES2)
|
|
363
|
+
// NOTE: This functions are used to completely abstract raylib code from OpenGL layer,
|
|
364
|
+
// some of them are direct wrappers over OpenGL calls, some others are custom
|
|
365
|
+
//------------------------------------------------------------------------------------
|
|
366
|
+
// Vertex buffers state
|
|
367
|
+
bool rlEnableVertexArray(unsigned int vaoId); // Enable vertex array (VAO, if supported)
|
|
368
|
+
void rlDisableVertexArray(void); // Disable vertex array (VAO, if supported)
|
|
369
|
+
void rlEnableVertexBuffer(unsigned int id); // Enable vertex buffer (VBO)
|
|
370
|
+
void rlDisableVertexBuffer(void); // Disable vertex buffer (VBO)
|
|
371
|
+
void rlEnableVertexBufferElement(unsigned int id); // Enable vertex buffer element (VBO element)
|
|
372
|
+
void rlDisableVertexBufferElement(void); // Disable vertex buffer element (VBO element)
|
|
373
|
+
void rlEnableVertexAttribute(unsigned int index); // Enable vertex attribute index
|
|
374
|
+
void rlDisableVertexAttribute(unsigned int index); // Disable vertex attribute index
|
|
375
|
+
// Textures state
|
|
376
|
+
void rlActiveTextureSlot(int slot); // Select and active a texture slot
|
|
377
|
+
void rlEnableTexture(unsigned int id); // Enable texture
|
|
378
|
+
void rlDisableTexture(void); // Disable texture
|
|
379
|
+
void rlEnableTextureCubemap(unsigned int id); // Enable texture cubemap
|
|
380
|
+
void rlDisableTextureCubemap(void); // Disable texture cubemap
|
|
381
|
+
void rlTextureParameters(unsigned int id, int param, int value); // Set texture parameters (filter, wrap)
|
|
382
|
+
void rlCubemapParameters(unsigned int id, int param, int value); // Set cubemap parameters (filter, wrap)
|
|
383
|
+
// Shader state
|
|
384
|
+
void rlEnableShader(unsigned int id); // Enable shader program
|
|
385
|
+
void rlDisableShader(void); // Disable shader program
|
|
386
|
+
// Framebuffer state
|
|
387
|
+
void rlEnableFramebuffer(unsigned int id); // Enable render texture (fbo)
|
|
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
|
|
390
|
+
void rlActiveDrawBuffers(int count); // Activate multiple draw color buffers
|
|
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)
|
|
393
|
+
// General render state
|
|
394
|
+
void rlEnableColorBlend(void); // Enable color blending
|
|
395
|
+
void rlDisableColorBlend(void); // Disable color blending
|
|
396
|
+
void rlEnableDepthTest(void); // Enable depth test
|
|
397
|
+
void rlDisableDepthTest(void); // Disable depth test
|
|
398
|
+
void rlEnableDepthMask(void); // Enable depth write
|
|
399
|
+
void rlDisableDepthMask(void); // Disable depth write
|
|
400
|
+
void rlEnableBackfaceCulling(void); // Enable backface culling
|
|
401
|
+
void rlDisableBackfaceCulling(void); // Disable backface culling
|
|
402
|
+
void rlColorMask(bool r, bool g, bool b, bool a); // Color mask control
|
|
403
|
+
void rlSetCullFace(int mode); // Set face culling mode
|
|
404
|
+
void rlEnableScissorTest(void); // Enable scissor test
|
|
405
|
+
void rlDisableScissorTest(void); // Disable scissor test
|
|
406
|
+
void rlScissor(int x, int y, int width, int height); // Scissor test
|
|
407
|
+
void rlEnableWireMode(void); // Enable wire mode
|
|
408
|
+
void rlEnablePointMode(void); // Enable point mode
|
|
409
|
+
void rlDisableWireMode(void); // Disable wire (and point) mode
|
|
410
|
+
void rlSetLineWidth(float width); // Set the line drawing width
|
|
411
|
+
float rlGetLineWidth(void); // Get the line drawing width
|
|
412
|
+
void rlEnableSmoothLines(void); // Enable line aliasing
|
|
413
|
+
void rlDisableSmoothLines(void); // Disable line aliasing
|
|
414
|
+
void rlEnableStereoRender(void); // Enable stereo rendering
|
|
415
|
+
void rlDisableStereoRender(void); // Disable stereo rendering
|
|
416
|
+
bool rlIsStereoRenderEnabled(void); // Check if stereo render is enabled
|
|
417
|
+
void rlClearColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a); // Clear color buffer with color
|
|
418
|
+
void rlClearScreenBuffers(void); // Clear used screen buffers (color and depth)
|
|
419
|
+
void rlCheckErrors(void); // Check and log OpenGL error codes
|
|
420
|
+
void rlSetBlendMode(int mode); // Set blending mode
|
|
421
|
+
void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); // Set blending mode factor and equation (using OpenGL factors)
|
|
422
|
+
void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha); // Set blending mode factors and equations separately (using OpenGL factors)
|
|
423
|
+
//------------------------------------------------------------------------------------
|
|
424
|
+
// Functions Declaration - rlgl functionality
|
|
425
|
+
//------------------------------------------------------------------------------------
|
|
426
|
+
// rlgl initialization functions
|
|
427
|
+
void rlglInit(int width, int height); // Initialize rlgl (buffers, shaders, textures, states)
|
|
428
|
+
void rlglClose(void); // De-initialize rlgl (buffers, shaders, textures)
|
|
429
|
+
void rlLoadExtensions(void *loader); // Load OpenGL extensions (loader function required)
|
|
430
|
+
int rlGetVersion(void); // Get current OpenGL version
|
|
431
|
+
void rlSetFramebufferWidth(int width); // Set current framebuffer width
|
|
432
|
+
int rlGetFramebufferWidth(void); // Get default framebuffer width
|
|
433
|
+
void rlSetFramebufferHeight(int height); // Set current framebuffer height
|
|
434
|
+
int rlGetFramebufferHeight(void); // Get default framebuffer height
|
|
435
|
+
unsigned int rlGetTextureIdDefault(void); // Get default texture id
|
|
436
|
+
unsigned int rlGetShaderIdDefault(void); // Get default shader id
|
|
437
|
+
int *rlGetShaderLocsDefault(void); // Get default shader locations
|
|
438
|
+
// Render batch management
|
|
439
|
+
// NOTE: rlgl provides a default render batch to behave like OpenGL 1.1 immediate mode
|
|
440
|
+
// but this render batch API is exposed in case of custom batches are required
|
|
441
|
+
rlRenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements); // Load a render batch system
|
|
442
|
+
void rlUnloadRenderBatch(rlRenderBatch batch); // Unload render batch system
|
|
443
|
+
void rlDrawRenderBatch(rlRenderBatch *batch); // Draw render batch data (Update->Draw->Reset)
|
|
444
|
+
void rlSetRenderBatchActive(rlRenderBatch *batch); // Set the active render batch for rlgl (NULL for default internal)
|
|
445
|
+
void rlDrawRenderBatchActive(void); // Update and draw internal render batch
|
|
446
|
+
bool rlCheckRenderBatchLimit(int vCount); // Check internal buffer overflow for a given number of vertex
|
|
447
|
+
void rlSetTexture(unsigned int id); // Set current texture for render batch and check buffers limits
|
|
448
|
+
//------------------------------------------------------------------------------------------------------------------------
|
|
449
|
+
// Vertex buffers management
|
|
450
|
+
unsigned int rlLoadVertexArray(void); // Load vertex array (vao) if supported
|
|
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
|
|
464
|
+
// Textures management
|
|
465
|
+
unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount); // Load texture data
|
|
466
|
+
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer); // Load depth texture/renderbuffer (to be attached to fbo)
|
|
467
|
+
unsigned int rlLoadTextureCubemap(const void *data, int size, int format, int mipmapCount); // 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
|
|
469
|
+
void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType); // Get OpenGL internal formats
|
|
470
|
+
const char *rlGetPixelFormatName(unsigned int format); // Get name string for pixel format
|
|
471
|
+
void rlUnloadTexture(unsigned int id); // Unload texture from GPU memory
|
|
472
|
+
void rlGenTextureMipmaps(unsigned int id, int width, int height, int format, int *mipmaps); // Generate mipmap data for selected texture
|
|
473
|
+
void *rlReadTexturePixels(unsigned int id, int width, int height, int format); // Read texture pixel data
|
|
474
|
+
unsigned char *rlReadScreenPixels(int width, int height); // Read screen pixel data (color buffer)
|
|
475
|
+
// Framebuffer management (fbo)
|
|
476
|
+
unsigned int rlLoadFramebuffer(void); // Load an empty framebuffer
|
|
477
|
+
void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType, int texType, int mipLevel); // Attach texture/renderbuffer to a framebuffer
|
|
478
|
+
bool rlFramebufferComplete(unsigned int id); // Verify framebuffer is complete
|
|
479
|
+
void rlUnloadFramebuffer(unsigned int id); // Delete framebuffer from GPU
|
|
480
|
+
// Shaders management
|
|
481
|
+
unsigned int rlLoadShaderCode(const char *vsCode, const char *fsCode); // Load shader from code strings
|
|
482
|
+
unsigned int rlCompileShader(const char *shaderCode, int type); // Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
|
|
483
|
+
unsigned int rlLoadShaderProgram(unsigned int vShaderId, unsigned int fShaderId); // Load custom shader program
|
|
484
|
+
void rlUnloadShaderProgram(unsigned int id); // Unload shader program
|
|
485
|
+
int rlGetLocationUniform(unsigned int shaderId, const char *uniformName); // Get shader location uniform
|
|
486
|
+
int rlGetLocationAttrib(unsigned int shaderId, const char *attribName); // Get shader location attribute
|
|
487
|
+
void rlSetUniform(int locIndex, const void *value, int uniformType, int count); // Set shader value uniform
|
|
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
|
|
490
|
+
void rlSetUniformSampler(int locIndex, unsigned int textureId); // Set shader value sampler
|
|
491
|
+
void rlSetShader(unsigned int id, int *locs); // Set shader currently active (id and locations)
|
|
492
|
+
// Compute shader management
|
|
493
|
+
unsigned int rlLoadComputeShaderProgram(unsigned int shaderId); // Load compute shader program
|
|
494
|
+
void rlComputeShaderDispatch(unsigned int groupX, unsigned int groupY, unsigned int groupZ); // Dispatch compute shader (equivalent to *draw* for graphics pipeline)
|
|
495
|
+
// Shader buffer storage object management (ssbo)
|
|
496
|
+
unsigned int rlLoadShaderBuffer(unsigned int size, const void *data, int usageHint); // Load shader storage buffer object (SSBO)
|
|
497
|
+
void rlUnloadShaderBuffer(unsigned int ssboId); // Unload shader storage buffer object (SSBO)
|
|
498
|
+
void rlUpdateShaderBuffer(unsigned int id, const void *data, unsigned int dataSize, unsigned int offset); // Update SSBO buffer data
|
|
499
|
+
void rlBindShaderBuffer(unsigned int id, unsigned int index); // Bind SSBO buffer
|
|
500
|
+
void rlReadShaderBuffer(unsigned int id, void *dest, unsigned int count, unsigned int offset); // Read SSBO buffer data (GPU->CPU)
|
|
501
|
+
void rlCopyShaderBuffer(unsigned int destId, unsigned int srcId, unsigned int destOffset, unsigned int srcOffset, unsigned int count); // Copy SSBO data between buffers
|
|
502
|
+
unsigned int rlGetShaderBufferSize(unsigned int id); // Get SSBO buffer size
|
|
503
|
+
// Buffer management
|
|
504
|
+
void rlBindImageTexture(unsigned int id, unsigned int index, int format, bool readonly); // Bind image texture
|
|
505
|
+
// Matrix state management
|
|
506
|
+
Matrix rlGetMatrixModelview(void); // Get internal modelview matrix
|
|
507
|
+
Matrix rlGetMatrixProjection(void); // Get internal projection matrix
|
|
508
|
+
Matrix rlGetMatrixTransform(void); // Get internal accumulated transform matrix
|
|
509
|
+
Matrix rlGetMatrixProjectionStereo(int eye); // Get internal projection matrix for stereo render (selected eye)
|
|
510
|
+
Matrix rlGetMatrixViewOffsetStereo(int eye); // Get internal view offset matrix for stereo render (selected eye)
|
|
511
|
+
void rlSetMatrixProjection(Matrix proj); // Set a custom projection matrix (replaces internal projection matrix)
|
|
512
|
+
void rlSetMatrixModelview(Matrix view); // Set a custom modelview matrix (replaces internal modelview matrix)
|
|
513
|
+
void rlSetMatrixProjectionStereo(Matrix right, Matrix left); // Set eyes projection matrices for stereo rendering
|
|
514
|
+
void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left); // Set eyes view offsets matrices for stereo rendering
|
|
515
|
+
// Quick and dirty cube/quad buffers load->draw->unload
|
|
516
|
+
void rlLoadDrawCube(void); // Load and draw a cube
|
|
517
|
+
void rlLoadDrawQuad(void); // Load and draw a quad
|
|
518
|
+
/***********************************************************************************
|
|
519
|
+
*
|
|
520
|
+
* RLGL IMPLEMENTATION
|
|
521
|
+
*
|
|
522
|
+
************************************************************************************/
|
raylib/version.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "5.5.0.4"
|