Hello Guest

OpenGL Support

  • 23 Replies
  • 24628 Views
*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
OpenGL Support
« Reply #15 on: September 21, 2005, 18:17:36 »
Test by creating the AWTGLCanvas then?

 - elias

*

Offline CaseyB

  • ***
  • 118
OpenGL Support
« Reply #16 on: September 22, 2005, 21:41:24 »
Ok, I found an old P2 350MHz that has an integrated video card with no OpenGL support!  I tried loading the OpenGL version of my class that used the AWTGLCanvas and it loaded without an error, but it puked on the first paint!  So I went back to using the Pbuffer.  What happened there was that when it tried to create the Pbuffer it would throw and exception so I just caught that and used that to decide to load the Java2D version.  Here is my code for that part:
Code: [Select]
try
{
     System.out.println("Trying OpenGL");
     try
     {
          Pbuffer buff = new Pbuffer(1, 1, new PixelFormat(), null, null);

          if (classLoader == null)
          {
               theClass = Class.forName(openGL);
          }
          else
          {
               theClass = classLoader.loadClass(openGL);
          }
          System.out.println("OpenGL Succeeded");
          buff.destroy();
     }
     catch(ExceptionInInitializerError eiie)
     {
          System.out.println("OpenGL Failed\nTrying Java2D");
          if (classLoader == null)
          {
               theClass = Class.forName(java2D);
          }
          else
          {
               theClass = classLoader.loadClass(java2D);
          }
          System.out.println("Java2D Succeeded");
     }
}
catch (ClassNotFoundException cnfe)
{
     throw cnfe;
}

OpenGL Support
« Reply #17 on: October 21, 2005, 17:50:55 »
It seems to me that by doing it this way (trying to create a Display or PBuffer), you're still missing out on what capabilities are available.  For instance, what if I want to use GL15 instead of GL11?  Is this something that has been bugged for LWJGL or are we just out of luck?

*

Offline CaseyB

  • ***
  • 118
OpenGL Support
« Reply #18 on: October 21, 2005, 19:09:58 »
Once you create an OpenGL context you should be able to test for an OpenGL 1.5 feature and decide based on that.

OpenGL Support
« Reply #19 on: October 21, 2005, 19:33:16 »
*Confused* I thought it was just decided that the getCapabilities() method causes a JVM crash?  Or is there another method that I'm missing?

Oh... are you saying that I should create the Display first, and then call getCapabilities() on the newly created GLContext?  Perhaps I misinterpreted what the original problem was...

*

Offline CaseyB

  • ***
  • 118
OpenGL Support
« Reply #20 on: October 21, 2005, 20:32:16 »
Quote from: "Whackjack"
are you saying that I should create the Display first, and then call getCapabilities() on the newly created GLContext?


Exactly!  The problem that I was having was that I couldn't be sure that the client machine had an OpenGL capable graphics card so I just wanted to test for OpenGL 1.1 compatability.  In order to do the getCapabilities() test you need an existing OpenGL context.  So you should perform the check on an existing Display... unless I have totally gone off my rocker! :)

OpenGL Support
« Reply #21 on: October 21, 2005, 21:15:04 »
Thanks, CaseyB... That does make sense, even if it's a little backwards.  I guess I was thinking along the lines you were in that you could test for OpenGL compatibility before trying to create anything.
I'll keep this in my mind for future reference.  Thanks again!

OpenGL Support
« Reply #22 on: December 06, 2005, 22:44:57 »
The bug in the JVM has been resolved in Mustang b62:

Quote

   6342951   Implicit null checks on large objects cause JVM crash


That was quick, I expected a 3 year wait atleast!  :roll:
Edit: 1.5.0_7 seems to have the update too...everybody update!
DP

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
OpenGL Support
« Reply #23 on: December 07, 2005, 08:24:25 »
Quote from: "darkprophet"
The bug in the JVM has been resolved in Mustang b62:

Quote

   6342951   Implicit null checks on large objects cause JVM crash


That was quick, I expected a 3 year wait atleast!  :roll:
Edit: 1.5.0_7 seems to have the update too...everybody update!
DP


Nah, anything else than ASAP would have been strange, since this bug is a sure way to issue DOS attacks on a running (shared) JVM.

 - elias