LWJGL 0.6

LWJGL 0.6 released
Post any bugs here…

changed between pre and final:


  Fixed segfault when GLX is missing
  Fixed some linux input focus issues
  fix: javadoc
  add example of switching between fullscreen and windowed mode

We still need to update the documentation on the site, this will be done in the following days. Online javadoc has been updated though.

/me goes to sleep

Ok, got my game working with LWJGL 0.6 , gr8 work :slight_smile:
Btw, any good explanation of what gl.tick() does?

/**
       * 'Tick' the window. This must be called at least once per video frame
       * to handle window close requests, moves, paints, etc.
       */

;D

It handles the lwjgl subsystem, that is retrieve messages from the messagequeue associated with the window created (drag, minimize, close).

Ahh, :slight_smile:

I’ve a problem using fullscreen on my ATI9700pro using the 3.2 drivers from ATI and WindowsXP (it works on my GF4-machine under both, Win98 and Win2K).
The error i get is this (Current mode is my debug-output of the choosen mode):


Current mode:640 x 480 x 32 @75Hz

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x691DC6AF
Function=[Unknown.]
Library=F:\WINDOWS\system32\atioglxx.dll

NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.


Current Java thread:
        at org.lwjgl.opengl.BaseGL.nCreate(Native Method)
        at org.lwjgl.opengl.BaseGL.doCreate(Unknown Source)
        at org.lwjgl.opengl.GL.doCreate(Unknown Source)
        at org.lwjgl.Window.create(Unknown Source)
        at com.threed.jpct.GLRenderer.init(GLRenderer.java:122)
        at com.threed.jpct.FrameBuffer.enableRenderer(FrameBuffer.java:451)
        at TerrainGL.render(TerrainGL.java:337)
        at TerrainGL.main(TerrainGL.java:142)

Dynamic libraries:
0x00400000 - 0x00406000         F:\WINDOWS\system32\java.exe
0x77F40000 - 0x77FEE000         F:\WINDOWS\System32\ntdll.dll
0x77E40000 - 0x77F38000         F:\WINDOWS\system32\kernel32.dll
0x77DA0000 - 0x77E3C000         F:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x7807F000         F:\WINDOWS\system32\RPCRT4.dll
0x77BE0000 - 0x77C33000         F:\WINDOWS\system32\MSVCRT.dll
0x6D330000 - 0x6D45C000         F:\Programme\Java\j2re1.4.1\bin\client\jvm.dll
0x77D10000 - 0x77D96000         F:\WINDOWS\system32\USER32.dll
0x77C40000 - 0x77C80000         F:\WINDOWS\system32\GDI32.dll
0x76AF0000 - 0x76B1D000         F:\WINDOWS\system32\WINMM.dll
0x6D1D0000 - 0x6D1D7000         F:\Programme\Java\j2re1.4.1\bin\hpi.dll
0x6D300000 - 0x6D30D000         F:\Programme\Java\j2re1.4.1\bin\verify.dll
0x6D210000 - 0x6D229000         F:\Programme\Java\j2re1.4.1\bin\java.dll
0x6D320000 - 0x6D32D000         F:\Programme\Java\j2re1.4.1\bin\zip.dll
0x6D000000 - 0x6D0FA000         F:\Programme\Java\j2re1.4.1\bin\awt.dll
0x72F70000 - 0x72F93000         F:\WINDOWS\system32\WINSPOOL.DRV
0x76330000 - 0x7634C000         F:\WINDOWS\system32\IMM32.dll
0x77180000 - 0x772A1000         F:\WINDOWS\system32\ole32.dll
0x6D180000 - 0x6D1D0000         F:\Programme\Java\j2re1.4.1\bin\fontmanager.dll
0x51000000 - 0x51047000         F:\WINDOWS\system32\ddraw.dll
0x73B30000 - 0x73B36000         F:\WINDOWS\system32\DCIMAN32.dll
0x6DE00000 - 0x6DE71000         F:\WINDOWS\system32\D3DIM.DLL
0x746A0000 - 0x746E4000         F:\WINDOWS\System32\MSCTF.dll
0x1AEE0000 - 0x1AEED000         F:\Programme\rage3dtweak\GameUtil.dll
0x1AF70000 - 0x1AF80000         F:\WINDOWS\System32\ctagent.dll
0x1AF90000 - 0x1AFCB000         F:\Programme\Java\j2re1.4.1\lib\ext\lwjgl.dll
0x72210000 - 0x72239000         F:\WINDOWS\system32\DINPUT.dll
0x5F0D0000 - 0x5F196000         F:\WINDOWS\system32\OPENGL32.dll
0x68FC0000 - 0x68FDE000         F:\WINDOWS\system32\GLU32.dll
0x6D280000 - 0x6D29E000         F:\Programme\Java\j2re1.4.1\bin\jpeg.dll
0x69000000 - 0x69476000         F:\WINDOWS\system32\atioglxx.dll
0x68D90000 - 0x68D99000         F:\WINDOWS\system32\HID.DLL
0x76620000 - 0x76708000         F:\WINDOWS\system32\SETUPAPI.DLL
0x76C50000 - 0x76C72000         F:\WINDOWS\system32\imagehlp.dll
0x6DA00000 - 0x6DA7D000         F:\WINDOWS\system32\DBGHELP.dll
0x77BD0000 - 0x77BD7000         F:\WINDOWS\system32\VERSION.dll
0x76BB0000 - 0x76BBB000         F:\WINDOWS\system32\PSAPI.DLL

Local Time = Wed May 07 20:09:34 2003
Elapsed Time = 2
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode)
#
# An error report file has been saved as hs_err_pid3200.log.
# Please refer to the file for further information.
#

What i’m doing is this (it fails at the gl.create()-call):


          Display.setDisplayMode(modes[mode]);
          gl = new GL(Config.glWindowName, modes[mode].bpp, 0, zbpp, 0);
          gl.create();
          glu = new GLU(gl);

It works, when i’m doing this (i.e. create a window and close it immediatly):


         gl = new GL(Config.glWindowName, Config.glWindowPositionX, Config.glWindowPositionY, modes[mode].width, modes[mode].height, modes[mode].bpp, 0, zbpp, 0);
          gl.create();
          gl.destroy();

          Display.setDisplayMode(modes[mode]);
          gl = new GL(Config.glWindowName, modes[mode].bpp, 0, zbpp, 0);
          gl.create();
          glu = new GLU(gl);

But i don’t want to do this and i think i’m doing something wrong…any ideas?

Edit: Doesn’t work in 0.5 too…is it a driver bug?

I have a Radeon 9700 non pro, and the FullScreenWindowTest works fine. Does that test work for you ? (it’s in CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java)

Sounds quite odd that you need to create OGL like that…

[quote]I have a Radeon 9700 non pro, and the FullScreenWindowTest works fine. Does that test work for you ? (it’s in CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java)

Sounds quite odd that you need to create OGL like that…
[/quote]
Yes, the test works, but it basically does the same thing: create a window first and destroy it before switching to fullscreen (after pressing the corresponding key). That’s how i came to that “work-around” with the window-creation. However, i haven’t modifed the test to start in fullscreen yet.

Edit: I’ve modified your test to startup in fullscreen and it works fine. I took the code (including findDisplayMode()) and pasted it into my project and…BOOM (i.e. it still crashes :slight_smile: ). I really don’t know what’s wrong here… ???

hmm, sounds strange… can you share the relevant code? - either on this board, or sned it to me personally - brian@matzon.dk.

Failing that, you need to create a minimum test somehow… But you’re definately doing something you shouldn’t…
Try running with -ea to enable debug mode - might give you a clue…

[quote]hmm, sounds strange… can you share the relevant code? - either on this board, or sned it to me personally - brian@matzon.dk.

Failing that, you need to create a minimum test somehow… But you’re definately doing something you shouldn’t…
Try running with -ea to enable debug mode - might give you a clue…
[/quote]
I did this to your test’s initialize()-method to match my application as close as possible…see the creation of a Swing Frame? If i’m doing this, your test crashes too. If not, it runs fine. Am i not allowed to open a Swing Frame before using LWJGL…that would be quite strange… ???


private void initialize() {
    try {

      Frame frame = new Frame();
      frame.pack();
      frame.show();

      //find displaymode
      mode = findDisplayMode(800, 600, 16);

      Display.setDisplayMode(mode);
      gl = new GL("Test", mode.bpp, 0, 0, 0);
      gl.create();

      glu = new GLU(gl);

      glInit();

      Keyboard.create();

      quadPosition = new Vector2f(100f, 100f);
      quadVelocity = new Vector2f(1.0f, 1.0f);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

Edit: Not that it is much usefull to open a Swing Frame when doing fullscreen… ;D…but it should work, shouldn’t it?

Apart from never exiting (missing frame.dispose ;)) it runs fine here…

Got Cas to run the test too - no problems.

Using Catalyst 3.2 ?

[quote]Apart from never exiting (missing frame.dispose ;)) it runs fine here…
[/quote]
Ok, i think it’s a driver bug then…which driver are you using? 3.2, 3.1 or something different?
However, my system is a P4-3Ghz (@3.2) on an Asus P4G8X running WinXP Home SP1 and (as mentioned) the Catalyst 3.2 drivers with an ATI Radeon 9700pro. The problem is present in LWJGL 0.5 (never noticed it there, because i haven’t tried any fullscreen stuff since i’ve upgraded the machine) as well as in LWJGL 0.6. I’ll wait for the 3.4 Catalyst (as the 3.3. will be skipped) and see want happens.
Other than that, 0.6. runs fine for me. The possibility to move the window around is great.
Will the Display/GL initialization stuff change again in a later versions (i hope not… ;D )?

[quote]Using Catalyst 3.2 ?
[/quote]
Yepp!