From d2a6e3ac6ef57cf716212c12f13900280e5a86be Mon Sep 17 00:00:00 2001 From: albanc Date: Wed, 13 Aug 2003 12:06:39 +0000 Subject: Issue number: Obtained from: Submitted by: albanc Reviewed by: CVS: ---------------------------------------------------------------------- CVS: Issue number: CVS: If this change addresses one or more issues, CVS: added isInitialized() method for enabling querrying pBuffer initialization status CVS: Reviewed by: Posted a mail with diff() and explanations on the jogl CVS mailing list 2 days ago. Since I got no objections (nor replies) and since the addition can not affect compatibility nor stability, considering this as a yes. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@53 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/net/java/games/jogl/GLPbuffer.java | 3 +++ src/net/java/games/jogl/impl/GLPbufferImpl.java | 9 +++++++++ 2 files changed, 12 insertions(+) (limited to 'src/net/java/games') diff --git a/src/net/java/games/jogl/GLPbuffer.java b/src/net/java/games/jogl/GLPbuffer.java index de85f6950..5df8d616c 100644 --- a/src/net/java/games/jogl/GLPbuffer.java +++ b/src/net/java/games/jogl/GLPbuffer.java @@ -60,4 +60,7 @@ public interface GLPbuffer extends GLDrawable { /** Unbinds the pbuffer from its internal texture target. */ public void releaseTexture(); + + /** Querries initialization status a this pBuffer*/ + public boolean isInitialized(); } diff --git a/src/net/java/games/jogl/impl/GLPbufferImpl.java b/src/net/java/games/jogl/impl/GLPbufferImpl.java index 860fc8422..028929573 100644 --- a/src/net/java/games/jogl/impl/GLPbufferImpl.java +++ b/src/net/java/games/jogl/impl/GLPbufferImpl.java @@ -54,6 +54,7 @@ public class GLPbufferImpl implements GLPbuffer { // GLPbufferContext private GLContext context; private GLDrawableHelper drawableHelper = new GLDrawableHelper(); + private boolean isInitialized=false; public GLPbufferImpl(GLContext context) { this.context = context; @@ -176,6 +177,13 @@ public class GLPbufferImpl implements GLPbuffer { public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {} + /** Querries initialization status a this pBuffer + * @return true if initialized + * */ + public boolean isInitialized(){ + return isInitialized; + } + //---------------------------------------------------------------------- // Internals only below this point // @@ -183,6 +191,7 @@ public class GLPbufferImpl implements GLPbuffer { class InitAction implements Runnable { public void run() { drawableHelper.init(GLPbufferImpl.this); + isInitialized=true; } } private InitAction initAction = new InitAction(); -- cgit v1.2.3