starting the refactoring of PGL

This commit is contained in:
codeanticode
2013-09-08 14:07:47 -04:00
parent e2b9f2f552
commit 764616c9e1
6 changed files with 875 additions and 677 deletions

View File

@@ -532,7 +532,7 @@ public class PGraphicsOpenGL extends PGraphics {
public PGraphicsOpenGL() {
if (pgl == null) {
pgl = new PGL(this);
pgl = createPGL(this);
}
if (tessellator == null) {
@@ -1699,6 +1699,12 @@ public class PGraphicsOpenGL extends PGraphics {
}
// Factory method
static public PGL createPGL(PGraphicsOpenGL pg) {
return new PGL(pg);
}
@Override
public PGL beginPGL() {
flush();
@@ -1768,6 +1774,13 @@ public class PGraphicsOpenGL extends PGraphics {
pgl.drawBuffer(currentFramebuffer.getDefaultDrawBuffer());
}
public void beginReadPixels() {
pgCurrent.beginPixelsOp(OP_READ);
}
public void endReadPixels() {
pgCurrent.endPixelsOp();
}
protected void beginPixelsOp(int op) {
FrameBuffer pixfb = null;