APIdia Launch Partner
Top Inners Fields Constructors Methods
com.badlogic.gdx.graphics.glutils

public Class GLVersion

extends Object
Class Inheritance
Imports
com.badlogic.gdx.Application, .Gdx, java.util.regex.Matcher, .Pattern

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private int
private int
private int
private final String
private final String
private final GLVersion.Type
private final String
private final String

Constructor Summary

AccessConstructor and Description
public
GLVersion(Application.ApplicationType appType, String versionString, String vendorString, String rendererString)

Method Summary

Modifier and TypeMethod and Description
private void
extractVersion(String patternString, String versionString)

public String
getDebugVersionString()

Returns: a string with the current GL connection data

public int
getMajorVersion()

Returns: the major version of current GL connection.

public int
getMinorVersion()

Returns: the minor version of the current GL connection.

public int
getReleaseVersion()

Returns: the release version of the current GL connection.

public String
getRendererString()

Returns: the name of the renderer associated with the current GL connection.

public GLVersion.Type
getType()

Returns: what Type of GL implementation this application has access to, e.g. Type#OpenGL or Type#GLES

public String
getVendorString()

Returns: the vendor string associated with the current GL connection

public String
getVersionString()

Returns: The version string as reported by `glGetString(GL_VERSION)`

public boolean

Returns:

true if the current version is higher or equal to the test version
isVersionEqualToOrHigher
(int
the major version to test against
testMajorVersion
,
int
the minor version to test against
testMinorVersion
)

Checks to see if the current GL connection version is higher, or equal to the provided test versions.

private int
parseInt(String v, int defaultValue)

Forgiving parsing of gl major, minor and release versions as some manufacturers don't adhere to spec

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

majorVersionback to summary
private int majorVersion
minorVersionback to summary
private int minorVersion
releaseVersionback to summary
private int releaseVersion
rendererStringback to summary
private final String rendererString
TAGback to summary
private final String TAG
typeback to summary
private final GLVersion.Type type
vendorStringback to summary
private final String vendorString
versionStringback to summary
private final String versionString

Constructor Detail

GLVersionback to summary
public GLVersion(Application.ApplicationType appType, String versionString, String vendorString, String rendererString)

Method Detail

extractVersionback to summary
private void extractVersion(String patternString, String versionString)
getDebugVersionStringback to summary
public String getDebugVersionString()
Returns:String

a string with the current GL connection data

getMajorVersionback to summary
public int getMajorVersion()
Returns:int

the major version of current GL connection. -1 if running headless

getMinorVersionback to summary
public int getMinorVersion()
Returns:int

the minor version of the current GL connection. -1 if running headless

getReleaseVersionback to summary
public int getReleaseVersion()
Returns:int

the release version of the current GL connection. -1 if running headless

getRendererStringback to summary
public String getRendererString()
Returns:String

the name of the renderer associated with the current GL connection. This name is typically specific to a particular configuration of a hardware platform.

getTypeback to summary
public GLVersion.Type getType()
Returns:GLVersion.Type

what Type of GL implementation this application has access to, e.g. Type#OpenGL or Type#GLES

getVendorStringback to summary
public String getVendorString()
Returns:String

the vendor string associated with the current GL connection

getVersionStringback to summary
public String getVersionString()
Returns:String

The version string as reported by `glGetString(GL_VERSION)`

isVersionEqualToOrHigherback to summary
public boolean isVersionEqualToOrHigher(int testMajorVersion, int testMinorVersion)

Checks to see if the current GL connection version is higher, or equal to the provided test versions.

Parameters
testMajorVersion:int

the major version to test against

testMinorVersion:int

the minor version to test against

Returns:boolean

true if the current version is higher or equal to the test version

parseIntback to summary
private int parseInt(String v, int defaultValue)

Forgiving parsing of gl major, minor and release versions as some manufacturers don't adhere to spec

com.badlogic.gdx.graphics.glutils back to summary

public final Enum GLVersion.Type

extends Enum<GLVersion.Type>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final GLVersion.Type
public static final GLVersion.Type
public static final GLVersion.Type
public static final GLVersion.Type

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

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

Field Detail

GLESback to summary
public static final GLVersion.Type GLES
NONEback to summary
public static final GLVersion.Type NONE
OpenGLback to summary
public static final GLVersion.Type OpenGL
WebGLback to summary
public static final GLVersion.Type WebGL

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static GLVersion.Type valueOf(String name)
valuesback to summary
public static GLVersion.Type[] values()