Jelajahi Sumber

Adding glColorMaski support.

clementlandrin 1 tahun lalu
induk
melakukan
e290d34401
4 mengubah file dengan 12 tambahan dan 0 penghapusan
  1. 3 0
      libs/mesa/mesa/GL.hx
  2. 1 0
      libs/sdl/GLImports.h
  3. 5 0
      libs/sdl/gl.c
  4. 3 0
      libs/sdl/sdl/GL.hx

+ 3 - 0
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 ){
 	}
 

+ 1 - 0
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);

+ 5 - 0
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);

+ 3 - 0
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 ){
 	}