public class TLspOpenGLProfile extends Object
ILcdGLDrawable
using the isCompatible(com.luciad.view.opengl.binding.ILcdGLDrawable)
isCompatible} method. The profile could check, for instance, for certain OpenGL versions or for
the availability of certain OpenGL extensions. A few commonly used profiles are defined as
constants in this class; other, more specific profiles can be created by extending this class.
Each ILspPainter
must advertise the
profile it minimally requires via its getRequiredOpenGLProfile
method.Modifier and Type | Field and Description |
---|---|
static TLspOpenGLProfile |
FRAMEBUFFER_OBJECT
Matches
LIGHTSPEED_MINIMUM plus the GL_ARB_framebuffer_object extension. |
static TLspOpenGLProfile |
LIGHTSPEED_MINIMUM
Matches OpenGL versions 2.0 and above
|
Modifier | Constructor and Description |
---|---|
protected |
TLspOpenGLProfile()
Creates a new
TLspOpenGLProfile . |
protected |
TLspOpenGLProfile(TLspOpenGLProfile aBaseLine)
Creates a new
TLspOpenGLProfile with the specified baseline. |
|
TLspOpenGLProfile(TLspOpenGLProfile aRequiredBaseLine,
int aRequiredMajorVersion,
int aRequiredMinorVersion,
String[] aRequiredExtensions)
Creates a new
TLspOpenGLProfile with the specified baseline, minimum OpenGL version
and
list of required OpenGL extensions. |
Modifier and Type | Method and Description |
---|---|
String[] |
getExtensions()
Returns the extensions of this OpenGL profile as a string array
|
int |
getMajorVersion()
Returns the major version number of this OpenGL profile
|
int |
getMinorVersion()
Returns the minor version number of this OpenGL profile
|
static TLspOpenGLProfile |
getSuperSet(TLspOpenGLProfile... aProfiles)
Creates a new OpenGL profile which matches a superset of the supplied profiles.
|
boolean |
isCompatible(ILcdGLDrawable aGLDrawable)
Determines whether or not the supplied
ILcdGLDrawable meets all the requirements of
this OpenGL profile. |
static boolean |
isExtensionAvailable(ILcdGLDrawable aGLDrawable,
String aExtension)
Determines whether the specified OpenGL extension is supported in the given
ILcdGLDrawable . |
void |
setExtensions(String[] aExtensions)
Sets the extensions of this OpenGL profile to the given extensions
|
void |
setMajorVersion(int aMajorVersion)
Sets the major version number of this OpenGL profile to the given version number
|
void |
setMinorVersion(int aMinorVersion)
Sets the minor version number of this OpenGL profile to the given version number
|
String |
toString() |
public static final TLspOpenGLProfile LIGHTSPEED_MINIMUM
public static final TLspOpenGLProfile FRAMEBUFFER_OBJECT
LIGHTSPEED_MINIMUM
plus the GL_ARB_framebuffer_object
extension.public TLspOpenGLProfile(TLspOpenGLProfile aRequiredBaseLine, int aRequiredMajorVersion, int aRequiredMinorVersion, String[] aRequiredExtensions)
TLspOpenGLProfile
with the specified baseline, minimum OpenGL version
and
list of required OpenGL extensions.aRequiredBaseLine
- base lineaRequiredMajorVersion
- major OpenGL version numberaRequiredMinorVersion
- minor OpenGL version numberaRequiredExtensions
- list of required extensionsprotected TLspOpenGLProfile()
TLspOpenGLProfile
. No baseline profile is set.TLspOpenGLProfile(TLspOpenGLProfile)
protected TLspOpenGLProfile(TLspOpenGLProfile aBaseLine)
TLspOpenGLProfile
with the specified baseline. If the baseline profile
is
not null
, isCompatible(com.luciad.view.opengl.binding.ILcdGLDrawable)
will
delegate to the baseline.aBaseLine
- the base line profilepublic int getMajorVersion()
public void setMajorVersion(int aMajorVersion)
aMajorVersion
- the new major version number for this OpenGL profilepublic int getMinorVersion()
public void setMinorVersion(int aMinorVersion)
aMinorVersion
- the new minor version number for this OpenGL profilepublic String[] getExtensions()
null
public void setExtensions(String[] aExtensions)
aExtensions
- the new set of extensions for this OpenGL profilepublic static TLspOpenGLProfile getSuperSet(TLspOpenGLProfile... aProfiles)
aProfiles
.aProfiles
- array of profiles to grouppublic boolean isCompatible(ILcdGLDrawable aGLDrawable)
ILcdGLDrawable
meets all the requirements of
this OpenGL profile. If this method returns false, a painter which requires this profile will
not work with the given drawable. This method may check for specific OpenGL versions, for the
availability of certain OpenGL extensions, or for any other implementation-specific variable
that a painter might depend on (e.g. maximum texture resolution, matrix stack depths, ...).aGLDrawable
- the ILcdGLDrawable
in which to check for compatibilitypublic static boolean isExtensionAvailable(ILcdGLDrawable aGLDrawable, String aExtension)
ILcdGLDrawable
.aGLDrawable
- the ILcdGLDrawable
in which to check for availability of the
extensionaExtension
- the extension to check for