Update RingOpenGL - Add Function (Source Code) : void glColor4f(GLfloat red,GLfloat green,GLfloat blue,GLfloat alpha)
@@ -766,6 +766,32 @@ RING_FUNC(ring_glColor4i)
glColor4i( (GLint ) RING_API_GETNUMBER(1), (GLint ) RING_API_GETNUMBER(2), (GLint ) RING_API_GETNUMBER(3), (GLint ) RING_API_GETNUMBER(4));
}
+
+RING_FUNC(ring_glColor4f)
+{
+ 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 ;
+ }
+ glColor4f( (GLfloat ) RING_API_GETNUMBER(1), (GLfloat ) RING_API_GETNUMBER(2), (GLfloat ) RING_API_GETNUMBER(3), (GLfloat ) RING_API_GETNUMBER(4));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -808,4 +834,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glcolor4b",ring_glColor4b);
ring_vm_funcregister("glcolor4s",ring_glColor4s);
ring_vm_funcregister("glcolor4i",ring_glColor4i);
+ ring_vm_funcregister("glcolor4f",ring_glColor4f);
}
