Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  LWJGL 0.6 Prerelease  (Read 2925 times)
0 Members and 1 Guest are viewing this topic.
Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Posted 2003-04-30 18:50:30 »

Just a quick mention - 0.6 has been released as a prerelease.
Unless anything crops up - this will become the 0.6 release. But we just want to make sure that we don't have any annoying bugs in there - like 0.5.

Yes, we have introduced yet some api changes - we'll add some docs describing the changes, but for now you'll have to wait for the final 0.6 to get that document and a whats changed doc

files:
http://sourceforge.net/project/showfiles.php?group_id=58488

changelog:
http://sourceforge.net/project/shownotes.php?release_id=156274

0.6 is due out Real Soon Now - a day or two, probably this weekend  Roll Eyes

Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #1 - Posted 2003-04-30 18:52:17 »

oh, and please hammer away on the examples/tests!
post *any* problems to this thread, the LWJGL SourceForge Forum or to brian@matzon.dk

Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #2 - Posted 2003-04-30 21:02:17 »

Is Mac OS X support going to make it into this release?

Don't send a man to do a monkey's work.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #3 - Posted 2003-04-30 21:53:15 »

Quote
Is Mac OS X support going to make it into this release?

afaik, no  :-/
It *is* being worked on, but the main man Gregory Pierce got tied up in Real Life when the war broke out (he works for CNN).

I can't tell you how close it is to being done either - maybe Gregory could drop a line (swpalmer, where you looking at mac os x too??? - I know that someone else was interested in doing the mac os x port too).
For the record, LWJGL is pretty easy to port - so anybody with a bit of c/c++ experience can make a port...

Offline cfmdobbie

Senior Member




Who, me?


« Reply #4 - Posted 2003-04-30 22:12:17 »

Woah!  Do you think it's safe to jump into a pre-release release without testing the waters first? Shocked

Hellomynameis Charlie Dobbie.
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #5 - Posted 2003-04-30 23:04:58 »

Quote
Woah!  Do you think it's safe to jump into a pre-release release without testing the waters first? Shocked


hehe. it's not - and that's the point Smiley

betatesting... and this is a way to accelerate it Wink

弾幕 ☆ @mahonnaiseblog
Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #6 - Posted 2003-05-01 05:31:58 »

the reason for the pre release is that we get a tested release, before we announce it to all the sites we can think of. 0.5 wasn't announced because of the bugs found in their. Look at the download statistics, and you'll see the difference it makes to have a release announced!

Offline cfmdobbie

Senior Member




Who, me?


« Reply #7 - Posted 2003-05-01 11:49:54 »

Um, I'm having a little trouble here.  Version 0.6 has changed a lot I see...  DisplayModes no longer have any depth, alpha or stencil values, there's no Display.isCreated(), or in fact Display.create()...  Ah, it's all migrated to the GL constructor...

Do you have a sample Display and GL initialisation fragment to give me a few pointers?  None of the examples seem to use anything beyond WxH@bpp - what is the loop we're expected to go through this time to create a GL context?  Something like this maybe:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
get all available DisplayModes
filter for required mode features
foreach filtered mode dm
      Display.setDisplayMode(dm)
      if no exception thrown
            confirm dm.width = Display.width etc
                  if anything not correct, restart loop with next DisplayMode
            call GL constructor with required GL attributes
            if exception thrown
                  restart loop with next DisplayMode
            else
                  break and continue.


How do we know what values the OpenGL hardware supports for depth buffers etc?  Or should we just try everything that would be likely to exist?


N.B. Display.java:132 - Javadoc mentions using getDisplayMode(), which doesn't exist.

Hellomynameis Charlie Dobbie.
Offline elias

Senior Member





« Reply #8 - Posted 2003-05-01 19:26:26 »

We went back to the old style of setting up the display - you can only query available w*h*f, not the pixel format. Trying to fetch the available pixel formats from GL wasn't worth the trouble. So yes - you're back to guessing the modes, and catching failures.

- elias

Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #9 - Posted 2003-05-01 20:42:27 »

I just wrote an email to chman - pasting some of what I wrote here too, since it is usefull:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
Basically, GL/Display/Window mode has been altered, along with new easy AL construction management.

Where you would before just do a
Display.create(...)
gl.create(...)

you now do:

 windowed mode:
  just create a gl instance with required values (use the constructor with location/size)

 fullscreen:
  set display mode
  create a gl instance with required values(use the constructor with no location/size)

and when swapping buffer, we now use gl.paint(); instead. We also added a gl.tick(); method, which must get called. This method checks eventqueue and all other internal stuff that is needed...

regarding OpenAL, instead of doing opendevice, createcontext, makeContextCurrent and all that - you now do:

AL al = new AL(...);
al.create();
//use sucker
al.destroy();

In other words, when creating an OpenAL instance, the default device and a default context will be automagically created for you!

hope this helps a bit... will talk to the others about doing a small WHATSNEW document, and one describing 0.5 -> 0.6 upgrade path


yes documentation *always* lag behind... - just hammer us for info... (on second note, hammer Elias or Cas Smiley)

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #10 - Posted 2003-05-01 20:59:30 »

Ok, upgrading my app...

I'm still a little confused, it was mentioned above, but I still don't understand...

in GL constructor, what exactly is the int alpha, int depth and int stencil values and where do we get them? I only worry about widthxheightxbpp.


Don't send a man to do a monkey's work.
Online princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #11 - Posted 2003-05-01 22:42:49 »

ADS values are those that your application requires. If you don't need alpha, depth, or stencil, specify 0!

Cas Smiley

Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #12 - Posted 2003-05-02 14:15:24 »

Ok, got the display working... but now my texture loading doesn't appear to be working. No changes have been made, and it worked fine prior to 0.6. Any ideas?

1  
2  
3  
4  
5  
6  
7  
8  
9  
IntBuffer buf =
            ByteBuffer
                .allocateDirect(4)
                .order(ByteOrder.nativeOrder())
                .asIntBuffer();
        int bufPtr = Sys.getDirectBufferAddress(buf);

        //Create the texture
       gl.genTextures(1, bufPtr);


results in the following error:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)

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.CoreGL.genTextures(Native Method)
      at monkey.texture.TextureManager.loadTexture(TextureManager.java:235)
      at monkey.geometry.text.Font2D.setFontTexture(Font2D.java:82)
      at monkey.geometry.text.Font2D.<init>(Font2D.java:64)
      at test.TestMain.init(TestMain.java:158)
      at monkey.AbstractGame.start(AbstractGame.java:44)
      at test.TestMain.main(TestMain.java:196)

Dynamic libraries:
0x00400000 - 0x00406000       C:\Program Files\Java\j2re1.4.1\bin\javaw.exe
0x77F80000 - 0x77FFA000       C:\WINNT\system32\ntdll.dll
0x77DB0000 - 0x77E0B000       C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F31000       C:\WINNT\system32\KERNEL32.dll
0x77D30000 - 0x77D9D000       C:\WINNT\system32\RPCRT4.dll
0x77E10000 - 0x77E6F000       C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F79000       C:\WINNT\system32\GDI32.dll
0x78000000 - 0x78046000       C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D45C000       C:\Program Files\Java\j2re1.4.1\bin\client\jvm.dll
0x77570000 - 0x775A0000       C:\WINNT\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000       C:\Program Files\Java\j2re1.4.1\bin\hpi.dll
0x6D300000 - 0x6D30D000       C:\Program Files\Java\j2re1.4.1\bin\verify.dll
0x6D210000 - 0x6D229000       C:\Program Files\Java\j2re1.4.1\bin\java.dll
0x6D320000 - 0x6D32D000       C:\Program Files\Java\j2re1.4.1\bin\zip.dll
0x10000000 - 0x1003B000       C:\WINNT\SYSTEM32\lwjgl.dll
0x5F580000 - 0x5F5A7000       C:\WINNT\System32\DINPUT.dll
0x69510000 - 0x695D7000       C:\WINNT\System32\OPENGL32.dll
0x6FAC0000 - 0x6FADF000       C:\WINNT\System32\GLU32.dll
0x51000000 - 0x51047000       C:\WINNT\System32\DDRAW.dll
0x728A0000 - 0x728A6000       C:\WINNT\System32\DCIMAN32.dll
0x6D000000 - 0x6D0FA000       C:\Program Files\Java\j2re1.4.1\bin\awt.dll
0x77800000 - 0x7781E000       C:\WINNT\System32\WINSPOOL.DRV
0x76620000 - 0x76630000       C:\WINNT\system32\MPR.dll
0x75E60000 - 0x75E7A000       C:\WINNT\System32\IMM32.dll
0x77A50000 - 0x77B3C000       C:\WINNT\system32\ole32.dll
0x6D180000 - 0x6D1D0000       C:\Program Files\Java\j2re1.4.1\bin\fontmanager.dll
0x72D90000 - 0x72E03000       C:\WINNT\System32\D3DIM.DLL
0x6D2D0000 - 0x6D2DE000       C:\Program Files\Java\j2re1.4.1\bin\net.dll
0x75050000 - 0x75058000       C:\WINNT\System32\WSOCK32.dll
0x75030000 - 0x75043000       C:\WINNT\System32\WS2_32.DLL
0x75020000 - 0x75028000       C:\WINNT\System32\WS2HELP.DLL
0x6D2E0000 - 0x6D2E8000       C:\Program Files\Java\j2re1.4.1\bin\nio.dll
0x60000000 - 0x60045000       C:\WINNT\System32\MSCTF.dll
0x77920000 - 0x77943000       C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000       C:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000       C:\WINNT\System32\PSAPI.DLL

Local Time = Fri May 02 08:14:05 2003
Elapsed Time = 3
#
# 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_pid1528.log.
# Please refer to the file for further information.
#

Don't send a man to do a monkey's work.
Offline elias

Senior Member





« Reply #13 - Posted 2003-05-02 14:28:38 »

Does the rest of your gl calls work? And did you try the debug version (-ea)?

- elias

Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #14 - Posted 2003-05-02 15:53:37 »

You're right Elias, no gl calls work. As soon as I removed all the texture calls, glShadeMode failed.

Here's how I build the gl object:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
try {
            //create the Display.
           DisplayMode mode = getValidDisplayMode(width, height, bpp);
            if (null == mode) {
                throw new MonkeyRuntimeException("Bad display mode");
            }
           
            if(fullscreen) {
                Display.setDisplayMode(mode);
                gl = new GL(title, bpp, 0, 0, 0);
            } else {
                int x, y;
                x = Toolkit.getDefaultToolkit().getScreenSize().width -
                        (width/2);
                y = Toolkit.getDefaultToolkit().getScreenSize().height -
                        (height/2);
                gl = new GL(title, x, y, width, height, bpp, 0, 0, 0);
            }
            //Display.create(mode, fullscreen, title);

            LoggingSystem.getLoggingSystem().getLogger().log(
                Level.INFO,
                "Created display.");
        } catch (Exception e) {
            LoggingSystem.getLoggingSystem().getLogger().log(
                Level.SEVERE,
                "Failed to create display due to " + e);
            System.exit(1);
        }
       
        glu = new GLU(gl);


here is the error again with the -ea flag turned on.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
Removed 0 duplicate displaymodes
May 2, 2003 9:52:46 AM monkey.system.DisplaySystem getValidDisplayMode
INFO: Setting mode to 640 x 480 x 32 @60Hz
May 2, 2003 9:52:46 AM monkey.system.DisplaySystem initDisplay
INFO: Created display.

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)

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.CoreGL.genTextures(Native Method)
      at monkey.texture.TextureManager.loadTexture(TextureManager.java:235)
      at monkey.geometry.text.Font2D.setFontTexture(Font2D.java:82)
      at monkey.geometry.text.Font2D.<init>(Font2D.java:64)
      at test.TestMain.init(TestMain.java:158)
      at monkey.AbstractGame.start(AbstractGame.java:44)
      at test.TestMain.main(TestMain.java:196)

Dynamic libraries:
0x00400000 - 0x00406000       C:\Program Files\Java\j2re1.4.1\bin\javaw.exe
0x77F80000 - 0x77FFA000       C:\WINNT\system32\ntdll.dll
0x77DB0000 - 0x77E0B000       C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F31000       C:\WINNT\system32\KERNEL32.dll
0x77D30000 - 0x77D9D000       C:\WINNT\system32\RPCRT4.dll
0x77E10000 - 0x77E6F000       C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F79000       C:\WINNT\system32\GDI32.dll
0x78000000 - 0x78046000       C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D45C000       C:\Program Files\Java\j2re1.4.1\bin\client\jvm.dll
0x77570000 - 0x775A0000       C:\WINNT\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000       C:\Program Files\Java\j2re1.4.1\bin\hpi.dll
0x6D300000 - 0x6D30D000       C:\Program Files\Java\j2re1.4.1\bin\verify.dll
0x6D210000 - 0x6D229000       C:\Program Files\Java\j2re1.4.1\bin\java.dll
0x6D320000 - 0x6D32D000       C:\Program Files\Java\j2re1.4.1\bin\zip.dll
0x10000000 - 0x1008A000       C:\WINNT\SYSTEM32\lwjgl_d.dll
0x5F580000 - 0x5F5A7000       C:\WINNT\System32\DINPUT.dll
0x69510000 - 0x695D7000       C:\WINNT\System32\OPENGL32.dll
0x6FAC0000 - 0x6FADF000       C:\WINNT\System32\GLU32.dll
0x51000000 - 0x51047000       C:\WINNT\System32\DDRAW.dll
0x728A0000 - 0x728A6000       C:\WINNT\System32\DCIMAN32.dll
0x6D000000 - 0x6D0FA000       C:\Program Files\Java\j2re1.4.1\bin\awt.dll
0x77800000 - 0x7781E000       C:\WINNT\System32\WINSPOOL.DRV
0x76620000 - 0x76630000       C:\WINNT\system32\MPR.dll
0x75E60000 - 0x75E7A000       C:\WINNT\System32\IMM32.dll
0x77A50000 - 0x77B3C000       C:\WINNT\system32\ole32.dll
0x6D180000 - 0x6D1D0000       C:\Program Files\Java\j2re1.4.1\bin\fontmanager.dll
0x72D90000 - 0x72E03000       C:\WINNT\System32\D3DIM.DLL
0x6D2D0000 - 0x6D2DE000       C:\Program Files\Java\j2re1.4.1\bin\net.dll
0x75050000 - 0x75058000       C:\WINNT\System32\WSOCK32.dll
0x75030000 - 0x75043000       C:\WINNT\System32\WS2_32.DLL
0x75020000 - 0x75028000       C:\WINNT\System32\WS2HELP.DLL
0x6D2E0000 - 0x6D2E8000       C:\Program Files\Java\j2re1.4.1\bin\nio.dll
0x60000000 - 0x60045000       C:\WINNT\System32\MSCTF.dll
0x77920000 - 0x77943000       C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000       C:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000       C:\WINNT\System32\PSAPI.DLL

Local Time = Fri May 02 09:52:46 2003
Elapsed Time = 1
#
# 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_pid1028.log.
# Please refer to the file for further information.
#
Selecting NT display mode check
Querying 3D Prophet NVidia Series device
Querying NetMeeting driver device
Found 114 displaymodes

Don't send a man to do a monkey's work.
Online princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #15 - Posted 2003-05-02 15:58:24 »

You're missing a
1  
2  
gl.create();
gl.determineAvailableExtensions();


Don't worry, you weren't to know...

Cas Smiley

Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #16 - Posted 2003-05-02 16:10:52 »

That did it, thank you.

Don't send a man to do a monkey's work.
Offline darcone

Junior Member




Size matters


« Reply #17 - Posted 2003-05-02 19:30:36 »

Oh so you have to create the GL context by gl.create() ?
Offline EgonOlsen
« Reply #18 - Posted 2003-05-03 18:20:14 »

So how about a simple piece of source code that shows us

a.) how to initialize the display correctly
b.) how to do buffer flipping correctly

That would shorten this thread IMO. LWJGL is a tool for me...i just want to use it, not collect  almost all information i need from a multi-paged thread and guess the stuff that's still missing.

Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #19 - Posted 2003-05-03 19:44:29 »

Your wish, is my command  Grin
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java

This is actually work in progress - but serves to show how to initialize and switch between fullscreen and windowed mode, including how to use the isDirty method.

This is work in progresss, so I will update it as I go along - or it might turn into a DefaultApplication class, which shows how *all* application using lwjgl should initialize / deinitialized (including adding shutdown hooks for VM closing (ressetting display))

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (16 views)
2014-04-15 18:08:23

BurntPizza (14 views)
2014-04-15 03:46:01

UprightPath (27 views)
2014-04-14 17:39:50

UprightPath (12 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (51 views)
2014-04-10 04:04:31

BurntPizza (110 views)
2014-04-08 23:06:04

tom_mai78101 (211 views)
2014-04-05 13:34:39

trollwarrior1 (179 views)
2014-04-04 12:06:45

CJLetsGame (185 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!