Update RingOpenGL 1.1 - Add Function (Source Code) : void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
@@ -2916,6 +2916,32 @@ RING_FUNC(ring_glClearAccum)
glClearAccum( (GLfloat ) RING_API_GETNUMBER(1), (GLfloat ) RING_API_GETNUMBER(2), (GLfloat ) RING_API_GETNUMBER(3), (GLfloat ) RING_API_GETNUMBER(4));
}
+
+RING_FUNC(ring_glClearColor)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ glClearColor( (GLclampf ) (int) RING_API_GETNUMBER(1), (GLclampf ) (int) RING_API_GETNUMBER(2), (GLclampf ) (int) RING_API_GETNUMBER(3), (GLclampf ) (int) RING_API_GETNUMBER(4));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -2930,6 +2956,7 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glcalllists",ring_glCallLists);
ring_vm_funcregister("glclear",ring_glClear);
ring_vm_funcregister("glclearaccum",ring_glClearAccum);
+ ring_vm_funcregister("glclearcolor",ring_glClearColor);
ring_vm_funcregister("get_gl_zero",ring_get_gl_zero);
ring_vm_funcregister("get_gl_false",ring_get_gl_false);
ring_vm_funcregister("get_gl_logic_op",ring_get_gl_logic_op);
