29package com.jogamp.opengl;
31import com.jogamp.common.GlueGenVersion;
33import com.jogamp.common.os.Platform;
34import com.jogamp.common.util.VersionUtil;
35import com.jogamp.common.util.JogampVersion;
38import java.util.jar.Manifest;
40import com.jogamp.nativewindow.AbstractGraphicsConfiguration;
41import com.jogamp.nativewindow.AbstractGraphicsDevice;
42import com.jogamp.nativewindow.AbstractGraphicsScreen;
43import com.jogamp.nativewindow.NativeSurface;
49 protected JoglVersion(
final String packageName,
final Manifest mf) {
50 super(packageName, mf);
57 final String packageName =
"com.jogamp.opengl";
58 final Manifest mf = VersionUtil.getManifest(
JoglVersion.class.getClassLoader(), packageName);
66 public StringBuilder
toString(
final GL gl, StringBuilder sb) {
67 sb = super.toString(sb).append(Platform.getNewline());
73 return toString(gl,
null).toString();
78 sb =
new StringBuilder();
85 if(
null != availCaps && availCaps.size()>0) {
86 for(
int i=0; i<availCaps.size(); i++) {
87 sb.append(
"\t").append(availCaps.get(i)).append(Platform.getNewline());
94 sb.append(
"\tnone").append(Platform.getNewline());
96 sb.append(Platform.getNewline());
102 sb =
new StringBuilder();
107 sb.append(Platform.getNewline()).append(Platform.getNewline());
109 sb.append(
"Capabilities for ").append(device.toString()).append(Platform.getNewline());
112 System.err.println(gle.getMessage());
119 sb =
new StringBuilder();
124 sb.append(
"GLProfiles on device ").append(device).append(Platform.getNewline());
130 if(withCapabilitiesInfo) {
136 public static StringBuilder
getGLInfo(
final GL gl,
final StringBuilder sb) {
139 public static StringBuilder
getGLInfo(
final GL gl,
final StringBuilder sb,
final boolean withCapabilitiesAndExtensionInfo) {
140 return getGLInfo(gl, sb,
true, withCapabilitiesAndExtensionInfo, withCapabilitiesAndExtensionInfo);
143 public static StringBuilder
getGLInfo(
final GL gl, StringBuilder sb,
144 final boolean withAvailabilityInfo,
145 final boolean withCapabilitiesInfo,
146 final boolean withExtensionInfo) {
148 sb =
new StringBuilder();
150 sb.append(VersionUtil.SEPERATOR).append(Platform.getNewline());
152 sb.append(
"Null GL instance").append(Platform.getNewline());
153 sb.append(VersionUtil.SEPERATOR).append(Platform.getNewline());
159 sb.append(device.toString()).append(
':').append(Platform.getNewline());
160 if( withAvailabilityInfo ) {
163 sb.append(Platform.getNewline());
167 if( withCapabilitiesInfo ) {
177 public static StringBuilder
getGLStrings(
final GL gl, StringBuilder sb,
final boolean withExtensions) {
179 sb =
new StringBuilder();
183 sb.append(Platform.getNewline());
185 sb.append(Platform.getNewline());
187 sb.append(Platform.getNewline());
189 sb.append(Platform.getNewline());
190 sb.append(
"Impl. class ").append(gl.getClass().getCanonicalName());
191 sb.append(Platform.getNewline());
193 sb.append(Platform.getNewline());
195 sb.append(Platform.getNewline());
197 sb.append(Platform.getNewline());
202 sb.append(Platform.getNewline());
204 sb.append(Platform.getNewline());
206 sb.append(Platform.getNewline());
207 if( withExtensions ) {
209 sb.append(Platform.getNewline());
212 sb.append(Platform.getNewline());
213 if( withExtensions ) {
215 sb.append(Platform.getNewline());
217 sb.append(VersionUtil.SEPERATOR);
224 sb =
new StringBuilder();
226 sb.append(
"OS: ").append(Platform.getOSName()).append(
", version ").append(Platform.getOSVersion()).append(
", arch ").append(Platform.getArchName());
227 sb.append(Platform.getNewline());
229 sb.append(Platform.getNewline());
231 sb.append(Platform.getNewline());
233 sb.append(Platform.getNewline());
234 sb.append(
"JOGL GIT sha1 ").append(getImplementationCommit());
235 sb.append(Platform.getNewline());
239 public static void main(
final String args[]) {
240 System.err.println(VersionUtil.getPlatformInfo());
241 System.err.println(GlueGenVersion.getInstance());
Abstraction for an OpenGL rendering context.
final StringBuilder append(final StringBuilder sb)
abstract GLDrawable getGLDrawable()
Returns the write-drawable this context uses for framebuffer operations.
abstract String getGLExtensionsString()
Returns a non-null (but possibly empty) string containing the space-separated list of available exten...
final VersionNumber getGLVersionNumber()
Returns this context OpenGL version.
final GLRendererQuirks getRendererQuirks()
Returns the instance of GLRendererQuirks, allowing one to determine workarounds.
final VersionNumberString getGLVendorVersionNumber()
Returns the vendor's version, i.e.
abstract String getPlatformExtensionsString()
Returns a non-null (but possibly empty) string containing the space-separated list of available platf...
final String getGLVersion()
Returns a valid OpenGL version string, ie
abstract int getGLExtensionCount()
Returns the number of OpenGL extensions.
abstract int getPlatformExtensionCount()
Returns the number of platform extensions.
final List< GLCapabilitiesImmutable > getAvailableCapabilities(AbstractGraphicsDevice device)
Returns an array of available GLCapabilities for the device.
static GLDrawableFactory getFactory(final GLProfile glProfile)
Returns the sole GLDrawableFactory instance.
A generic exception for OpenGL errors used throughout the binding as a substitute for RuntimeExceptio...
Specifies the the OpenGL profile.
static String glAvailabilityToString(final AbstractGraphicsDevice device)
static AbstractGraphicsDevice getDefaultDevice()
static StringBuilder getGLStrings(final GL gl, StringBuilder sb, final boolean withExtensions)
static StringBuilder getGLInfo(final GL gl, final StringBuilder sb, final boolean withCapabilitiesAndExtensionInfo)
static StringBuilder getAvailableCapabilitiesInfo(final AbstractGraphicsDevice device, StringBuilder sb)
static volatile JoglVersion jogampCommonVersionInfo
JoglVersion(final String packageName, final Manifest mf)
String toString(final GL gl)
static JoglVersion getInstance()
static void main(final String args[])
static StringBuilder getGLInfo(final GL gl, final StringBuilder sb)
static StringBuilder getAllAvailableCapabilitiesInfo(AbstractGraphicsDevice device, StringBuilder sb)
static StringBuilder getDefaultOpenGLInfo(AbstractGraphicsDevice device, StringBuilder sb, final boolean withCapabilitiesInfo)
static StringBuilder getGLInfo(final GL gl, StringBuilder sb, final boolean withAvailabilityInfo, final boolean withCapabilitiesInfo, final boolean withExtensionInfo)
static StringBuilder getGLStrings(final GL gl, final StringBuilder sb)
StringBuilder getBriefOSGLBuildInfo(final GL gl, StringBuilder sb)
StringBuilder toString(final GL gl, StringBuilder sb)
AbstractGraphicsScreen getScreen()
Return the screen this graphics configuration is valid for.
A interface describing a graphics device in a toolkit-independent manner.
AbstractGraphicsDevice getDevice()
Return the device this graphics configuration is valid for.
AbstractGraphicsConfiguration getGraphicsConfiguration()
Returns the graphics configuration corresponding to this window.
static final int GL_SHADING_LANGUAGE_VERSION
GL_ES_VERSION_2_0, GL_VERSION_2_0, GL_ARB_shading_language_100 Alias for: GL_SHADING_LANGUAGE_VERSION...
boolean hasGLSL()
Indicates whether this GL object supports GLSL.
boolean hasBasicFBOSupport()
Returns true if basic FBO support is available, otherwise false.
GLProfile getGLProfile()
Returns the GLProfile associated with this GL object.
GLContext getContext()
Returns the GLContext associated which this GL object.
boolean isFunctionAvailable(String glFunctionName)
Returns true if the specified OpenGL core- or extension-function can be used successfully through thi...
int getSwapInterval()
Return the current swap interval.
boolean hasFullFBOSupport()
Returns true if full FBO support is available, otherwise false.
NativeSurface getNativeSurface()
Returns the associated NativeSurface of this NativeSurfaceHolder.
static final int GL_VERSION
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_VERSION" with express...
String glGetString(int name)
Entry point to C language function: const GLubyte * {@native glGetString}(GLenum name) Part of GL_...
static final int GL_RENDERER
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_RENDERER" with expres...
static final int GL_VENDOR
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_VENDOR" with expressi...