Top Description Inners Fields Constructors Methods
jogamp.opengl

public Class GLContextShareSet

extends Object
Class Inheritance
Imports
java.util.ArrayList, .IdentityHashMap, .Iterator, .Map, .Set, com.jogamp.opengl.GLContext, .GLException

Provides a deterministic mechanism by which OpenGL contexts can share textures and display lists in the face of multithreading and asynchronous context creation.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final boolean
private static final Map<GLContext, GLContextShareSet.ShareSet>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
addEntry(final GLContext context, final GLContextShareSet.ShareSet share)

public static synchronized boolean
contextCreated(final GLContext context)

Mark the given GLContext as being created.

public static synchronized boolean
contextDestroyed(final GLContext context)

Mark the given GLContext as being destroyed.

private static GLContextShareSet.ShareSet
entryFor(final GLContext context)

public static synchronized ArrayList<GLContext>
getCreatedShares(final GLContext context)

Returns a new array-list of created GLContext shared with the given GLContext.

private static synchronized Set<GLContext>
public static synchronized ArrayList<GLContext>
getDestroyedShares(final GLContext context)

Returns a new array-list of destroyed GLContext shared with the given GLContext.

private static synchronized Set<GLContext>
public static synchronized GLContext
getSharedMaster(final GLContext context)

Returns the shared master GLContext of the given context if shared, otherwise return null.

public static synchronized boolean
hasCreatedSharedLeft(final GLContext context)

Returns true if the given GLContext has shared and created GLContext left including itself, otherwise false.

public static synchronized boolean
isShared(final GLContext context)

Returns true if the given GLContext is shared, otherwise false.

public static synchronized void
registerSharing(final GLContext slave, final GLContext master)

Indicate that contexts slave and master will share textures and display lists.

private static GLContextShareSet.ShareSet
removeEntry(final GLContext context)

private static String
toHexString(final long hex)

public static synchronized void
unregisterSharing(final GLContext lastContext)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUGback to summary
private static final boolean DEBUG
shareMapback to summary
private static final Map<GLContext, GLContextShareSet.ShareSet> shareMap

Constructor Detail

GLContextShareSetback to summary
public GLContextShareSet()

Method Detail

addEntryback to summary
private static void addEntry(final GLContext context, final GLContextShareSet.ShareSet share)
contextCreatedback to summary
public static synchronized boolean contextCreated(final GLContext context)

Mark the given GLContext as being created.

contextDestroyedback to summary
public static synchronized boolean contextDestroyed(final GLContext context)

Mark the given GLContext as being destroyed.

entryForback to summary
private static GLContextShareSet.ShareSet entryFor(final GLContext context)
getCreatedSharesback to summary
public static synchronized ArrayList<GLContext> getCreatedShares(final GLContext context)

Returns a new array-list of created GLContext shared with the given GLContext.

getCreatedSharesImplback to summary
private static synchronized Set<GLContext> getCreatedSharesImpl(final GLContext context)
getDestroyedSharesback to summary
public static synchronized ArrayList<GLContext> getDestroyedShares(final GLContext context)

Returns a new array-list of destroyed GLContext shared with the given GLContext.

getDestroyedSharesImplback to summary
private static synchronized Set<GLContext> getDestroyedSharesImpl(final GLContext context)
getSharedMasterback to summary
public static synchronized GLContext getSharedMaster(final GLContext context)

Returns the shared master GLContext of the given context if shared, otherwise return null.

Returns the given context, if it is a shared master.

hasCreatedSharedLeftback to summary
public static synchronized boolean hasCreatedSharedLeft(final GLContext context)

Returns true if the given GLContext has shared and created GLContext left including itself, otherwise false.

isSharedback to summary
public static synchronized boolean isShared(final GLContext context)

Returns true if the given GLContext is shared, otherwise false.

registerSharingback to summary
public static synchronized void registerSharing(final GLContext slave, final GLContext master)

Indicate that contexts slave and master will share textures and display lists. Both must be non-null.

removeEntryback to summary
private static GLContextShareSet.ShareSet removeEntry(final GLContext context)
toHexStringback to summary
private static String toHexString(final long hex)
unregisterSharingback to summary
public static synchronized void unregisterSharing(final GLContext lastContext)
jogamp.opengl back to summary

private Class GLContextShareSet.ShareSet

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Map<GLContext, GLContext>
private final Map<GLContext, GLContext>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public final void
addIfNew(final GLContext slave, final GLContext master)

public final void
addNew(final GLContext slave, final GLContext master)

public void
public void
public Set<GLContext>
public Set<GLContext>
public final GLContext
getMaster(final GLContext ctx)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

createdSharesback to summary
private final Map<GLContext, GLContext> createdShares
destroyedSharesback to summary
private final Map<GLContext, GLContext> destroyedShares

Constructor Detail

ShareSetback to summary
private ShareSet()

Method Detail

addIfNewback to summary
public final void addIfNew(final GLContext slave, final GLContext master)
addNewback to summary
public final void addNew(final GLContext slave, final GLContext master)
contextCreatedback to summary
public void contextCreated(final GLContext ctx)
contextDestroyedback to summary
public void contextDestroyed(final GLContext ctx)
getCreatedSharesback to summary
public Set<GLContext> getCreatedShares()
getDestroyedSharesback to summary
public Set<GLContext> getDestroyedShares()
getMasterback to summary
public final GLContext getMaster(final GLContext ctx)