Skip to content

Commit 4de64f5

Browse files
committed
Expose OpenGL blending mode factors and functions/equations
1 parent 8969884 commit 4de64f5

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

src/rlgl.h

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
#define RL_UNSIGNED_BYTE 0x1401 // GL_UNSIGNED_BYTE
265265
#define RL_FLOAT 0x1406 // GL_FLOAT
266266

267-
// Buffer usage hint
267+
// GL buffer usage hint
268268
#define RL_STREAM_DRAW 0x88E0 // GL_STREAM_DRAW
269269
#define RL_STREAM_READ 0x88E1 // GL_STREAM_READ
270270
#define RL_STREAM_COPY 0x88E2 // GL_STREAM_COPY
@@ -280,6 +280,37 @@
280280
#define RL_VERTEX_SHADER 0x8B31 // GL_VERTEX_SHADER
281281
#define RL_COMPUTE_SHADER 0x91B9 // GL_COMPUTE_SHADER
282282

283+
// GL blending factors
284+
#define RL_ZERO 0 // GL_ZERO
285+
#define RL_ONE 1 // GL_ONE
286+
#define RL_SRC_COLOR 0x0300 // GL_SRC_COLOR
287+
#define RL_ONE_MINUS_SRC_COLOR 0x0301 // GL_ONE_MINUS_SRC_COLOR
288+
#define RL_SRC_ALPHA 0x0302 // GL_SRC_ALPHA
289+
#define RL_ONE_MINUS_SRC_ALPHA 0x0303 // GL_ONE_MINUS_SRC_ALPHA
290+
#define RL_DST_ALPHA 0x0304 // GL_DST_ALPHA
291+
#define RL_ONE_MINUS_DST_ALPHA 0x0305 // GL_ONE_MINUS_DST_ALPHA
292+
#define RL_DST_COLOR 0x0306 // GL_DST_COLOR
293+
#define RL_ONE_MINUS_DST_COLOR 0x0307 // GL_ONE_MINUS_DST_COLOR
294+
#define RL_SRC_ALPHA_SATURATE 0x0308 // GL_SRC_ALPHA_SATURATE
295+
#define RL_CONSTANT_COLOR 0x8001 // GL_CONSTANT_COLOR
296+
#define RL_ONE_MINUS_CONSTANT_COLOR 0x8002 // GL_ONE_MINUS_CONSTANT_COLOR
297+
#define RL_CONSTANT_ALPHA 0x8003 // GL_CONSTANT_ALPHA
298+
#define RL_ONE_MINUS_CONSTANT_ALPHA 0x8004 // GL_ONE_MINUS_CONSTANT_ALPHA
299+
300+
// GL blending functions/equations
301+
#define RL_FUNC_ADD 0x8006 // GL_FUNC_ADD
302+
#define RL_FUNC_SUBTRACT 0x800A // GL_FUNC_SUBTRACT
303+
#define RL_FUNC_REVERSE_SUBTRACT 0x800B // GL_FUNC_REVERSE_SUBTRACT
304+
#define RL_BLEND_EQUATION 0x8009 // GL_BLEND_EQUATION
305+
#define RL_BLEND_EQUATION_RGB 0x8009 // GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION)
306+
#define RL_BLEND_EQUATION_ALPHA 0x883D // GL_BLEND_EQUATION_ALPHA
307+
#define RL_BLEND_DST_RGB 0x80C8 // GL_BLEND_DST_RGB
308+
#define RL_BLEND_SRC_RGB 0x80C9 // GL_BLEND_SRC_RGB
309+
#define RL_BLEND_DST_ALPHA 0x80CA // GL_BLEND_DST_ALPHA
310+
#define RL_BLEND_SRC_ALPHA 0x80CB // GL_BLEND_SRC_ALPHA
311+
#define RL_BLEND_COLOR 0x8005 // GL_BLEND_COLOR
312+
313+
283314
//----------------------------------------------------------------------------------
284315
// Types and Structures Definition
285316
//----------------------------------------------------------------------------------

0 commit comments

Comments
 (0)