Problems with tutorials on Chman's lwjgl site

Yes, more errors for me ::slight_smile:

I know Chman frequents this board, so I’ll post my plea for help here :slight_smile:

Whenever I run any of the examples here http://chman-area.tuxfamily.org/tutorials.html (namely the first few), I get this error:

the log file doesn’t seem to give any more information than is already given :frowning:

I’d really appreciate any help :slight_smile:

wglSwapInterval is an optional extension, so it may or may not exist depending on your hardware. You need to check for its avalibility before calling it, something like:

if (gl.wglSwapInterval)
    gl.wglSwapInterval(...)

Okay, excellent, got it sorted :slight_smile:

Thanks very much!

Orangy Tang was faster than me… :slight_smile:

Just a question to Pwincess : what is your video card ?

++
Chman

She’s not using hardware acceleration; look at the list of dlls there. That’s why wglSwapIntervalEXT isn’t available. And of course Chman has forgotten to check first before using it :wink:

Hey, you’ll all be pleased to know the new 0.5 release which is lurking on Brian’s harddrive now throws a friendly runtime exception instead of blowing up the VM if you try to access a function which is not available (in the debug build only of course).

Cas :slight_smile:

… and 0.5 will even refuse to run in software mode in the first place…

  • elias

Whatwhatwhatwhatwhat?

Not supporting software mode anymore? :-/

No. Is that a problem for you? I always thought the software opengl driver was way too slow to be usable.

  • elias

Is is way too slow isn’t it! Usually when you get software mode it’s because you’ve done something wrong! So we’re filtering it out completely.

Cas :slight_smile:

You’re not going to leave that as an option to the developer? Starting to head down that dark path that Java3D took :wink:

maybe a weird place topost this but http://nehe.gamedev.net/ has a new tutorial up. #41

[win2k, lwjgl 0.7]
ForYourInformation about Matrox G400 problem and resolution. This may help you to find out why Matrox card is not easy to get play well.

  1. Run RainingDay demo from http://chman-area.tuxfamily.org
    C:\projects\java\games\J3d\lwjgl\RainingDay>c:\j2sdk1.4.2\bin\java.exe -cp …\li
    b\lwjgl.jar;. -Djava.library.path=…\lib RainingDay
    Selecting NT display mode check
    Querying Matrox Millennium G400 - English device
    -> result: we are back in dos prompt without any exceptions. Now, we need to go through source code to see what’s wrong…

  2. Comment Display.getAvailableDisplayModes() method
    After System.out analyze, I comment getAvailableDisplayModes() method in init_lwjgl method.

Then manually set a window params, not really idea what all params should be, but this one seems to run.
Window.create(“Lwjgl Test”, 50, 50, 640, 480, 16, 0, 8, 0);
-> Result: will give a core dump and errors from .dll library

  1. Comment GL.wglSwapIntervalEXT(1) method
    More analyzing and I comment the following block in init_gl() method.
    // if(GLCaps.WGL_EXT_swap_control) {
    // GL.wglSwapIntervalEXT(1);
    // }

-> RESULTS: Demo started first time in Matrox G400 suxor card. I made a short google. SwapInterval requires “WGL_EXT_swap_control” extension.

GLInfo.exe (Tom Nuydens (delphi3d@gamedeveloper.org)) tool can list all GL capabilities. It says my G400 has GL_EXT_swap_control extension, but still it crashes if is called from the app.

I could not find gl.wglSwapInterval method anymore in lwgl v0.7 library.

  • Can anyone say what am I missing now if always comment that row from each demo?

  • And why is it, that DisplayModes iterator crashes without any coredumps or extensions?

  • Last major problem: If I move a focus away from lwjgl window to an another program, then lwgjl frame is freezed. I cannot switch back to it, all can I do is just kill it.