Top Description Inners Fields Constructors Methods
com.jogamp.gluegen.opengl

public Class GLEmitter

extends ProcAddressEmitter
Class Inheritance
Known Direct Subclasses
com.jogamp.gluegen.opengl.nativesig.NativeSignatureEmitter
Static Imports
java.util.logging.Level.INFO

A subclass of ProcAddressEmitter with special OpenGL-specific configuration abilities.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum
pack-priv class

Field Summary

Modifier and TypeField and Description
private final Map<MethodBinding, MethodBinding>
Inherited from com.jogamp.gluegen.procaddress.ProcAddressEmitter:
emittedTableEntriesPROCADDRESS_VAR_PREFIXtableClassNametableClassPackagetableWriterWRAP_PREFIX

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int
addExtensionListOfAliasedSymbols2Doc(final BuildStaticGLInfo glDocInfo, final StringBuilder buf, final String sep1, final String sep2, final String name)

private int
addExtensionListOfSymbol2Doc(final BuildStaticGLInfo glDocInfo, final StringBuilder buf, final String sep1, final String name)

public int
addExtensionsOfSymbols2Doc(StringBuilder buf, final String sep1, final String sep2, final String first)

public void
protected JavaConfiguration
createConfig()

Overrides com.jogamp.gluegen.procaddress.ProcAddressEmitter.createConfig.

Create the object that will read and store configuration information for this JavaEmitter.
public void
emitDefine(final ConstantDefinition def, final String
If optionalComment is non-null, the emitter can emit that string as a comment providing extra information about the define.
optionalComment
)

Overrides com.jogamp.gluegen.JavaEmitter.emitDefine.

Implements com.jogamp.gluegen.GlueEmitter.emitDefine.

protected void
protected List<MethodBinding>
expandMethodBinding(final MethodBinding binding)

Overrides com.jogamp.gluegen.JavaEmitter.expandMethodBinding.

In order to implement Buffer Object variants of certain functions we generate another MethodBinding which maps the void* argument to a Java long.
protected void
protected GLConfiguration
public boolean
protected void
mangleBinding(final MethodBinding binding)

Overrides com.jogamp.gluegen.JavaEmitter.mangleBinding.

Allow specializations to modify the given MethodBinding before expanding and emission.
protected boolean
protected boolean
protected void
protected void
renameExtensionsIntoCore(final GLConfiguration config, final BuildStaticGLInfo glInfo, final boolean isSemHeader)

private void
Inherited from com.jogamp.gluegen.procaddress.ProcAddressEmitter:
beginFunctionsbeginProcAddressTablebeginStructscallThroughProcAddressemitProcAddressTableEntryForStringendFunctionsfixSecurityModifiersgenerateMethodBindingEmittersgenerateModifiedEmittersgetFunctionPointerTypedefNamegetProcAddressConfighasFunctionPointerTypedefruntimeExceptionTypeunsupportedExceptionType

Field Detail

bufferObjectMethodBindingsback to summary
private final Map<MethodBinding, MethodBinding> bufferObjectMethodBindings

Constructor Detail

GLEmitterback to summary
public GLEmitter()

Method Detail

addExtensionListOfAliasedSymbols2Docback to summary
private int addExtensionListOfAliasedSymbols2Doc(final BuildStaticGLInfo glDocInfo, final StringBuilder buf, final String sep1, final String sep2, final String name)
addExtensionListOfSymbol2Docback to summary
private int addExtensionListOfSymbol2Doc(final BuildStaticGLInfo glDocInfo, final StringBuilder buf, final String sep1, final String name)
addExtensionsOfSymbols2Docback to summary
public int addExtensionsOfSymbols2Doc(StringBuilder buf, final String sep1, final String sep2, final String first)
beginEmissionback to summary
public void beginEmission(final GlueEmitterControls controls) throws IOException

Overrides com.jogamp.gluegen.JavaEmitter.beginEmission.

Implements com.jogamp.gluegen.GlueEmitter.beginEmission.

Doc from com.jogamp.gluegen.GlueEmitter.beginEmission.

Begin the emission of glue code. This might include opening files, emitting class headers, etc.

Annotations
@Override
createConfigback to summary
protected JavaConfiguration createConfig()

Overrides com.jogamp.gluegen.procaddress.ProcAddressEmitter.createConfig.

Doc from com.jogamp.gluegen.JavaEmitter.createConfig.

Create the object that will read and store configuration information for this JavaEmitter.

Annotations
@Override
emitDefineback to summary
public void emitDefine(final ConstantDefinition def, final String optionalComment) throws Exception

Overrides com.jogamp.gluegen.JavaEmitter.emitDefine.

Implements com.jogamp.gluegen.GlueEmitter.emitDefine.

Parameters
optionalComment:String

Doc from com.jogamp.gluegen.GlueEmitter.emitDefine.

If optionalComment is non-null, the emitter can emit that string as a comment providing extra information about the define.

Annotations
@Override
endProcAddressTableback to summary
protected void endProcAddressTable() throws Exception

Overrides com.jogamp.gluegen.procaddress.ProcAddressEmitter.endProcAddressTable.

Annotations
@Override
expandMethodBindingback to summary
protected List<MethodBinding> expandMethodBinding(final MethodBinding binding)

Overrides com.jogamp.gluegen.JavaEmitter.expandMethodBinding.

In order to implement Buffer Object variants of certain functions we generate another MethodBinding which maps the void* argument to a Java long. The generation of emitters then takes place as usual. We do however need to keep track of the modified MethodBinding object so that we can also modify the emitters later to inform them that their argument has changed. We might want to push this functionality down into the MethodBinding (i.e., mutators for argument names). We also would need to inform the CMethodBindingEmitter that it is overloaded in this case (though we default to true currently).

Annotations
@Override
generateModifiedEmittersback to summary
protected void generateModifiedEmitters(final JavaMethodBindingEmitter baseJavaEmitter, final List<FunctionEmitter> emitters)

Overrides com.jogamp.gluegen.procaddress.ProcAddressEmitter.generateModifiedEmitters.

Annotations
@Override
getGLConfigback to summary
protected GLConfiguration getGLConfig()
isBufferObjectMethodBindingback to summary
public boolean isBufferObjectMethodBinding(final MethodBinding binding)
mangleBindingback to summary
protected void mangleBinding(final MethodBinding binding)

Overrides com.jogamp.gluegen.JavaEmitter.mangleBinding.

Doc from com.jogamp.gluegen.JavaEmitter.mangleBinding.

Allow specializations to modify the given MethodBinding before expanding and emission.

Implementation sets the binding's native name to it's interface name, which is the final aliased shortest name. The latter is used for the proc-address-table etc ..

Annotations
@Override
needsBufferObjectVariantback to summary
protected boolean needsBufferObjectVariant(final FunctionSymbol sym)
needsModifiedEmittersback to summary
protected boolean needsModifiedEmitters(final FunctionSymbol sym)

Overrides com.jogamp.gluegen.procaddress.ProcAddressEmitter.needsModifiedEmitters.

Annotations
@Override
renameExtensionsIntoCoreback to summary
protected void renameExtensionsIntoCore()
renameExtensionsIntoCoreback to summary
protected void renameExtensionsIntoCore(final GLConfiguration config, final BuildStaticGLInfo glInfo, final boolean isSemHeader)
unifyExtensionsback to summary
private void unifyExtensions(final GlueEmitterControls controls)
com.jogamp.gluegen.opengl back to summary

pack-priv final Enum GLEmitter.BufferObjectKind

extends Enum<GLEmitter.BufferObjectKind>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final GLEmitter.BufferObjectKind
public static final GLEmitter.BufferObjectKind
public static final GLEmitter.BufferObjectKind
public static final GLEmitter.BufferObjectKind
public static final GLEmitter.BufferObjectKind

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static GLEmitter.BufferObjectKind
public static GLEmitter.BufferObjectKind[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ARRAYback to summary
public static final GLEmitter.BufferObjectKind ARRAY
ELEMENTback to summary
public static final GLEmitter.BufferObjectKind ELEMENT
INDIRECTback to summary
public static final GLEmitter.BufferObjectKind INDIRECT
PACK_PIXELback to summary
public static final GLEmitter.BufferObjectKind PACK_PIXEL
UNPACK_PIXELback to summary
public static final GLEmitter.BufferObjectKind UNPACK_PIXEL

Constructor Detail

BufferObjectKindback to summary
private BufferObjectKind()

Method Detail

valueOfback to summary
public static GLEmitter.BufferObjectKind valueOf(String name)
valuesback to summary
public static GLEmitter.BufferObjectKind[] values()
com.jogamp.gluegen.opengl back to summary

pack-priv Class GLEmitter.ExtensionUnifier

extends Object
implements SymbolFilter
Class Inheritance
All Implemented Interfaces
com.jogamp.gluegen.SymbolFilter

Field Summary

Modifier and TypeField and Description
private List<ConstantDefinition>
private List<FunctionSymbol>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
filterSymbols(final List<ConstantDefinition>
a list of Define objects
inConstList
,
final List<FunctionSymbol>
a list of FunctionSymbol objects
inFuncList
)

Implements com.jogamp.gluegen.SymbolFilter.filterSymbols.

Filters the given constant and function symbols.
public List<ConstantDefinition>
getConstants()

Implements com.jogamp.gluegen.SymbolFilter.getConstants.

Returns the filtered list of constants.
public List<FunctionSymbol>
getFunctions()

Implements com.jogamp.gluegen.SymbolFilter.getFunctions.

Returns the filtered list of function symbols.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constantsback to summary
private List<ConstantDefinition> constants
functionsback to summary
private List<FunctionSymbol> functions

Constructor Detail

ExtensionUnifierback to summary
pack-priv ExtensionUnifier()

Method Detail

filterSymbolsback to summary
public void filterSymbols(final List<ConstantDefinition> inConstList, final List<FunctionSymbol> inFuncList)

Implements com.jogamp.gluegen.SymbolFilter.filterSymbols.

Doc from com.jogamp.gluegen.SymbolFilter.filterSymbols.

Filters the given constant and function symbols. The caller will query the SymbolFilter for its resulting constant and function symbol lists after this routine returns.

Parameters
inConstList:List<ConstantDefinition>

a list of Define objects

inFuncList:List<FunctionSymbol>

a list of FunctionSymbol objects

Annotations
@Override
getConstantsback to summary
public List<ConstantDefinition> getConstants()

Implements com.jogamp.gluegen.SymbolFilter.getConstants.

Doc from com.jogamp.gluegen.SymbolFilter.getConstants.

Returns the filtered list of constants. This method may return a new list, the original list, or null, in which case the original list will be used.

Annotations
@Override
getFunctionsback to summary
public List<FunctionSymbol> getFunctions()

Implements com.jogamp.gluegen.SymbolFilter.getFunctions.

Doc from com.jogamp.gluegen.SymbolFilter.getFunctions.

Returns the filtered list of function symbols. This method may return a new list, the original list, or null, in which case the original list will be used.

Annotations
@Override