mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
implemented a few more PSurface methods
This commit is contained in:
@@ -630,7 +630,9 @@ public abstract class PGL {
|
||||
private boolean needFBOLayer(boolean clear0) {
|
||||
// TODO: need to revise this, on windows we might not want to use FBO layer
|
||||
// even with anti-aliasing enabled...
|
||||
// return !clear0 || fboLayerRequested || 1 < numSamples;
|
||||
boolean res = !clear0 || fboLayerRequested || 1 < numSamples;
|
||||
// System.err.println(res + " " + clear0 + " " + fboLayerRequested + " " + numSamples);
|
||||
// return res;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -802,7 +802,9 @@ public class PJOGL extends PGL {
|
||||
|
||||
|
||||
protected void getBuffers(GLWindow glWindow) {
|
||||
if (USE_JOGL_FBOLAYER && capabilities.isFBO()) {
|
||||
if (false) {
|
||||
// if (capabilities.isFBO()) {
|
||||
// if (USE_JOGL_FBOLAYER && capabilities.isFBO()) {
|
||||
// The onscreen drawing surface is backed by an FBO layer.
|
||||
GLFBODrawable fboDrawable = null;
|
||||
fboDrawable = (GLFBODrawable)glWindow.getDelegatedDrawable();
|
||||
|
||||
@@ -127,6 +127,9 @@ public class PSurfaceNEWT implements PSurface {
|
||||
caps.setDepthBits(PGL.REQUESTED_DEPTH_BITS);
|
||||
caps.setStencilBits(PGL.REQUESTED_STENCIL_BITS);
|
||||
|
||||
caps.setPBuffer(false);
|
||||
caps.setFBO(true);
|
||||
|
||||
caps.setSampleBuffers(true);
|
||||
caps.setNumSamples(2);
|
||||
caps.setBackgroundOpaque(true);
|
||||
@@ -309,12 +312,11 @@ public class PSurfaceNEWT implements PSurface {
|
||||
}
|
||||
|
||||
public void setFrameRate(float fps) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
animator.setFPS((int)fps);
|
||||
}
|
||||
|
||||
public void requestFocus() {
|
||||
// TODO Auto-generated method stub
|
||||
window.requestFocus();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user