getCanvas() in PGL so libraries can access the native surface

This commit is contained in:
codeanticode
2013-11-20 18:57:18 -05:00
parent c6ca72efbb
commit c18ddffdc0
2 changed files with 18 additions and 0 deletions
+7
View File
@@ -334,6 +334,13 @@ public abstract class PGL {
}
/**
* Return the native canvas the OpenGL context associated to this PGL object
* is rendering to (if any).
*/
public abstract Object getCanvas();
protected abstract void setFps(float fps);
+11
View File
@@ -213,6 +213,17 @@ public class PJOGL extends PGL {
}
@Override
public Canvas getCanvas() {
return canvas;
}
// public Object getCanvas() {
// return canvas;
// }
@Override
protected void setFps(float fps) {
if (!setFps || targetFps != fps) {