From e290d34401063a4fe59cbbe332f64b3cee3a819f Mon Sep 17 00:00:00 2001 From: clementlandrin Date: Tue, 24 Oct 2023 12:05:17 +0200 Subject: [PATCH] Adding glColorMaski support. --- libs/mesa/mesa/GL.hx | 3 +++ libs/sdl/GLImports.h | 1 + libs/sdl/gl.c | 5 +++++ libs/sdl/sdl/GL.hx | 3 +++ 4 files changed, 12 insertions(+) diff --git a/libs/mesa/mesa/GL.hx b/libs/mesa/mesa/GL.hx index bad750efb..6322fc1f5 100644 --- a/libs/mesa/mesa/GL.hx +++ b/libs/mesa/mesa/GL.hx @@ -120,6 +120,9 @@ class GL { public static function colorMask( r : Bool, g : Bool, b : Bool, a : Bool ) { } + public static function colorMaski( i : Int, r : Bool, g : Bool, b : Bool, a : Bool ) { + } + public static function stencilMaskSeparate( face : Int, mask : Int ){ } diff --git a/libs/sdl/GLImports.h b/libs/sdl/GLImports.h index 220ecec3b..19426ddcb 100644 --- a/libs/sdl/GLImports.h +++ b/libs/sdl/GLImports.h @@ -69,6 +69,7 @@ GL_IMPORT(glGetUniformBlockIndex, GETUNIFORMBLOCKINDEX); GL_IMPORT(glUniformBlockBinding, UNIFORMBLOCKBINDING); GL_IMPORT(glMultiDrawElementsIndirect, MULTIDRAWELEMENTSINDIRECT); +GL_IMPORT(glColorMaski, COLORMASKI); #if !defined(HL_MESA) GL_IMPORT(glGetQueryObjectui64v, GETQUERYOBJECTUI64V); diff --git a/libs/sdl/gl.c b/libs/sdl/gl.c index 865777550..4d69e1ba7 100644 --- a/libs/sdl/gl.c +++ b/libs/sdl/gl.c @@ -162,6 +162,10 @@ HL_PRIM void HL_NAME(gl_color_mask)( bool r, bool g, bool b, bool a ) { glColorMask(r, g, b, a); } +HL_PRIM void HL_NAME(gl_color_maski)( int i, bool r, bool g, bool b, bool a ) { + glColorMaski(i, r, g, b, a); +} + HL_PRIM void HL_NAME(gl_stencil_mask_separate)(int face, int mask) { glStencilMaskSeparate(face, mask); } @@ -664,6 +668,7 @@ DEFINE_PRIM(_VOID,gl_blend_equation_separate,_I32 _I32); DEFINE_PRIM(_VOID,gl_depth_mask,_BOOL); DEFINE_PRIM(_VOID,gl_depth_func,_I32); DEFINE_PRIM(_VOID,gl_color_mask,_BOOL _BOOL _BOOL _BOOL); +DEFINE_PRIM(_VOID,gl_color_maski,_I32 _BOOL _BOOL _BOOL _BOOL); DEFINE_PRIM(_VOID,gl_stencil_mask_separate,_I32 _I32); DEFINE_PRIM(_VOID,gl_stencil_func_separate,_I32 _I32 _I32 _I32); DEFINE_PRIM(_VOID,gl_stencil_op_separate,_I32 _I32 _I32 _I32); diff --git a/libs/sdl/sdl/GL.hx b/libs/sdl/sdl/GL.hx index 075325cbc..dbb60f488 100644 --- a/libs/sdl/sdl/GL.hx +++ b/libs/sdl/sdl/GL.hx @@ -120,6 +120,9 @@ class GL { public static function colorMask( r : Bool, g : Bool, b : Bool, a : Bool ) { } + public static function colorMaski( i : Int, r : Bool, g : Bool, b : Bool, a : Bool ) { + } + public static function stencilMaskSeparate( face : Int, mask : Int ){ }