Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: JOGL2 - what where when why? on: 2009-07-24 17:24:48
How many windows do you have open at once?  My experience is that you can only have one OpenGL window active at once.  If you do not wrap the JOGL libs in a plugin, you get classloader errors.  My use cases require more than one OpenGL window at a time.  If you only have one window active, sure, it works fine to just point at the JOGL jars.
2  Java Game APIs & Engines / JOGL Development / Re: JOGL2 - what where when why? on: 2009-07-22 16:41:32
Thanks, that helps a little, but it doesn't really explain why there is a shift to a new major version (JOGL2 vs. JOGL 1.1).  What is going to be in JOGL2 that isn't already supported in JOGL 1.1?  And what is the proposed timeline?  Part of my interest is driven by the fact that I work in Eclipse, where I have ported the JOGL libraries to be an Eclipse plugin (otherwise it doesn't work well in the Eclipse environment).  When a new version of JOGL comes out, I have to update my plugin.

TIA, Ric
3  Java Game APIs & Engines / JOGL Development / JOGL2 - what where when why? on: 2009-07-21 22:31:14
I haven't been here in a while, so JOGL2 is news to me.  Can someone point me at a site or page that explains what it is, what the goals are and what the timeline is?  My apologies if this is somehow obvious, but it isn't obvious that there is any real info on this site and googling doesn't produce any hits either.  I see it listed as the current nightly build, but I am more curious about what it is and timeline, etc. than the actual source.

TIA, Ric
4  Java Game APIs & Engines / JOGL Development / Hardware Tesselation? on: 2008-09-25 19:31:37
I have written a library that implements most of the PostScript rendering model in 3D via extrusion (see screenshot).  It works great and is pretty fast. But the bottleneck is tessellation, which isn't surprising. However, I would have expected that tessellation is something  to be pushed off onto the graphics card rather than being done on the CPU inside of GLU.  Anyone have insights into this?
5  Java Game APIs & Engines / JOGL Development / Re: Anti-aliasing in JOGL on: 2008-09-15 17:48:37
Understood.  This has been quite interesting.  Turns out as well that the driver for my card was old.  The card is nothing special, an ATI X1900.  But the driver is what came with the machine rather than an update from ATI.  I installed the update from ATI and it came with a lot of fine-grained choices.  Among them was whether or not to allow applications to control anti-aliasing. As expected, with per-app AA disabled, it doesn't matter what the glCapabilities is set to.   With it per-app AA enabled, it does.

in either case, performance was the same no matter what settings I used, which probably only indicates that 3D rendering is not gating it.  Profiling indicates that the GLU Tessellator is the gating factor, which makes sense to me given the complex 3D "stroking" that I am doing.  It would be nice if the GL library offloaded tessellation to the GPU.  Does anybody know if this can be done, perhaps some extension that I don't know about?

Thanks to everybody for the useful info.
6  Java Game APIs & Engines / JOGL Development / Anti-aliasing in JOGL on: 2008-09-14 14:21:11
Ah, so simple.  I hadn't enabled the sampleBuffers in glCapabilities.  RTFM!   Wink

Now it works fine. Seems like anti-aliasing should be on by default, but perhaps there is a good reason not to enable by default.
7  Java Game APIs & Engines / JOGL Development / Anti-aliasing in JOGL on: 2008-09-13 23:20:02
I was looking closely at some of my rendering and even though I think I have enabled all the right things, I am not seeing any anti-aliasing of my filled polygons.  I have

      gl.glEnable(GL.GL_LINE_SMOOTH);      
      gl.glEnable(GL.GL_POLYGON_SMOOTH);
      gl.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST);

But this does nothing.  Does one have to descend down in multi-sample pixel twiddling and using all those proprietary extensions?  I am spelunking around and doing more reading, but thought I would post this question as well.

TIA
8  Java Game APIs & Engines / JOGL Development / Re-use of coord-objects and the GL tesselator on: 2008-08-27 21:02:43
I have written some graphing routines to display information from some geophysical modeling.  This generates a LOT of output, so there are a lot of objects generated.  I am rendering them through a PostScript-like class I wrote.  That all works great, now that I manage all the path elements myself. Initially I had big problems with garbage collection, but now I manage the pool myself.  I can handle 12 sets of one hundred observations with full PostScript extruded rendering at almost 60 FPS.

The one remaining area of memory thrashing is the tessellation.  As part of the tessellation, one has to allocate a double[3] object, that gets passed to the tessellator's callback routines.  That's all fine, but there are a lot of vertices being generated - tens of thousands per second.  So here comes the GC again.  I am happy to manage these as well - there are never more than a couple of hundred in use at any one time.

I thought that once the glVertex was constructed in the callback the coords that were allocated it would be OK to re-collect into my pool.  But that doesn't seem to be the case.  Looks like somebody is holding a reference for some reason.  Anybody know about this area?  Or can point me to some info?  I suspect this memory is involved in some trans-JNI shenanigans.

TIA
9  Java Game APIs & Engines / JOGL Development / Re: coplanar rendering artifacts on: 2008-08-16 19:01:13
Thanks, MH.  That was exactly the problem.  I was hoping not to have to twiddle their position (hoping for some magic I didn't know about).  But it turned out to be relatively straightfoward.  Turning off the depth test just made a mess out of the strokes since GL couldn't figure out what was in front and what was in back.  But adjusting the Z value by a tiny amount was the trick. I was actually surprised how little it took.  A few binary trials showed that with the model matrix set as

      glu.gluPerspective( 15.0f, (double) width / (double) height, 0.1f, 100.0f);

It only took increments of 0.00002 to make the difference.  As you can see here.

Thanks again for pointing out the obvious for me!  :-)
10  Java Game APIs & Engines / JOGL Development / coplanar rendering artifacts on: 2008-08-16 16:23:39
I have a set of utils that do PostScript-style stroking with extrusion.  When I use them to draw several strokes along a graph the faces of the strokes are of course coplanar where the strokes intersect.  The result is some weird looking artifacts. the colors are almost randomly mixed with odd looking Moire effects.  (see attached screenshot).  Each stroke is completely rendered separately (i.e. in its own begin/end).  I assume this is effect is somehow related to the tesselator/GL rendering being unable to decide who is on top?

I should add that GL_DEPTH_TEST is enabled and set to GL_LESS.
 
Any suggestions or comments?

TIA
11  Game Development / Performance Tuning / Re: Performance with very large object counts on: 2008-08-12 12:46:23
Thanks for the feedback.  As is often the case, when I thought about it some more and turned the problem on its side, the right path (so to speak ;-) was apparent.  I have written the pooling object to handle all the elements I need to manage.  Now I need to retrofit the existing code to use the new constructs.  One of the consequences is that I had to abandon using GeneralPath and use my own path object for everything, so I also had to write a Bezier flattener, but that's no big deal - been there, done that. I had already written the rest of the Bezier support, anyway.  But I learned some more about Java and GC, which is always good.
12  Game Development / Performance Tuning / Re: Performance with very large object counts on: 2008-08-11 22:58:52
I agree that 250k/s is way too much and I am looking at how to minimize that. That being said, I guess I may also have to learn more than I want about how the GC works in general.  I was hoping that there might be an easier way, being the lazy person that I am - or at least I would prefer to spend my time on more interesting tasks than memory management in Java.

Also, some of it is not in my control as it is in the generation of the paths themselves, which are GeneralPaths.  But I am looking at how I can avoid that as well.
13  Game Development / Performance Tuning / Performance with very large object counts on: 2008-08-11 21:36:37
I wrote a small set of utilities in JOGL that implement 2D PostScript rendering in 3D space, i.e. implemented most of the PostScript path and graphics state operators. So you can create a path  and then stroke (including dash, joins, caps, etc.) and fills.  Kind of fun.  I think this my fourth PS implementation but definitely the first in Java. The resulting path can be rendered in 2D or extruded to make a filled shape.  It works very nicely, but then I ran into a problem.

I wrote a simple temperature wave simulation that shows the variation of temperature with depth in the ground, both vertically and over time.  Then I run the simulation. Problem is that it generates a LOT of objects, e.g. 300 data points at 10 depths results in 300x10*4 objects. At a modest 20 FPS, this generates 240,000 objects a second.  It can run at 35 FPS initially, but after a little while it starts pausing and the rate drops to 10 FPS (QuadCore MacPro).

None of the cores are maxed, so my thought is that it is GC as the heap gets fragmented.  I assume it is not GPU bound as I can't see why it would be.  I've done a little dumping of the GC data (gc:verbose) but that doesn't seem to tell me much.

Thoughts? Comments?  Am I missing something?  I am no Java maven so that is entirely possible.
14  Java Game APIs & Engines / JOGL Development / Re: Very large path counts and Java performance on: 2008-08-11 21:33:39
Sorry, I hadn't realized there was a specific forum on Java performance. I will post this there.

Ken, feel free to delete this if you think appropriate.
15  Java Game APIs & Engines / JOGL Development / Very large path counts and Java performance on: 2008-08-11 21:29:29
This may not be the right venue, but I thought I would throw this out. 

I wrote a small set of utilities that essentially to 2D PostScript rendering in 3D space, i.e. implemented most of the PostScript path and graphics state operators. So you can create a path  and the stroke (including dash, joins, caps, etc.) and fills.  Kind of fun.  I think this my fourth PS implementation but the first in Java. The resulting path can be rendered in 2D or extruded to make a filled shape.  It works very nicely, but then I ran into a problem. 

I wrote a simple temperature wave simulation that shows the variation of temperature with depth in the ground, both vertically and over time.  Then I run the simulation. Problem is that it generates a LOT of objects, e.g. 300 data points at 10 depths results in 300x10*4 objects. At a modest 20 FPS, this generates 240,000 objects a second.  It can run at 35 FPS initially, but after a little while it starts pausing and the rate drops to 10 FPS (QuadCore MacPro).

None of the cores are maxed, so my thought is that it is GC as the heap gets fragmented.  I assume it is not GPU bound as I can't see why it would be.  I've done a little dumping of the GC data (gc:verbose) but that doesn't seem to tell me much.

Thoughts? Comments?  Am I missing something?
16  Java Game APIs & Engines / JOGL Development / Re: Tesselation errors for combined verticies on: 2008-07-21 20:32:52
I found one bug.  Turns out that the number of points to be combined can vary.  Apparently can be 2 or 4 and possibly 3, so the fix is to check the number of non-NULL members in the array passed in.

      public void combine(double[] coords, Object[] data, float[] weight, Object[] outData)
      {
         // System.out.println("Combine called!");
         
         double newData[] = new double[6];

            newData[0] = coords[0];
            newData[1] = coords[1];
            newData[2] = coords[2];
           
            int n = 0;
            while (data[n] != null) n++;
                             
            for ( int i=3; i<6; i++ )
            {
               newData = 0;
                for ( int j=0; j<n; j++ )
                {
                   newData += weight[j] * Array.getDouble(data[j],i-3);
                }         
            }
 
            outData[0] = newData;     
      }
17  Java Game APIs & Engines / JOGL Development / Re: Tesselation errors for combined verticies on: 2008-07-18 20:53:11
Well, it looks like I solved this myself.  It wasn't the combine method after all.  I believe my implementation is correct - though I'd be happy to hear otherwise from more knowledgeable folks.  It turned out that the code building the tessellation object was incorrect.  That code was code that I inherited along with the original "FontDrawer" code that I based the TextRenderer3D on.  I am now amazed that TextRenderer3D works as well as it does.  I suspect that the font glyphs have many redundant points along the path of the glyph, especially at the beginning and end.

Its kind of striking how much incorrect code is out there.  This code was wrong (and I found similar examples on the web).  The code examples I found for the combine callback were also mostly wrong - including the example that is in the jogl documentation itself (in th JOGL docs under GLU_TESS_COMBINE).  Good thing I have never posted any incorrect code....   Wink

I will post the resulting code back to the joglutils depot as soon as I can - my main machine is currently mothballed while my house is sheetrocked...     Tongue
18  Java Game APIs & Engines / JOGL Development / Tesselation errors for combined verticies on: 2008-07-18 01:58:21
I am writing some code to generate filled (extruded) shapes from PostScript path info (essentially 3D strokes).  I have it mostly working, but I am getting odd results
 out of the tesellator.  I suspect it is the combine callback code.  It is not at all obvious to me what the combine method is supposed to do, exactly.   My code looks like this:

public void combine(double[] coords, Object[] data, float[] weight, Object[] outData)
{
System.out.println("Combine called!");
         
   double newData[] = new double[6];

      newData[0] = coords[0];
      newData[1] = coords[1];
      newData[2] = coords[2];
                       
      for ( int i=3; i<6; i++ )
      {
         newData = 0;
            for ( int j=0; j<4; j++ )
            {
                newData += weight[j] * Array.getDouble(data[j],i-3);
            }         
      }
 
      outData[0] = newData;     
}

This doesn’t generate any errors, but I do get some odd tessellation results (missing bits) so it may not be correct. I didn’t find much about it on the web and much of that is obviously wrong.  Any suggestions would be appreciated.  TIA.
19  Java Game APIs & Engines / JOGL Development / Re: TextRenderer3D checked into the joglutils project on: 2008-06-28 20:53:29
FWIW, I wrote up a short article on the TextRenderer3D class and its use.  The two demos I wrote are also there along with the source.  You can find it all here:

http://www.geofx.com/html/OpenGL_Eclipse/TextRenderer3D.html
20  Java Game APIs & Engines / JOGL Development / TextRenderer3D checked into the joglutils project on: 2008-06-21 21:40:09
I checked in the code for the TextRenderer3D class.  This class provides a true 3D rendering of a text string.  Methods are available to draw text, set the extrusion depth as well as
compile to a display list rather than draw immediately.

Also checked in a simple demo (TestRenderer3D) of the use of the draw() method.  As simple as it can be.  Also checked in a more complex example ((BouncingText3D)  that demonstrates the compile/call methods and uses animation to bounce a large number of text objects (as display lists) around the screen.

The text class is in the jogltext folder while the demos are in the jgudemos folder.

Any feedback is as always appreciated.
21  Java Game APIs & Engines / JOGL Development / Re: TextRenderer3D on: 2008-06-15 15:23:04
rkwright
22  Java Game APIs & Engines / JOGL Development / Re: TextRenderer3D on: 2008-06-13 23:28:01
Sure.  I use subversion for my own home stuff (Perforce at work).  I'm doing a little polishing, but I can check it in any time.
23  Java Game APIs & Engines / JOGL Development / TextRenderer3D on: 2008-06-13 03:19:21
I took the FontDrawer code that was in JOGL Utils and rewrote it.  It was basically correct, but there were some errors and minor issues that affected optimization.  I kept the basic concept of walking the path with a PathIterator and discarded the rest. I changed most of the method signatures and the name of the class (now TextRenderer3D) and made most of the new methods as close to TextRenderer as possible.  I fixed the calculation of normals, etc.  The result is a class that renders 3D text very nicely.  Next steps?  I can post the resulting code on my site.  Le tme know what the group would like to do.
24  Java Game APIs & Engines / JOGL Development / JOGL and Eclipse examples posted on: 2008-06-06 16:51:06
I have been doing some explorations of  JOGL and Eclipse.  My aim is not game dev, but scientific visualization.  Trying to get there led to some interesting back roads and I thought I would write up some of the results.  If this is helpful to anyone, you can find the info and downloads here:  http://www.geofx.com/html/OpenGL_Eclipse/
25  Java Game APIs & Engines / Java 3D / UseFontOutlines? on: 2008-05-03 15:26:49
I am new to JOGL.  I have used OpenGL extensively but from C/C++.  JOGL seems fairly slick though not 100% complete.  One apparently missing aspect is good outline font support.  I can't find out I use what is exposed on the C++ side as UseFontOutlines (e.g. wglUseFontOutlines on Windows).  Is this not implemented?  Or am I just missing it?  TIA, Ric
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (48 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (103 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!