520 |
this->mode = mode; |
this->mode = mode; |
521 |
setup = CallGLCode(string(setupcode.begin(), setupcode.end()).c_str()); |
setup = CallGLCode(string(setupcode.begin(), setupcode.end()).c_str()); |
522 |
""", |
""", |
|
"ExtraClass" : """ |
|
|
Pt lerp(float f, Pt a, Pt b) { |
|
|
return Pt((1 - f) * a.x + f * b.x, |
|
|
(1 - f) * a.y + f * b.y); |
|
|
} |
|
|
""", |
|
523 |
"RenderCode" : "int i=0; i++;", |
"RenderCode" : "int i=0; i++;", |
524 |
"BLAH": """ |
"BLAH" : """ |
525 |
DBG(dbg) << "Irregular quad\\n"; |
DBG(dbg) << "Irregular quad\\n"; |
526 |
|
|
|
AffineCoords &oldcs2 = coords2; |
|
|
{ |
|
|
AffineCoords coords2(oldcs2.center, oldcs2.x * cs2p, oldcs2.y * cs2p); |
|
|
|
|
527 |
setup(); |
setup(); |
528 |
GLERR; |
GLERR; |
529 |
|
|
530 |
AffineCoords cs1inv = coords1.getInverse(); |
CoordSys &cs1inv = *coords1.getInverse(); |
531 |
AffineCoords cs2inv = coords2.getInverse(); |
CoordSys &cs2inv = *coords2.getInverse(); |
532 |
|
|
533 |
// Normalize unit vectors inside coords2 to get border widths |
// Normalize unit vectors inside coords2 to get border widths |
534 |
float bx = border * cs1inv.transform(coords2.transform(cs2inv.transform(coords1.x).normalize())).x; |
float bx = border * cs1inv.transform(coords2.transform(cs2inv.transform(coords1.x).normalize())).x; |
666 |
|
|
667 |
|
|
668 |
glPopAttrib(); |
glPopAttrib(); |
|
} |
|
669 |
""", |
""", |
670 |
} , |
} , |
671 |
|
|