From feaf3ed650628ea12edd696a0b8593a1779edcd5 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 12 Apr 2017 23:00:03 +0200 Subject: [PATCH] Add glBlend{Equation,Func}{,Separate}() --- data/GServer.interface | 21 +++++++++++++++++++++ include/GServer/video.h | 6 +++++- src/gserver.c | 5 +++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/data/GServer.interface b/data/GServer.interface index df3f4cd..e5bdc65 100644 --- a/data/GServer.interface +++ b/data/GServer.interface @@ -1,6 +1,10 @@ #$Id$ service=GServer +#[call::glAccum] +#arg1=UINT32,op +#arg2=FLOAT,value + [call::glActiveTexture] arg1=UINT32,texture @@ -26,6 +30,23 @@ arg2=UINT32,buffer arg1=UINT32,target arg2=UINT32,texture +[call::glBlendEquation] +arg1=UINT32,mode + +[call::glBlendEquationSeparate] +arg1=UINT32,modeRGB +arg2=UINT32,modeAlpha + +[call::glBlendFunc] +arg1=UINT32,sfactor +arg2=UINT32,dfactor + +[call::glBlendFuncSeparate] +arg1=UINT32,srcRGB +arg2=UINT32,dstRGB +arg3=UINT32,srcAlpha +arg4=UINT32,dstAlpha + [call::glClear] arg1=UINT32,mask diff --git a/include/GServer/video.h b/include/GServer/video.h index 55710e9..75ef0f3 100644 --- a/include/GServer/video.h +++ b/include/GServer/video.h @@ -76,6 +76,7 @@ typedef enum _GServerVideoCall1i GSERVER_VIDEO_CALL1i_glActiveTexture = 0, GSERVER_VIDEO_CALL1i_glArrayElement, GSERVER_VIDEO_CALL1i_glBegin, + GSERVER_VIDEO_CALL1i_glBlendEquation, GSERVER_VIDEO_CALL1i_glClear, GSERVER_VIDEO_CALL1i_glDepthFunc, GSERVER_VIDEO_CALL1i_glDisable, @@ -102,6 +103,8 @@ typedef enum _GServerVideoCall2i GSERVER_VIDEO_CALL2i_glBeginQuery, GSERVER_VIDEO_CALL2i_glBindBuffer, GSERVER_VIDEO_CALL2i_glBindTexture, + GSERVER_VIDEO_CALL2i_glBlendEquationSeparate, + GSERVER_VIDEO_CALL2i_glBlendFunc, GSERVER_VIDEO_CALL2i_glColorMaterial, GSERVER_VIDEO_CALL2i_glFogi, GSERVER_VIDEO_CALL2i_glHint, @@ -184,7 +187,8 @@ typedef enum _GServerVideoCall4f typedef enum _GServerVideoCall4i { - GSERVER_VIDEO_CALL4i_glColor4i = 0, + GSERVER_VIDEO_CALL4i_glBlendFuncSeparate = 0, + GSERVER_VIDEO_CALL4i_glColor4i, GSERVER_VIDEO_CALL4i_glColor4ui, GSERVER_VIDEO_CALL4i_glScissor, GSERVER_VIDEO_CALL4i_glViewport diff --git a/src/gserver.c b/src/gserver.c index 852b25d..04b4bf2 100644 --- a/src/gserver.c +++ b/src/gserver.c @@ -524,6 +524,7 @@ GSERVER_PROTO1f(void, glPointSize) GSERVER_PROTO1i(void, glActiveTexture, uint32_t) GSERVER_PROTO1i(void, glArrayElement, int32_t) GSERVER_PROTO1i(void, glBegin, uint32_t) +GSERVER_PROTO1i(void, glBlendEquation, uint32_t) GSERVER_PROTO1i(void, glClear, uint32_t) GSERVER_PROTO1i(void, glDepthFunc, uint32_t) GSERVER_PROTO1i(void, glDisable, uint32_t) @@ -543,6 +544,8 @@ GSERVER_PROTO2i(void, glAttachShader, uint32_t, uint32_t) GSERVER_PROTO2i(void, glBeginQuery, uint32_t, uint32_t) GSERVER_PROTO2i(void, glBindBuffer, uint32_t, uint32_t) GSERVER_PROTO2i(void, glBindTexture, uint32_t, uint32_t) +GSERVER_PROTO2i(void, glBlendEquationSeparate, uint32_t, uint32_t) +GSERVER_PROTO2i(void, glBlendFunc, uint32_t, uint32_t) GSERVER_PROTO2i(void, glColorMaterial, uint32_t, uint32_t) GSERVER_PROTO2i(void, glFogi, uint32_t, int32_t) GSERVER_PROTO2i(void, glHint, uint32_t, uint32_t) @@ -589,6 +592,8 @@ GSERVER_PROTO4f(void, glColor4f) GSERVER_PROTO4f(void, glRotatef) /* proto4i */ +GSERVER_PROTO4i(void, glBlendFuncSeparate, uint32_t, uint32_t, uint32_t, + uint32_t) GSERVER_PROTO4i(void, glColor4i, int32_t, int32_t, int32_t, int32_t) GSERVER_PROTO4i(void, glColor4ui, uint32_t, uint32_t, uint32_t, uint32_t) GSERVER_PROTO4i(void, glScissor, int32_t, int32_t, int32_t, int32_t)