Selaa lähdekoodia

added glReadBuffer

Nicolas Cannasse 8 vuotta sitten
vanhempi
commit
40f12904b3
2 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. 6 0
      libs/sdl/gl.c
  2. 3 0
      libs/sdl/sdl/GL.hx

+ 6 - 0
libs/sdl/gl.c

@@ -385,6 +385,11 @@ HL_PRIM void HL_NAME(gl_read_pixels)( int x, int y, int width, int height, int f
 	glReadPixels(x, y, width, height, format, type, data);
 }
 
+HL_PRIM void HL_NAME(gl_read_buffer)( int mode ) {
+	GLOG("%d",mode);
+	glReadBuffer(mode);
+}
+
 HL_PRIM void HL_NAME(gl_draw_buffers)( int count, unsigned int *buffers) {
 	GLOG("%d",count);
 	glDrawBuffers(count, buffers);
@@ -615,6 +620,7 @@ DEFINE_PRIM(_VOID,gl_bind_framebuffer,_I32 _NULL(_I32));
 DEFINE_PRIM(_VOID,gl_framebuffer_texture2d,_I32 _I32 _I32 _NULL(_I32) _I32);
 DEFINE_PRIM(_VOID,gl_delete_framebuffer,_NULL(_I32));
 DEFINE_PRIM(_VOID,gl_read_pixels,_I32 _I32 _I32 _I32 _I32 _I32 _BYTES);
+DEFINE_PRIM(_VOID,gl_read_buffer,_I32);
 DEFINE_PRIM(_VOID,gl_draw_buffers,_I32 _BYTES);
 DEFINE_PRIM(_NULL(_I32),gl_create_renderbuffer,_NO_ARG);
 DEFINE_PRIM(_VOID,gl_bind_renderbuffer,_I32 _NULL(_I32));

+ 3 - 0
libs/sdl/sdl/GL.hx

@@ -228,6 +228,9 @@ class GL {
 	public static function deleteFramebuffer( f : Framebuffer ) {
 	}
 
+	public static function readBuffer( mode : Int ) {
+	}
+
 	public static function readPixels( x : Int, y : Int, width : Int, height : Int, format : Int, type : Int, data : hl.Bytes ) {
 	}