(bind-func gl_render
(let ((models:XTMModel** (alloc 4)))
(lambda (model1:XTMModel* model2:XTMModel* model3:XTMModel* model4:XTMModel*)
(cond ((null? model1)
(println "gl_render recieved null pointer for model1 - did you load the model successfully?"))
((null? model2)
(println "gl_render recieved null pointer for model2 - did you load the model successfully?"))
((null? model3)
(println "gl_render recieved null pointer for model3 - did you load the model successfully?"))
((null? model4)
(println "gl_render recieved null pointer for model4 - did you load the model successfully?"))
(else
(pfill! models model1 model2 model3 model4)
(xtm_render prerender:XTMRENDERCB render:XTMRENDERCB trans:XTMRENDERCB null (cast models i8*))
void)))))