Update RingOpenGL - Add Function (Source Code) : void glColor4us(GLushort red,GLushort green,GLushort blue,GLushort alpha)
@@ -836,6 +836,24 @@ RING_FUNC(ring_glColor4ub)
free(RING_API_GETCPOINTER(4,"GLubyte"));
}
+
+RING_FUNC(ring_glColor4us)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ glColor4us(* (GLushort *) RING_API_GETCPOINTER(1,"GLushort"),* (GLushort *) RING_API_GETCPOINTER(2,"GLushort"),* (GLushort *) RING_API_GETCPOINTER(3,"GLushort"),* (GLushort *) RING_API_GETCPOINTER(4,"GLushort"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ free(RING_API_GETCPOINTER(1,"GLushort"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ free(RING_API_GETCPOINTER(2,"GLushort"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ free(RING_API_GETCPOINTER(3,"GLushort"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(4))
+ free(RING_API_GETCPOINTER(4,"GLushort"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -881,4 +899,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glcolor4f",ring_glColor4f);
ring_vm_funcregister("glcolor4d",ring_glColor4d);
ring_vm_funcregister("glcolor4ub",ring_glColor4ub);
+ ring_vm_funcregister("glcolor4us",ring_glColor4us);
}
