jeg har lidt problemer med følgende kode:
Code: Select all
#ifdef _DEBUG
assert(glVertexPointer!=0);
assert(glDrawArrays!=0);
GLint value;
glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
assert(value>0);
#endif
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(particles.size(), GL_FLOAT, 0, particle_array);
glDrawArrays(GL_POINTS, 0, particles.size());
glDisableClientState(GL_VERTEX_ARRAY);