(bind-func shader_prepare_draw
(lambda (shader:ShaderProgram* tex:Texture* instances:i32 is_points:i1)
(glUniform1i (glGetUniformLocation (id shader) "isPoints") (if is_points 1 0))
(glUniform1i (glGetUniformLocation (id shader) "isTextured") (if (or (null? tex) is_points) 0 1))
(glUniform1i (glGetUniformLocation (id shader) "diffuseTexture") 1)
(glUniform1i (glGetUniformLocation (id shader) "instances") instances)
(glUniform1i (glGetUniformLocation (id shader) "emitVColour") XTM_EMIT_VCOLOUR)
void))