Update RingOpenGL - Add Function (Source Code) : void glColor3b(GLbyte red,GLbyte green,GLbyte blue)
@@ -552,6 +552,22 @@ RING_FUNC(ring_glClipPlane)
glClipPlane( (GLenum ) (int) RING_API_GETNUMBER(1),(GLdouble *) RING_API_GETCPOINTER(2,"GLdouble"));
}
+
+RING_FUNC(ring_glColor3b)
+{
+ if ( RING_API_PARACOUNT != 3 ) {
+ RING_API_ERROR(RING_API_MISS3PARA);
+ return ;
+ }
+ glColor3b(* (GLbyte *) RING_API_GETCPOINTER(1,"GLbyte"),* (GLbyte *) RING_API_GETCPOINTER(2,"GLbyte"),* (GLbyte *) RING_API_GETCPOINTER(3,"GLbyte"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ free(RING_API_GETCPOINTER(1,"GLbyte"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ free(RING_API_GETCPOINTER(2,"GLbyte"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ free(RING_API_GETCPOINTER(3,"GLbyte"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -583,4 +599,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glclearstencil",ring_glClearStencil);
ring_vm_funcregister("glclientactivetexture",ring_glClientActiveTexture);
ring_vm_funcregister("glclipplane",ring_glClipPlane);
+ ring_vm_funcregister("glcolor3b",ring_glColor3b);
}
