diff options
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLContext.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLContext.java | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index 5a4631560..8c3ca9c5b 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -201,21 +201,36 @@ public abstract class GLContext { public abstract void setGL(GL gl); /** - * Returns the attached user object for the given name to this GLContext/GL. + * Returns the attached user object for the given name to this GLContext. */ public Object getAttachedObject(int name) { return attachedObjects.get(new Integer(name)); } /** - * Sets the attached user object for the given name to this GLContext/GL. - * Returns the previous set object or null. + * Returns the attached user object for the given name to this GLContext. + */ + public Object getAttachedObject(String name) { + return attachedObjects.get(name); + } + + /** + * Sets the attached user object for the given name to this GLContext. + * Returns the previously set object or null. */ public Object putAttachedObject(int name, Object obj) { return attachedObjects.put(new Integer(name), obj); } /** + * Sets the attached user object for the given name to this GLContext. + * Returns the previously set object or null. + */ + public Object putAttachedObject(String name, Object obj) { + return attachedObjects.put(name, obj); + } + + /** * Classname, GL, GLDrawable */ public final String toString() { |