Multisampling hack to have antialiased onscreen rendering through FBOs

This commit is contained in:
codeanticode
2012-05-31 04:13:49 +00:00
parent 87fa075f5b
commit 10076317de
4 changed files with 160 additions and 13 deletions

View File

@@ -1706,12 +1706,14 @@ public class PGraphicsOpenGL extends PGraphics {
protected void beginPixelsOp(int op) {
if (primarySurface) {
// We read or write from the back buffer, where all the
// drawing in the current frame is taking place.
if (op == OP_READ) {
pgl.glReadBuffer(PGL.GL_BACK);
} else {
pgl.glDrawBuffer(PGL.GL_BACK);
if (pgl.primaryIsDoubleBuffered()) {
// We read or write from the back buffer, where all the
// drawing in the current frame is taking place.
if (op == OP_READ) {
pgl.glReadBuffer(PGL.GL_BACK);
} else {
pgl.glDrawBuffer(PGL.GL_BACK);
}
}
offscreenNotCurrent = false;
} else {