mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
getCanvas() in PGL so libraries can access the native surface
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user