implemented a few more PSurface methods

This commit is contained in:
codeanticode
2014-11-15 17:15:03 -07:00
parent 1766260e29
commit 9a44cb85e3
3 changed files with 11 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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();

View File

@@ -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();
}