363 |
lightParam.Light = ZVec(-1,-1,1); |
lightParam.Light = ZVec(-1,-1,1); |
364 |
lightParam.Light_w = 0.0; |
lightParam.Light_w = 0.0; |
365 |
|
|
366 |
DBG(dbg) << "Paperquad: " << |
DBG(dbg_paperquad) << "Paperquad: " << |
367 |
lightParam.orig << " " << |
lightParam.orig << " " << |
368 |
lightParam.e0 << " " << |
lightParam.e0 << " " << |
369 |
lightParam.e1 << " " << |
lightParam.e1 << " " << |
382 |
double nonl = coords1.nonlinearity(ctr, len); |
double nonl = coords1.nonlinearity(ctr, len); |
383 |
|
|
384 |
int dice = (int)(len * nonl * dicefactor) + 2; |
int dice = (int)(len * nonl * dicefactor) + 2; |
385 |
DBG(dbg) << "Dice: " << dice <<"\\n"; |
DBG(dbg_paperquad) << "Dice: " << dice <<"\\n"; |
386 |
|
|
387 |
float vertices[dice][dice][5]; |
float vertices[dice][dice][5]; |
388 |
int indices[dice-1][2*dice]; |
int indices[dice-1][2*dice]; |
408 |
ZPt t = coords2inv.transform(p); |
ZPt t = coords2inv.transform(p); |
409 |
vertices[ix][iy][0] = t.x; |
vertices[ix][iy][0] = t.x; |
410 |
vertices[ix][iy][1] = t.y; |
vertices[ix][iy][1] = t.y; |
411 |
DBG(dbg) << " vert: " << |
DBG(dbg_paperquad) << " vert: " << |
412 |
ix << " " << |
ix << " " << |
413 |
iy << " : " << |
iy << " : " << |
414 |
vertices[ix][iy][0] << " " << |
vertices[ix][iy][0] << " " << |
426 |
|
|
427 |
for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); ++it) { |
for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); ++it) { |
428 |
|
|
429 |
DBG(dbg) << "Pass\\n"; |
DBG(dbg_paperquad) << "Pass\\n"; |
430 |
(*it).setUp_VP(&lightParam); |
(*it).setUp_VP(&lightParam); |
431 |
|
|
432 |
DBG(dbg) << "Going to multidraw\\n"; |
DBG(dbg_paperquad) << "Going to multidraw\\n"; |
433 |
GLERR |
GLERR |
434 |
glMultiDrawElementsEXT(GL_QUAD_STRIP, |
glMultiDrawElementsEXT(GL_QUAD_STRIP, |
435 |
counts, GL_UNSIGNED_INT, (const GLvoid **)indps, dice-1); |
counts, GL_UNSIGNED_INT, (const GLvoid **)indps, dice-1); |
436 |
|
|
437 |
DBG(dbg) << "Teardown\\n"; |
DBG(dbg_paperquad) << "Teardown\\n"; |
438 |
GLERR |
GLERR |
439 |
(*it).tearDown_VP(); |
(*it).tearDown_VP(); |
440 |
GLERR |
GLERR |
441 |
DBG(dbg) << "Pass over\\n"; |
DBG(dbg_paperquad) << "Pass over\\n"; |
442 |
|
|
443 |
} |
} |
444 |
|
|
445 |
glUnlockArraysEXT(); |
glUnlockArraysEXT(); |
446 |
glPopClientAttrib(); |
glPopClientAttrib(); |
447 |
DBG(dbg) << "Pass over\\n"; |
DBG(dbg_paperquad) << "Passes over\\n"; |
448 |
|
|
449 |
GLERR |
GLERR |
450 |
""", |
""", |
653 |
|
|
654 |
""", |
""", |
655 |
"RenderCode" : """ |
"RenderCode" : """ |
656 |
DBG(dbg) << "Irregular quad\\n"; |
DBG(dbg_irregularquad) << "Irregular quad\\n"; |
657 |
|
|
658 |
setup(); |
setup(); |
659 |
GLERR; |
GLERR; |
713 |
*/ |
*/ |
714 |
float texf = 0.5; |
float texf = 0.5; |
715 |
|
|
716 |
DBG(dbg) << "Dice: " << dicex << " " << dicey << " " << diceb << "\n"; |
DBG(dbg_irregularquad) << "Dice: " << dicex << " " << dicey << " " << diceb << "\n"; |
717 |
|
|
718 |
for (int pass = 0; pass < (mode ? 4 : 1); pass++) { |
for (int pass = 0; pass < (mode ? 4 : 1); pass++) { |
719 |
|
|