I'm trying to migrate my Mosaic-tile plugin, that takes a texture and chops it up into smaller textures that then can be manipulated individually. Is there any way to expose, presumably what DrawingCanvas is already doing, to support drawing a texture into a texture?
Thanks.
http://blackhornettechnologies.com/Construct2Stuff/Mosaic/MosaicRotationExample/
This is what I was doing in C2:
<loop>...
this.cells[y][x].Sides[index] = this.runtime.glwrap.createEmptyTexture(actualCellWidth, actualCellHeight, this.runtime.linearSampling, false);
}
glw.setRenderingToTexture(this.cells[y][x].Sides[index]);
glw.setOpacity(this.opacity);
// Set the cropping size to the cell size (width&height).
glw.setSize(actualCellWidth, actualCellHeight);
glw.resetModelView();
glw.scale(1, -1);
glw.translate(-(x*cellWidth + actualCellWidth/2),-(y*cellHeight + actualCellHeight/2));
glw.updateModelView();
glw.setTexture(this.sides[index]);
glw.quad(x1,y1,x2,y2,x3,y3,x4,y4);