Update RingOpenGL - Add Function (Source Code) : void glColorMaterial(GLenum face,GLenum mode)
@@ -1130,6 +1130,24 @@ RING_FUNC(ring_glColorMask)
glColorMask( (GLboolean ) RING_API_GETNUMBER(1), (GLboolean ) RING_API_GETNUMBER(2), (GLboolean ) RING_API_GETNUMBER(3), (GLboolean ) RING_API_GETNUMBER(4));
}
+
+RING_FUNC(ring_glColorMaterial)
+{
+ if ( RING_API_PARACOUNT != 2 ) {
+ RING_API_ERROR(RING_API_MISS2PARA);
+ 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 ;
+ }
+ glColorMaterial( (GLenum ) (int) RING_API_GETNUMBER(1), (GLenum ) (int) RING_API_GETNUMBER(2));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -1194,4 +1212,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glcolor4usv",ring_glColor4usv);
ring_vm_funcregister("glcolor4uiv",ring_glColor4uiv);
ring_vm_funcregister("glcolormask",ring_glColorMask);
+ ring_vm_funcregister("glcolormaterial",ring_glColorMaterial);
}
