com.sun.opengl.impl

Class GLContextShareSet


public class GLContextShareSet
extends Object

Provides a mechanism by which OpenGL contexts can share textures and display lists in the face of multithreading and asynchronous context creation as is inherent in the AWT and Swing.

Method Summary

static void
contextCreated(GLContext context)
static void
contextDestroyed(GLContext context)
static GLContext
getShareContext(GLContext contextToCreate)
static void
registerForObjectTracking(GLContext olderContextOrNull, GLContext newContext, GLContext realShareContext)
Indicates that the two supplied contexts (which must be able to share textures and display lists) should be in the same namespace for tracking of server-side object creation and deletion.
static void
registerSharing(GLContext share1, GLContext share2)
Indicate that contexts share1 and share2 will share textures and display lists.

Method Details

contextCreated

public static void contextCreated(GLContext context)

contextDestroyed

public static void contextDestroyed(GLContext context)

getShareContext

public static GLContext getShareContext(GLContext contextToCreate)

registerForObjectTracking

public static void registerForObjectTracking(GLContext olderContextOrNull,
                                             GLContext newContext,
                                             GLContext realShareContext)
Indicates that the two supplied contexts (which must be able to share textures and display lists) should be in the same namespace for tracking of server-side object creation and deletion. Because the sharing necessary behind the scenes is different than that requested at the user level, the two notions are different. This must be called immediately after the creation of the new context (which is the second argument) before any server-side OpenGL objects have been created in that context.

registerSharing

public static void registerSharing(GLContext share1,
                                   GLContext share2)
Indicate that contexts share1 and share2 will share textures and display lists. Both must be non-null.

Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.