mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Sync P3D on Android
This commit is contained in:
@@ -39,8 +39,6 @@ import java.nio.IntBuffer;
|
||||
* By Andres Colubri.
|
||||
*/
|
||||
|
||||
// TODO: restart framebuffer when context changes
|
||||
|
||||
public class PFramebuffer implements PConstants {
|
||||
protected PApplet parent;
|
||||
protected PGraphicsOpenGL pg;
|
||||
|
||||
@@ -34,7 +34,6 @@ import java.util.TimerTask;
|
||||
|
||||
import javax.media.opengl.GL;
|
||||
import javax.media.opengl.GL2;
|
||||
import javax.media.opengl.GL3;
|
||||
import javax.media.opengl.GLAutoDrawable;
|
||||
import javax.media.opengl.GLCapabilities;
|
||||
import javax.media.opengl.GLContext;
|
||||
@@ -210,16 +209,16 @@ public class PGL {
|
||||
public static final int GL_DST_COLOR = GL.GL_DST_COLOR;
|
||||
public static final int GL_SRC_COLOR = GL.GL_SRC_COLOR;
|
||||
|
||||
public static final int GL_FRAMEBUFFER = GL.GL_FRAMEBUFFER;
|
||||
public static final int GL_COLOR_ATTACHMENT0 = GL.GL_COLOR_ATTACHMENT0;
|
||||
public static final int GL_FRAMEBUFFER = GL.GL_FRAMEBUFFER;
|
||||
public static final int GL_COLOR_ATTACHMENT0 = GL.GL_COLOR_ATTACHMENT0;
|
||||
public static final int GL_COLOR_ATTACHMENT1 = GL2.GL_COLOR_ATTACHMENT1;
|
||||
public static final int GL_COLOR_ATTACHMENT2 = GL2.GL_COLOR_ATTACHMENT2;
|
||||
public static final int GL_COLOR_ATTACHMENT3 = GL2.GL_COLOR_ATTACHMENT3;
|
||||
public static final int GL_RENDERBUFFER = GL.GL_RENDERBUFFER;
|
||||
public static final int GL_DEPTH_ATTACHMENT = GL.GL_DEPTH_ATTACHMENT;
|
||||
public static final int GL_STENCIL_ATTACHMENT = GL.GL_STENCIL_ATTACHMENT;
|
||||
public static final int GL_READ_FRAMEBUFFER = GL2.GL_READ_FRAMEBUFFER;
|
||||
public static final int GL_DRAW_FRAMEBUFFER = GL2.GL_DRAW_FRAMEBUFFER ;
|
||||
public static final int GL_COLOR_ATTACHMENT1 = GL2.GL_COLOR_ATTACHMENT1;
|
||||
public static final int GL_COLOR_ATTACHMENT2 = GL2.GL_COLOR_ATTACHMENT2;
|
||||
public static final int GL_COLOR_ATTACHMENT3 = GL2.GL_COLOR_ATTACHMENT3;
|
||||
public static final int GL_READ_FRAMEBUFFER = GL2.GL_READ_FRAMEBUFFER;
|
||||
public static final int GL_DRAW_FRAMEBUFFER = GL2.GL_DRAW_FRAMEBUFFER;
|
||||
|
||||
public static final int GL_VERTEX_SHADER = GL2.GL_VERTEX_SHADER;
|
||||
public static final int GL_FRAGMENT_SHADER = GL2.GL_FRAGMENT_SHADER;
|
||||
|
||||
@@ -1439,8 +1439,7 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
if (primarySurface) {
|
||||
int[] temp = { 0 };
|
||||
pgl.glGetIntegerv(PGL.GL_SAMPLES, temp, 0);
|
||||
if (antialias != temp[0]) {
|
||||
PGraphics.showWarning("Smooth level " + antialias + " not supported. Using " + temp[0] + " instead.");
|
||||
if (antialias != temp[0] && 1 < temp[0] && 1 < antialias) {
|
||||
antialias = temp[0];
|
||||
}
|
||||
}
|
||||
@@ -2944,7 +2943,7 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
smooth = true;
|
||||
|
||||
if (maxSamples < level) {
|
||||
PGraphics.showWarning("Smooth level not supported by the video card. Using " + maxSamples + " instead.");
|
||||
PGraphics.showWarning("Smooth level " + level + " is not supported by the hardware. Using " + maxSamples + " instead.");
|
||||
level = maxSamples;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user