android sync

This commit is contained in:
codeanticode
2012-09-03 01:48:59 +00:00
parent 3fa1dcfc06
commit 45930bda63
7 changed files with 1694 additions and 1661 deletions
+21 -5
View File
@@ -3,8 +3,7 @@
/*
Part of the Processing project - http://processing.org
Copyright (c) 2011 Andres Colubri
Copyright (c) 2010 Ben Fry and Casey Reas
Copyright (c) 2011-12 Ben Fry and Casey Reas
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -520,10 +519,19 @@ public class PGL {
}
protected int primaryDrawBuffer() {
if (PGraphicsOpenGL.screenFramebuffer.glFbo != 0) {
return GLES20.GL_BACK;
} else {
return GLES20.GL_COLOR_ATTACHMENT0;
}
}
/*
protected boolean primaryIsDoubleBuffered() {
return PGraphicsOpenGL.screenFramebuffer.glFbo != 0;
}
*/
protected boolean primaryIsFboBacked() {
return PGraphicsOpenGL.screenFramebuffer.glFbo != 0;
@@ -569,6 +577,14 @@ public class PGL {
}
protected void bindBackBufferTex() {
}
protected void unbindBackBufferTex() {
}
///////////////////////////////////////////////////////////
// Frame rendering
@@ -576,8 +592,8 @@ public class PGL {
protected void beginOnscreenDraw(boolean clear) {
if (clear && !FORCE_SCREEN_FBO) {
// Simplest scenario: clear mode means we clear both the color and depth buffers.
// No need for saving front color buffer, etc.
// Simplest scenario: clear mode means we clear both the color and depth
// buffers. No need for saving front color buffer, etc.
GLES20.glClearColor(0, 0, 0, 0);
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
PGraphicsOpenGL.screenFramebuffer.glFbo = 0;