752 |
DBG(dbg_paperquad) << "Dice: " << dice <<"\\n"; |
DBG(dbg_paperquad) << "Dice: " << dice <<"\\n"; |
753 |
|
|
754 |
float *vertices = new float[dice * dice * 5]; |
float *vertices = new float[dice * dice * 5]; |
755 |
int *indices = new int[(dice-1) * (2*dice)]; |
|
756 |
|
int *indices = new int[(dice) * (2*dice)]; |
757 |
|
|
758 |
#define VERTICES3(x, y, z) vertices[((x)*dice + (y))*5 + (z)] |
#define VERTICES3(x, y, z) vertices[((x)*dice + (y))*5 + (z)] |
759 |
#define VERTICES2(x, y) vertices[((x)*dice + (y))*5] |
#define VERTICES2(x, y) vertices[((x)*dice + (y))*5] |
802 |
if(flags & PAPERQUAD_USE_VERTEX_PROGRAM) { |
if(flags & PAPERQUAD_USE_VERTEX_PROGRAM) { |
803 |
glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT); |
glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT); |
804 |
glInterleavedArrays(GL_T2F_V3F, 5*sizeof(float), vertices); |
glInterleavedArrays(GL_T2F_V3F, 5*sizeof(float), vertices); |
805 |
glLockArraysEXT(0, dice*dice*5); |
glLockArraysEXT(0, dice*dice); |
806 |
|
|
807 |
for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); ++it) { |
for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); ++it) { |
808 |
|
|