From 3e96fd526780f8adf46657b5f7b664a5e1b7abf2 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 13 Apr 2017 00:59:47 +0200 Subject: [PATCH] Reflect the initializers with reality --- data/GServer.interface | 38 +++++++++++++++++++------------------- include/GServer/video.h | 10 ++++++++++ src/gserver.c | 8 ++++++++ src/video/glut.c | 24 ++++++++++++++++++++++++ src/video/glx.c | 24 ++++++++++++++++++++++++ src/video/sdl.c | 24 ++++++++++++++++++++++++ src/video/vesa.c | 10 ++++++++++ 7 files changed, 119 insertions(+), 19 deletions(-) diff --git a/data/GServer.interface b/data/GServer.interface index c23cfb5..139ec4c 100644 --- a/data/GServer.interface +++ b/data/GServer.interface @@ -11,20 +11,20 @@ arg1=UINT32,texture [call::glArrayElement] arg1=INT32,i -[call::glAttachShader] -arg1=UINT32,program -arg2=UINT32,shader +#[call::glAttachShader] +#arg1=UINT32,program +#arg2=UINT32,shader [call::glBegin] arg1=UINT32,mode -[call::glBeginQuery] -arg1=UINT32,target -arg2=UINT32,id +#[call::glBeginQuery] +#arg1=UINT32,target +#arg2=UINT32,id -[call::glBindBuffer] -arg1=UINT32,target -arg2=UINT32,buffer +#[call::glBindBuffer] +#arg1=UINT32,target +#arg2=UINT32,buffer [call:glBindTexture] arg1=UINT32,target @@ -33,19 +33,19 @@ arg2=UINT32,texture [call::glBlendEquation] arg1=UINT32,mode -[call::glBlendEquationSeparate] -arg1=UINT32,modeRGB -arg2=UINT32,modeAlpha +#[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::glBlendFuncSeparate] +#arg1=UINT32,srcRGB +#arg2=UINT32,dstRGB +#arg3=UINT32,srcAlpha +#arg4=UINT32,dstAlpha [call::glCallList] arg1=UINT32,list @@ -175,8 +175,8 @@ arg4=BOOL,alpha arg1=UINT32,face arg2=UINT32,mode -[call::glCompileShader] -arg1=UINT32,shader +#[call::glCompileShader] +#arg1=UINT32,shader [call::glDepthFunc] arg1=UINT32 diff --git a/include/GServer/video.h b/include/GServer/video.h index 7144990..29bb24b 100644 --- a/include/GServer/video.h +++ b/include/GServer/video.h @@ -82,7 +82,9 @@ typedef enum _GServerVideoCall1i GSERVER_VIDEO_CALL1i_glClear, GSERVER_VIDEO_CALL1i_glClearStencil, GSERVER_VIDEO_CALL1i_glClientActiveTexture, +#if 0 GSERVER_VIDEO_CALL1i_glCompileShader, +#endif GSERVER_VIDEO_CALL1i_glDepthFunc, GSERVER_VIDEO_CALL1i_glDisable, GSERVER_VIDEO_CALL1i_glDisableClientState, @@ -104,11 +106,15 @@ typedef enum _GServerVideoCall2f typedef enum _GServerVideoCall2i { +#if 0 GSERVER_VIDEO_CALL2i_glAttachShader = 0, GSERVER_VIDEO_CALL2i_glBeginQuery, GSERVER_VIDEO_CALL2i_glBindBuffer, GSERVER_VIDEO_CALL2i_glBindTexture, GSERVER_VIDEO_CALL2i_glBlendEquationSeparate, +#else + GSERVER_VIDEO_CALL2i_glBindTexture = 0, +#endif GSERVER_VIDEO_CALL2i_glBlendFunc, GSERVER_VIDEO_CALL2i_glColorMaterial, GSERVER_VIDEO_CALL2i_glFogi, @@ -193,8 +199,12 @@ typedef enum _GServerVideoCall4f typedef enum _GServerVideoCall4i { +#if 0 GSERVER_VIDEO_CALL4i_glBlendFuncSeparate = 0, GSERVER_VIDEO_CALL4i_glColor4i, +#else + GSERVER_VIDEO_CALL4i_glColor4i = 0, +#endif GSERVER_VIDEO_CALL4i_glColor4ui, GSERVER_VIDEO_CALL4i_glColorMask, GSERVER_VIDEO_CALL4i_glScissor, diff --git a/src/gserver.c b/src/gserver.c index cc20574..e92ed99 100644 --- a/src/gserver.c +++ b/src/gserver.c @@ -530,7 +530,9 @@ GSERVER_PROTO1i(void, glCallList, uint32_t) GSERVER_PROTO1i(void, glClear, uint32_t) GSERVER_PROTO1i(void, glClearStencil, int32_t) GSERVER_PROTO1i(void, glClientActiveTexture, uint32_t) +#if 0 GSERVER_PROTO1i(void, glCompileShader, uint32_t) +#endif GSERVER_PROTO1i(void, glDepthFunc, uint32_t) GSERVER_PROTO1i(void, glDisable, uint32_t) GSERVER_PROTO1i(void, glDisableClientState, uint32_t) @@ -545,11 +547,15 @@ GSERVER_PROTO2f(void, glPolygonOffset) GSERVER_PROTO2f(void, glTexCoord2f) /* proto2i */ +#if 0 GSERVER_PROTO2i(void, glAttachShader, uint32_t, uint32_t) GSERVER_PROTO2i(void, glBeginQuery, uint32_t, uint32_t) GSERVER_PROTO2i(void, glBindBuffer, uint32_t, uint32_t) +#endif GSERVER_PROTO2i(void, glBindTexture, uint32_t, uint32_t) +#if 0 GSERVER_PROTO2i(void, glBlendEquationSeparate, uint32_t, uint32_t) +#endif GSERVER_PROTO2i(void, glBlendFunc, uint32_t, uint32_t) GSERVER_PROTO2i(void, glColorMaterial, uint32_t, uint32_t) GSERVER_PROTO2i(void, glFogi, uint32_t, int32_t) @@ -598,8 +604,10 @@ GSERVER_PROTO4f(void, glColor4f) GSERVER_PROTO4f(void, glRotatef) /* proto4i */ +#if 0 GSERVER_PROTO4i(void, glBlendFuncSeparate, uint32_t, uint32_t, uint32_t, uint32_t) +#endif 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, glColorMask, bool, bool, bool, bool) diff --git a/src/video/glut.c b/src/video/glut.c index c986bd8..d6d46a7 100644 --- a/src/video/glut.c +++ b/src/video/glut.c @@ -93,13 +93,23 @@ static void (*_glut_func1d[GSERVER_VIDEO_CALL1d_COUNT])(double) = static void (*_glut_func1f[GSERVER_VIDEO_CALL1f_COUNT])(float) = { + glClearIndex, glPointSize }; static void (*_glut_func1i[GSERVER_VIDEO_CALL1i_COUNT])(uint32_t) = { + glActiveTexture, + glArrayElement, glBegin, + glBlendEquation, + glCallList, glClear, + glClearStencil, + glClientActiveTexture, +#if 0 + glCompileShader, +#endif glDepthFunc, glDisable, glDisableClientState, @@ -117,7 +127,16 @@ static void (*_glut_func2f[GSERVER_VIDEO_CALL2f_COUNT])(float, float) = static void (*_glut_func2i[GSERVER_VIDEO_CALL2i_COUNT])(uint32_t, uint32_t) = { +#if 0 + glAttachShader, + glBeginQuery, + glBindBuffer, +#endif glBindTexture, +#if 0 + glBlendEquationSeparate, +#endif + glBlendFunc, glColorMaterial, glFogi, glHint, @@ -182,6 +201,7 @@ static void (*_glut_func4d[GSERVER_VIDEO_CALL4d_COUNT])(double, double, double, static void (*_glut_func4f[GSERVER_VIDEO_CALL4f_COUNT])(float, float, float, float) = { + glClearAccum, glClearColor, glRotatef }; @@ -189,8 +209,12 @@ static void (*_glut_func4f[GSERVER_VIDEO_CALL4f_COUNT])(float, float, float, static void (*_glut_func4i[GSERVER_VIDEO_CALL4i_COUNT])(uint32_t, uint32_t, uint32_t, uint32_t) = { +#if 0 + glBlendFuncSeparate, +#endif glColor4i, glColor4ui, + glColorMask, glScissor, glViewport }; diff --git a/src/video/glx.c b/src/video/glx.c index 4ec3170..0202fae 100644 --- a/src/video/glx.c +++ b/src/video/glx.c @@ -97,13 +97,23 @@ static void (*_glx_func1d[GSERVER_VIDEO_CALL1d_COUNT])(double) = static void (*_glx_func1f[GSERVER_VIDEO_CALL1f_COUNT])(float) = { + glClearIndex, glPointSize }; static void (*_glx_func1i[GSERVER_VIDEO_CALL1i_COUNT])(uint32_t) = { + glActiveTexture, + glArrayElement, glBegin, + glBlendEquation, + glCallList, glClear, + glClearStencil, + glClientActiveTexture, +#if 0 + glCompileShader, +#endif glDepthFunc, glDisable, glDisableClientState, @@ -121,7 +131,16 @@ static void (*_glx_func2f[GSERVER_VIDEO_CALL2f_COUNT])(float, float) = static void (*_glx_func2i[GSERVER_VIDEO_CALL2i_COUNT])(uint32_t, uint32_t) = { +#if 0 + glAttachShader, + glBeginQuery, + glBindBuffer, +#endif glBindTexture, +#if 0 + glBlendEquationSeparate, +#endif + glBlendFunc, glColorMaterial, glFogi, glHint, @@ -186,6 +205,7 @@ static void (*_glx_func4d[GSERVER_VIDEO_CALL4d_COUNT])(double, double, double, static void (*_glx_func4f[GSERVER_VIDEO_CALL4f_COUNT])(float, float, float, float) = { + glClearAccum, glClearColor, glRotatef }; @@ -193,8 +213,12 @@ static void (*_glx_func4f[GSERVER_VIDEO_CALL4f_COUNT])(float, float, float, static void (*_glx_func4i[GSERVER_VIDEO_CALL4i_COUNT])(uint32_t, uint32_t, uint32_t, uint32_t) = { +#if 0 + glBlendFuncSeparate, +#endif glColor4i, glColor4ui, + glColorMask, glScissor, glViewport }; diff --git a/src/video/sdl.c b/src/video/sdl.c index 3fc2107..40d9b90 100644 --- a/src/video/sdl.c +++ b/src/video/sdl.c @@ -92,13 +92,23 @@ static void (*_sdl_func1d[GSERVER_VIDEO_CALL1d_COUNT])(double) = static void (*_sdl_func1f[GSERVER_VIDEO_CALL1f_COUNT])(float) = { + glClearIndex, glPointSize }; static void (*_sdl_func1i[GSERVER_VIDEO_CALL1i_COUNT])(uint32_t) = { + glActiveTexture, + glArrayElement, glBegin, + glBlendEquation, + glCallList, glClear, + glClearStencil, + glClientActiveTexture, +#if 0 + glCompileShader, +#endif glDepthFunc, glDisable, glDisableClientState, @@ -116,7 +126,16 @@ static void (*_sdl_func2f[GSERVER_VIDEO_CALL2f_COUNT])(float, float) = static void (*_sdl_func2i[GSERVER_VIDEO_CALL2i_COUNT])(uint32_t, uint32_t) = { +#if 0 + glAttachShader, + glBeginQuery, + glBindBuffer, +#endif glBindTexture, +#if 0 + glBlendEquationSeparate, +#endif + glBlendFunc, glColorMaterial, glFogi, glHint, @@ -181,6 +200,7 @@ static void (*_sdl_func4d[GSERVER_VIDEO_CALL4d_COUNT])(double, double, double, static void (*_sdl_func4f[GSERVER_VIDEO_CALL4f_COUNT])(float, float, float, float) = { + glClearAccum, glClearColor, glRotatef }; @@ -188,8 +208,12 @@ static void (*_sdl_func4f[GSERVER_VIDEO_CALL4f_COUNT])(float, float, float, static void (*_sdl_func4i[GSERVER_VIDEO_CALL4i_COUNT])(uint32_t, uint32_t, uint32_t, uint32_t) = { +#if 0 + glBlendFuncSeparate, +#endif glColor4i, glColor4ui, + glColorMask, glScissor, glViewport }; diff --git a/src/video/vesa.c b/src/video/vesa.c index 587b1c2..4d6e637 100644 --- a/src/video/vesa.c +++ b/src/video/vesa.c @@ -49,5 +49,15 @@ GServerVideoPlugin video_plugin = NULL, NULL, NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, NULL };