Quick Requirements Test

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Quick Requirements Test

muddyboots
Hello all,

I am new to JOGL, so sorry if these are basic questions.

I am searching for a way to find out if the client machine for my program meets a particular set of requirements.  I am using World Wind, which has the following example for their requirements: http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind/src/gov/nasa/worldwindx/examples/OpenGLSupportTest.java

I'd like to not create a frame/canvas to check the functions/extensions requirements.  Is there a way to do this?  I'd essentially like a function based on those requirements that just returns a true/false for requirements met.

Also, in the example, the line "GLCapabilities caps = new GLCapabilities(GLProfile.getMaxFixedFunc(true));" takes at lease 1 second of execution time (which is a large percentage of such a small program).  Could someone explain what this is doing and is this a normal amount of time?
Reply | Threaded
Open this post in threaded view
|

Re: Quick Requirements Test

Sven Gothel
Administrator
On 12/17/2014 04:38 AM, muddyboots [via jogamp] wrote:

> Hello all,
>
> I am new to JOGL, so sorry if these are basic questions.
>
> I am searching for a way to find out if the client machine for my program
> meets a particular set of requirements.  I am using World Wind, which has the
> following example for their requirements:
> http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind/src/gov/nasa/worldwindx/examples/OpenGLSupportTest.java
>
> I'd like to not create a frame/canvas to check the functions/extensions
> requirements.  Is there a way to do this?
>
> Also, in the example, the line "GLCapabilities caps = new
> GLCapabilities(GLProfile.getMaxFixedFunc(true));" takes at lease 1 second of
> execution time (which is a large percentage of such a small program).  Could
> someone explain what this is doing and is this a normal amount of time?
TestShutdownCompleteNEWT demos initialization costs (time)
  <https://jogamp.org/chuck/view/fwd/job/jogl/lastSuccessfulBuild/label=linux-x86_64-nvidia/testReport/com.jogamp.opengl.test.junit.jogl.acore/TestShutdownCompleteNEWT/test01OneLife/>

[0] Total:                          1335.207ms
[1]  GLProfile.initSingleton():    112.838ms
[2]  Demo Code:                    1211.07ms
[3]  GLInfo:                       0.102ms
[4]  GLProfile.shutdown():         11.197ms

[1] covers whole OpenGL profile initialization,
i.e. probing all available GL context (desktop + embedded).

The high costs of [2] are due to:
 - open a windows, wait for its visibility
 - display the demo for at least 300ms
 - close window

In short, pure initialization [1],
which also covers creation of multiple GLCapabilities instances,
shall be very fast.

You case seems suspicious ..

Your first GLProfile utilization (create instance)
will issue GLProfile.initSingleton().
Maybe you want to explicitly call GLProfile.initSingleton()
and measure its performance.
If this one is as slow as reported >= 1000ms
it clearly doesn't match our ~113ms and hence we some issues.
Its either some OS/Windowing issue, or maybe slow class-loading.

Maybe you can run our test case above for comparison?

+++

To query capabilities w/o window creation, you may simply use:
  GLDrawableFactory.getAvailableCapabilities(..)

<https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLDrawableFactory.html#getAvailableCapabilities%28javax.media.nativewindow.AbstractGraphicsDevice%29>

On the other hand, you may create an offscreen window w/ GL context and perform
your own probing.

  GLDrawableFactory.createOffscreenAutoDrawable(..)

<https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLDrawableFactory.html#createOffscreenAutoDrawable%28javax.media.nativewindow.AbstractGraphicsDevice,%20javax.media.opengl.GLCapabilitiesImmutable,%20javax.media.opengl.GLCapabilitiesChooser,%20int,%20int%29>

~Sven



signature.asc (828 bytes) Download Attachment