Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (534)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 4
  ignore  |  Print  
  Anyone working on the NeHe tutorials?  (Read 16693 times)
0 Members and 1 Guest are viewing this topic.
Offline scottellsworth

Junior Newbie




Java games rock!


« Posted 2003-08-27 23:12:07 »

Hi, all.

I note that the first five or so of the NeHe OpenGL tutorials have been converted to jogl.  The later ones appear to be a bit more of a no-man's land.

Is anyone working on said conversion?

(If my understanding reaches a point where I can get them to work correctly, I may submit any I do, but this is terra incognita for me.)

Scott
Offline Caoimhin

Junior Member





« Reply #1 - Posted 2003-09-02 17:04:58 »

Yeah, I'm still working on them.  But this last month has been really busy for me.

If someone else wants to submit a few, let's coordinate and avoid duplicate effort.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #2 - Posted 2003-09-04 18:33:21 »

I can port Nehe to JOGL in few days, but I feel too lazy Grin
If someone wanna team up with me, and hence pass the needed motivation, I'll gladly undust my compiler and get to work :p
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline pepijnve

Junior Member




Java games rock!


« Reply #3 - Posted 2003-09-04 19:46:36 »

I would be more than happy to assist. Which ones are left to be ported?
Offline pepijnve

Junior Member




Java games rock!


« Reply #4 - Posted 2003-09-04 23:08:57 »

I just checked the nehe site. Lesson 1-6 have already been ported, which leaves us 36 lessons to port. 13 each? Grin I suggest we agree on who will do which ones to avoid duplicate efforts.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #5 - Posted 2003-09-05 00:21:15 »

OK, already got the shadow volumes to work with any Milkshape3D model, I might modify my code though to be as fidel as possible to Nehe's Grin
pepijnve I trust you on the way you'll split the ports among us three Tongue cough*no one touches the bump mapping one, it's mine  Grin *cough
Offline Caoimhin

Junior Member





« Reply #6 - Posted 2003-09-05 03:26:06 »

I just finished 7.
Offline pepijnve

Junior Member




Java games rock!


« Reply #7 - Posted 2003-09-05 08:44:01 »

I assigned milkshape model loading and bump mapping to java cool dude specifically.
Is this ok?

pepijnve
8 - Blending
11 - Flag effect
14 - Outline fonts
17 - 2D Texture mapped fonts
20 - Masking
23 - Sphere mapping quadrics
26 - Clipping, reflections, stencil
29 - Blitter function, RAW
33 - TGA Loading
36 - Radial blur
39 - Physical simulation engine
42 - Multiple viewports

Java Cool Dude
9 - Moving bitmaps in 3D
12 - Display lists
15 - Texture mapped fonts
18 - Quadrics
22 - Bump mapping Wink
24 - Token, scissor testing, tga
27 - Shadows
30 - Collision detection
31 - Model loading (Milkshape)
34 - Height mapping
37 - Cell shading
40 - Rope physics

Caoimhin
10 - Moving in a 3D world
13 - Bitmap fonts
16 - Cool looking fog
19 - Particle engine
21 - Lines, timing, orhto, sound
25 - Morphing, loading objects
28 - Bezier patches
32 - Picking, alpha, sorting
35 - Playing AVI files
38 - Resource file textures
41 - Volumetric fog & IPicture
Offline wz

Senior Newbie




Linux sucks!


« Reply #8 - Posted 2003-09-05 16:44:44 »

Hi,

Thank you very much for your effort. It is very helpful for us to learn JOGL.

I run tutorial 2 and 3 and had some problem. I had to modify the 3rd one to use animator, then it worked. Anybody knows why? The 4th through 6th works fine. I am using RH 7.2 and java 1.4.1.

thanks a lot.

wz

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4D699037
Function=XVisualIDFromVisual+0x7
Library=/usr/X11R6/lib/libX11.so.6

Current Java thread:
     at net.java.games.jogl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo0(Native Method)
     at net.java.games.jogl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo(JAWT_DrawingSurface.java:42)
     at net.java.games.jogl.impl.x11.X11OnscreenGLContext.lockSurface(X11OnscreenGLContext.java:167)
     at net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:108)
     - locked <0x445f0780> (a net.java.games.jogl.impl.x11.X11OnscreenGLContext)
     at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162)
     - locked <0x445f0780> (a net.java.games.jogl.impl.x11.X11OnscreenGLContext)
     at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:119)
     at java.awt.Component.setBounds(Component.java:1665)
     at java.awt.BorderLayout.layoutContainer(BorderLayout.java:683)
     - locked <0x44a97790> (a java.awt.Component$AWTTreeLock)
     at java.awt.Container.layout(Container.java:1017)
     at java.awt.Container.doLayout(Container.java:1007)
     at java.awt.Container.validateTree(Container.java:1089)
     at java.awt.Container.validate(Container.java:1064)
     - locked <0x44a97790> (a java.awt.Component$AWTTreeLock)
     at java.awt.Window.show(Window.java:455)
     at Lesson02.main(Lesson02.java:146)

Dynamic libraries:
08048000-0804e000 r-xp 00000000 08:11 818133     /opt/lang/java/j2sdk1.4.1_03/bin/java
...many others, too long to post...
4dc37000-4dc38000 rw-p 00013000 08:02 256794     /usr/X11R6/lib/libXmu.so.6.2

Local Time = Fri Sep  5 10:35:40 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_03-b02 mixed mode)
#
# An error report file has been saved as hs_err_pid4564.log.
# Please refer to the file for further information.
#
Offline whome

Junior Member




Carte Noir Java


« Reply #9 - Posted 2003-09-05 18:50:47 »

Where can I load Nehe JOGL tutorials?
http://nehe.gamedev.net site did not have jogl port for lesson07.
thx for porting examples for us newbies.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Caoimhin

Junior Member





« Reply #10 - Posted 2003-09-05 19:03:17 »

I sent Lesson 7 off to Jeff (NeHe) last night.  He may not have put it up on his site yet.

At Jens Lehmann's suggestion, I also updated 1 through 6 to automatically grab focus so one doesn't have to first click on the canvas for keystrokes to be recognised.  I also moved the keyboard code into keyPressed() because it worked better on Jens' system, which I believe is Linux.  I didn't notice a difference under win32.

They should get updated soon, too.

Until Jeff gets them updated, I've put #7 on my own site.  I'll remove it after it's on the nehe site.

http://home.earthlink.net/~kduling/Lesson07.jar
Offline Java Cool Dude

Senior Member




Java forever


« Reply #11 - Posted 2003-09-06 03:33:27 »

Done with lesson 12, not challenging a bit though :-/
Grab it from here
I also changed my coding style a bit*cough*about time heh?*cough* Grin
Offline Java Cool Dude

Senior Member




Java forever


« Reply #12 - Posted 2003-09-06 05:25:22 »

dum dee dee dum dee dum dum Another one bites the dust....
Lesson 18
PS: I dunno man, it might be my ill imagination but JOGL runs at least 20% faster than the equivalent code in c++...
Shocked
System specs:
Radeon 9500Pro 355/330
Athlon 2.034Ghz
512 DDr
Nforce2 Mobo
Offline whome

Junior Member




Carte Noir Java


« Reply #13 - Posted 2003-09-06 20:10:55 »

[ Celeron500Mhz, Win2kPro, Matrox MillenniumG400 ]
Examples run ok in windowed mode, but fullscreen does not work in my comp. Fullscreen is initialized and gfx is drawn but then screen is dead. It does not respond to a keyboard or anything.

Most likely its due to G400 card as lwjgl library does want to work well either.

Few times a native lib gave a coredump.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #14 - Posted 2003-09-06 20:18:27 »

Quote
[ Celeron500Mhz, Win2kPro, Matrox MillenniumG400 ]
Examples run ok in windowed mode, but fullscreen does not work in my comp. Fullscreen is initialized and gfx is drawn but then screen is dead. It does not respond to a keyboard or anything.

Most likely its due to G400 card as lwjgl library does want to work well either.

Few times a native lib gave a coredump.


Are we talking about my port here? Huh
Offline Java Cool Dude

Senior Member




Java forever


« Reply #15 - Posted 2003-09-07 06:51:00 »

Bump mapping and multi-texturing, aka Lesson 22 is done Smiley
Nehe's Lesson 22 ported to JOGL
Enjoy Grin
Offline whome

Junior Member




Carte Noir Java


« Reply #16 - Posted 2003-09-07 09:32:55 »

Cel500Mhz, Win2k
Matrox G400 AGP 16MB, Matrox driver package 5.88.061
+ jogl.dll 2003-09-05 11:02
+ JDK1.4.2

1  
2  
3  
4  
set lib=..\..\jogl-win32
set cp=..\..\jogl-win32\jogl.jar
c:\j2sdk1.4.2\bin\java.exe -Djava.library.path=%lib% -cp %cp%;. Lesson18
pause


Ive run Lessons 07,12,18 and 22. They all run fine in windowed mode. But then running in fullscreen will draw the graphics (very first frame) but keyboard does not say anything.

Still, this is better than lwjgl driver where I cannot start anything in G400. It always die on DisplayModes iterator.
http://www.puppygames.net./forums/viewtopic.php?t=224

ps: Its hard to keep track of installed jogl version as dll files don't have "Properties/Version" tabsheet  and .jar file MANIFEST.MF dont have implementation-version valuepair.
Offline pepijnve

Junior Member




Java games rock!


« Reply #17 - Posted 2003-09-07 21:31:31 »

Lesson08: Blending
Lesson11: Flag effect
Lesson14: Outline fonts
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #18 - Posted 2003-09-08 05:33:17 »

This is great work, everybody -- could one of you organize the tutorials into some set of structured packages that would fit into the jogl-demos source tree? Ideally there would be no dependence on current working directory (i.e., all data files referenced out of a jar file using Class.getResource(), just like the current set of JOGL demos). That way they could be trivially launched over the web using Java Web Start. (I don't know if this is already the case -- haven't looked at the tutorials in depth.)
Offline Caoimhin

Junior Member





« Reply #19 - Posted 2003-09-08 17:47:09 »

At this rate, you guys are going to have all your ports done before I get to my next one!  Darn you guys with free time!    Wink
Offline pepijnve

Junior Member




Java games rock!


« Reply #20 - Posted 2003-09-08 18:50:54 »

Nope, just lots of time on the train due to business trips Cheesy I have another batch ready. Just need to package them...
Offline pepijnve

Junior Member




Java games rock!


« Reply #21 - Posted 2003-09-08 20:16:24 »

Lesson17: 2D Texture fonts
Lesson20: Masking
Lesson23: Sphere mapping
Lesson26: Reflections
Lesson29: RAW files and blitter function
Lesson33: TGA files
Offline Java Cool Dude

Senior Member




Java forever


« Reply #22 - Posted 2003-09-08 21:56:50 »

Lesson 27: Shadow Volume
Damn I wish College didn't start yet  Cry.
Btw good job guys  Cool

PS: Can I get  confirmation on the fact that the ports run 20% faster than the original demos?
I mean here shadow volumes runs faster than its equivalent in C++, and so does the display lists.
Bump Mapping and Quadrics on the other hand run equally fast if not slightly faster Huh
Offline Java Cool Dude

Senior Member




Java forever


« Reply #23 - Posted 2003-09-08 22:09:33 »

Request:
Could you guys include the fullscreen feature in your ports? pretty please Smiley

Here's few lines of code that might help

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  
  public static void main(String []args) {

    int fullScreen = JOptionPane.showConfirmDialog(        null, "Would you like to run in fullscreen mode?",
                                                   "Fullscreen",  JOptionPane.YES_NO_OPTION);

    frame          = new JFrame();
    demo           = new Lesson27();
    screenWidth    = Toolkit.getDefaultToolkit().getScreenSize().width;
    screenHeight   = Toolkit.getDefaultToolkit().getScreenSize().height;

    switch(fullScreen){
      case 0:
        canvasWidth  = screenWidth;
        canvasHeight = screenHeight;
        frame.setUndecorated(true);
      break;
      default:
        canvasWidth  = 640;
        canvasHeight = 480;
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    xLocation    = (screenWidth  - canvasWidth )>>1;
    yLocation    = (screenHeight - canvasHeight)>>1;

    frame.setLocation(xLocation,yLocation);
    frame.getContentPane().add(demo.getCanvas(canvasWidth, canvasHeight),
                                              BorderLayout.CENTER);
    frame.pack();
    frame.requestFocus();
    frame.setVisible(true);
    if(fullScreen==0)
      GraphicsEnvironment.getLocalGraphicsEnvironment().
      getDefaultScreenDevice().setFullScreenWindow(frame);
  }


Thank you ^_^
Offline Caoimhin

Junior Member





« Reply #24 - Posted 2003-09-08 22:50:15 »

I elected not to do that as all that's doing is maximizing the display to match the resolution of the desktop.  This can severely affect framerates and isn't the same as exclusive fullscreen mode.

I elected not to add exclusive fullscreen mode because it seemed to complicate the tutorial and make it more of an intermediate app rather than a beginner.

If we could come up with a common framework and distribution, then I'd be willing to use a common utility class.  But the three of us are not packaging our tutorials the same or even structuring the code in a similar manner.  Writing a common utility class we cna use might be hard.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #25 - Posted 2003-09-08 22:55:41 »

Did you check the fullscreen that my demos features?
Besides, I try to minimize the number of classes I use, volume shadows for instance only got 1 more class than the equivalent code in c++.
Of course in no way I am implying that my code is better, it's just different.
Aslo I would like to say how much I appreciate your efforts guys Smiley
Offline Caoimhin

Junior Member





« Reply #26 - Posted 2003-09-08 23:48:36 »

Yes, specifically 22.  And performance is fine in windowed mode, but horrible in fullscreen.  Adding a short line to display the final canvas resolution shows the app changed from 640x480 to 1600x1200 -- which is my desktop resolution.

Had you gone into fullscreen exclusive mode, resolution would have remained at 640x480.

In case you haven't seen it, the tutorial on fullscreen exclusive mode is here: http://java.sun.com/docs/books/tutorial/extra/fullscreen/

And I hope I didn't come across as sounding like you were doing anything wrong.  As you say, we're just doing things differently.  I'm trying to concentrate on keeping things simple, but perhaps I'm being too simple.
Offline kaffiene
« Reply #27 - Posted 2003-09-08 23:50:47 »

Excellent work guys, thanks very much for the effort!

:-)

Peter.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #28 - Posted 2003-09-09 01:03:11 »

Quote
Yes, specifically 22.  And performance is fine in windowed mode, but horrible in fullscreen.  Adding a short line to display the final canvas resolution shows the app changed from 640x480 to 1600x1200 -- which is my desktop resolution.

Had you gone into fullscreen exclusive mode, resolution would have remained at 640x480.

In case you haven't seen it, the tutorial on fullscreen exclusive mode is here: http://java.sun.com/docs/books/tutorial/extra/fullscreen/

And I hope I didn't come across as sounding like you were doing anything wrong.  As you say, we're just doing things differently.  I'm trying to concentrate on keeping things simple, but perhaps I'm being too simple.


Speaking of fullscreen mode, I was thinking you're referring to the frame where only the GLcanvas is seen.
And that's exactly what my programs do as I undecorate my JFrame ( frame.setUndecorated(true); ) when fullscreen is selected.
My demos as you mentioned defaults to the desktop resolution when fullscreen is set to true. However it takes one line of code to change that to whatever resolution, refresh rate, color depth you want.
Also, man I'm impressed to hear that there are people running their desktop at the amazing resolution that is 1600*1200, you must have one excellent 19" monitor or simply a good 21", I'm envious Grin.
Speaking of performance I get 560 fps at 1024*768, 32bits no AA or AF set in the graphic driver.
In windowed mode which selects a frame size of 640*480 it's 830fps. Under the light of those two observations I could only speculate on the horrible performance drop occuring at 1600*1200.
Thanks for replying Smiley
Offline Java Cool Dude

Senior Member




Java forever


« Reply #29 - Posted 2003-09-09 07:18:33 »

Done with Lesson 37: CellShading
I also Cleaned up my code a bit in the previous ports.
Here's where you can download them.

Lesson12
Lesson18
Lesson22
Lesson27
Lesson37

Enjoy Smiley
PS: If I had a stick, I would beat the stuffing outta the ReadMesh() function: Basically I had to learn everything about streams and byte to int/float conversions  Angry
Pages: [1] 2 3 4
  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.

pw (35 views)
2014-07-24 01:59:36

Riven (33 views)
2014-07-23 21:16:32

Riven (21 views)
2014-07-23 21:07:15

Riven (24 views)
2014-07-23 20:56:16

ctomni231 (55 views)
2014-07-18 06:55:21

Zero Volt (47 views)
2014-07-17 23:47:54

danieldean (38 views)
2014-07-17 23:41:23

MustardPeter (43 views)
2014-07-16 23:30:00

Cero (59 views)
2014-07-16 00:42:17

Riven (56 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!