void RenderArray(Shader *sh, Primitive prim, int count, const char *fmt, int vertsize, void *vbuf, int *ibuf) { sh->Set(); GLenum glprim = GetPrimitive(prim); SetAttribs(0, fmt, vertsize, (char *)vbuf); if (ibuf) { glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glDrawElements(glprim, count, GL_UNSIGNED_INT, ibuf); } else glDrawArrays(glprim, 0, count); UnSetAttribs(fmt); }
void RenderArray(Primitive prim, int tcount, int vcount, const char *fmt, int vertsize1, uint vbo, uint ibo = 0, int vertsize2 = 0, uint vbo2 = 0) { GLenum glprim = GetPrimitive(prim); SetAttribs(vbo, fmt, vertsize1, vbo2, vertsize2); if (ibo) { glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo); glDrawElements(glprim, tcount, GL_UNSIGNED_INT, 0); } else { glDrawArrays(glprim, 0, vcount); } UnSetAttribs(fmt); }
void Geometry::RenderDone() { UnSetAttribs(fmt); }
void Geometry::RenderDone() { UnSetAttribs(fmt.c_str()); }