Re: JogAmp?

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

gouessej
Administrator
Hi!

As I said some months ago, I found a memory leak in TextRenderer and I have a fix to submit. Sven spoke about the first milestone release for this week. Can someone integrate my fix into the trunk?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

gouessej
Administrator
My fix is here, you should only backport it to Java 1.4 and modify it so that it works with JOGL 2 rather than JOGL 1.1.1a:
http://www.javagaming.org/index.php/topic,21941.msg181432.html#msg181432
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

Sven Gothel
Administrator
On Tuesday, August 17, 2010 10:36:20 gouessej [via jogamp] wrote:
>
> My fix is here, you should only backport it to Java 1.4 and modify it so that
> it works with JOGL 2 rather than JOGL 1.1.1a:
> http://www.javagaming.org/index.php/topic,21941.msg181432.html#msg181432
> http://www.javagaming.org/index.php/topic,21941.msg181432.html#msg181432 

Hi Gouessej,

thanx a lot.

If you could make a patch for our current code,
that would be great ..

Maybe a little test app showing the diff (mem leak ?)
The problem is that I haven't written that code
and its hard for me to say what your patch does :)

The release thing is not that pressing currently,
since we just added GL 3.3, 4.0 and 4.1 and more has to come.
But we will refine the process in a bit ..

Thank you, Sven


--
health & wealth
mailto:[hidden email] ; http://jausoft.com
land : +49 (471) 4707742 ; cell: +49 (151) 28145941
Timezone CET: PST+9, EST+6, UTC+1
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

gouessej
Administrator
Hi Sven

I have never tested this code with JOGL 2 but I can do it as soon as possible, I can make a patch.

The memory leak is reproducible with one of the applets demonstrating the use of TextRenderer, you only have to wait for about 5 minutes to notice it.

If you think my patch is not commented enough, let me know. The person knowing the best this class is Kenneth Bradley Russell, I would feel better if he could confirm that I'm not doing something wrong.

Many eyes watch JOGL and don't forget that on one side, JOGL 1.1.1 is no more maintained; on the other side JOGL 2 is still in beta. It means that anyone who plans to ship a software with JOGL has the choice between a version that is no more maintained and a beta version.

I assume you are very busy but at least industrial projects require some visibility on the long term, it is important for the viability of this OpenGL binding. We "need" to know when a release candidate is ready.

Finally, I plan to use JOGL 2 in Ardor3D and I will ensure that JMonkeyEngine 3 uses JOGL 2 correctly. I cannot ask any development effort to integrate a beta version of an API and the more I wait, the more probable is the possibility that the guys who use JOGL in several famous engines will stick to JOGL 1.1.1 (or JOGL 1.1.2) which would be a problem because it is no more maintained. Would Jackpot 3.0 be useful on big projects to port them from JOGL 1.1.1 to JOGL 2?

Best regards
Julien Gouesse
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

RE: JogAmp?

snmvaughan

I understand your sentiment.  I've been working on a JOGL 2 implementation for Ardor3D which uses NEWT, but until I can get a few minor issues we won't be able to go forward comfortably.

 


From: gouessej [via jogamp] [mailto:[hidden email]]
Sent: Tuesday, August 24, 2010 12:58 PM
To: Vaughan, Steve
Subject: Re: JogAmp?

 

Hi Sven

I have never tested this code with JOGL 2 but I can do it as soon as possible, I can make a patch.

The memory leak is reproducible with one of the applets demonstrating the use of TextRenderer, you only have to wait for about 5 minutes to notice it.

If you think my patch is not commented enough, let me know. The person knowing the best this class is Kenneth Bradley Russell, I would feel better if he could confirm that I'm not doing something wrong.

Many eyes watch JOGL and don't forget that on one side, JOGL 1.1.1 is no more maintained; on the other side JOGL 2 is still in beta. It means that anyone who plans to ship a software with JOGL has the choice between a version that is no more maintained and a beta version.

I assume you are very busy but at least industrial projects require some visibility on the long term, it is important for the viability of this OpenGL binding. We "need" to know when a release candidate is ready.

Finally, I plan to use JOGL 2 in Ardor3D and I will ensure that JMonkeyEngine 3 uses JOGL 2 correctly. I cannot ask any development effort to integrate a beta version of an API and the more I wait, the more probable is the possibility that the guys who use JOGL in several famous engines will stick to JOGL 1.1.1 (or JOGL 1.1.2) which would be a problem because it is no more maintained. Would Jackpot 3.0 be useful on big projects to port them from JOGL 1.1.1 to JOGL 2?

Best regards
Julien Gouesse

 


View message @ http://jogamp.762907.n3.nabble.com/Re-JogAmp-tp1169507p1314821.html
To start a new topic under jogl, email [hidden email]
To unsubscribe from jogl, click here.

 

Reply | Threaded
Open this post in threaded view
|

RE: JogAmp?

gouessej
Administrator
Ok it is a nice piece of news. Renanse wrote once that someone has already worked on a JOGL 2 implementation for Ardor3D :) What is wrong with your implementation? Does it really come from your implementation or from JOGL 2 itself? Have you ever tested it on non-windows platforms? Solaris? Linux?

I'm impatient to give it a try. Is it faster than the current implementation even with a single window?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

RE: JogAmp?

snmvaughan

I'm sure he was talking about someone else, but ours is fairly close at this stage.

 

We implemented JOGL 2 as part of a development effort at work.  Our immediate need is for deployment on a Windows platform, with multiple Ardor3D windows in a JDesktopPane.  The implementation uses NEWT, and I've been investigating a few issues related to thread management (see http://jogamp.762907.n3.nabble.com/git-cygwin-tp1318757.html).  So far it looks good, and has addressed some problems that the original JOGL implementation was not able to handle.

 

Once I address our project's immediate need, I'll definitely move on to testing on the Mac, since our product demonstrators like that particular platform.  Our intention is to feed this back to Ardor3D once it is stable and tested on multiple platforms.

 


From: gouessej [via jogamp] [mailto:[hidden email]]
Sent: Wednesday, August 25, 2010 7:15 AM
To: Vaughan, Steve
Subject: RE: JogAmp?

 

Ok it is a nice piece of news. Renanse wrote once that someone has already worked on a JOGL 2 implementation for Ardor3D :) What is wrong with your implementation? Does it really come from your implementation or from JOGL 2 itself? Have you ever tested it on non-windows platforms? Solaris? Linux?

I'm impatient to give it a try. Is it faster than the current implementation even with a single window?

 


View message @ http://jogamp.762907.n3.nabble.com/Re-JogAmp-tp1169507p1328381.html
To start a new topic under jogl, email [hidden email]
To unsubscribe from jogl, click here.

 

Reply | Threaded
Open this post in threaded view
|

RE: JogAmp?

gouessej
Administrator
Ok it will be important to test it on Linux too. You did a nice job on JMonkeyEngine 2 but cylab and me spent months to improve its JOGL renderer (and our patch has never been put into the trunk...). We had to explicitly release the context to repair the input handling, it was only necessary on Linux, I hope it won't be useful with NEWT. This kind of problem can be observed only if each platform is tested.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

gouessej
Administrator
This post was updated on .
In reply to this post by Sven Gothel
Hi

I have ported my fix to JOGL 2 (and using Java 1.4 instead of Java 1.6). As I did it at work and for my work, please at least put my full name into the commit comment in order to allow me to have a trace of it for my boss. Please find the whole source code below (Edit.: rather the patch):

1558a1559,1560
>         HashMap/*<String, GlyphVector>*/fullGlyphVectorCache = new HashMap/*<String, GlyphVector>*/();
>         HashMap/*<Character, GlyphMetrics>*/glyphMetricsCache = new HashMap/*<Character, GlyphMetrics>*/();
1574,1575c1576,1582
<             iter.initFromCharSequence(inString);
<             GlyphVector fullRunGlyphVector = font.createGlyphVector(getFontRenderContext(), iter);
---
>             GlyphVector fullRunGlyphVector;
>             fullRunGlyphVector = (GlyphVector) fullGlyphVectorCache.get(inString.toString());
>             if (fullRunGlyphVector == null) {
>                 iter.initFromCharSequence(inString);
>                 fullRunGlyphVector = font.createGlyphVector(getFontRenderContext(), iter);
>                 fullGlyphVectorCache.put(inString.toString(), fullRunGlyphVector);
>             }
1586c1593,1599
<                 Glyph glyph = getGlyph(inString, fullRunGlyphVector, i);
---
>                 Character letter = CharacterCache.valueOf(inString.charAt(i));
>                 GlyphMetrics metrics = (GlyphMetrics) glyphMetricsCache.get(letter);
>                 if (metrics == null) {
>                     metrics = fullRunGlyphVector.getGlyphMetrics(i);
>                     glyphMetricsCache.put(letter, metrics);
>                 }
>                 Glyph glyph = getGlyph(inString, metrics, i);
1590c1603,1604
<                 } else {
---
>                 }
>                 else {
1594,1595c1608,1609
<                     while (i < lengthInGlyphs &&
<                            getGlyph(inString, fullRunGlyphVector, i) == null) {
---
>                     while (i < lengthInGlyphs
>                             && getGlyph(inString, fullRunGlyphVector.getGlyphMetrics(i), i) == null) {
1599,1600c1613,1614
<                                                // Any more glyphs after this run?
<                                                i < lengthInGlyphs));
---
>                     // Any more glyphs after this run?
>                             i < lengthInGlyphs));
1642c1656
<         // Returns a glyph object for this single glyph. Returns null
---
>      // Returns a glyph object for this single glyph. Returns null
1645,1647c1659,1660
<         private Glyph getGlyph(CharSequence inString,
<                                GlyphVector fullRunGlyphVector,
<                                int index) {
---
>         private Glyph getGlyph(CharSequence inString, /*GlyphVector fullRunGlyphVector*/
>         GlyphMetrics glyphMetrics, int index) {
1662c1675,1676
<             return getGlyph(unicodeID, gv, fullRunGlyphVector.getGlyphMetrics(index));
---
>             return getGlyph(unicodeID, gv, /*fullRunGlyphVector.getGlyphMetrics(index)*/
>             glyphMetrics);
1698a1713,1732
>
>     private static class CharacterCache {
>         private CharacterCache() {
>         }
>
>         static final Character cache[] = new Character[127 + 1];
>
>         static {
>             for (int i = 0; i < cache.length; i++) {
>                 cache[i] = new Character((char) i);
>             }
>         }
>
>         public static Character valueOf(char c) {
>             if (c <= 127) { // must cache
>                 return CharacterCache.cache[c];
>             }
>             return new Character(c);
>         }
>     }
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

Michael Bien
if you follow the rules described here: http://jogamp.org/wiki/index.php/How_to_Contribute
you would have automatically your name in the commit message (its actually a requirement).

as Sven already mentioned its a bit difficult for the readers of this thread to see what you actually changed without diffing it.
so please fork the repository and apply your changes. Useful resources are also linked from the wiki page mentioned above.
(in case something is still unclear, please comment here: http://jogamp.762907.n3.nabble.com/How-To-Contribute-tc925956.html#a925956)

best regards,
michael

On 09/15/2010 03:27 PM, gouessej [via jogamp] wrote:
Hi

I have ported my fix to JOGL 2 (and using Java 1.4 instead of Java 1.6): As I did it at work and for my work, please at least put my full name into the commit comment in order to allow me to have a trace of it for my boss. Please find the whole source code below:


[code...]




View message @ http://jogamp.762907.n3.nabble.com/Re-JogAmp-tp1169507p1479735.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.


-- 
http://michael-bien.com/
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

gouessej
Administrator
Ok I will do it tomorrow.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

gouessej
Administrator
In reply to this post by Michael Bien
Hi!

I have to lower the minimal ant version (1.8.0) to build JOGL in Eclipse Helios (3.6) that use ANT 1.7. I succeed in building but the generated Java source file (GL.java, GL2.java, etc...) are not copied from gensrc to src then TextRenderer does not find neither GL2 nor Buffers. Should I modify the ANT script??
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

Michael Bien
just use ant via commandline or change the ant version eclipse uses. There where several bugfixes between 1.7 and 1.8 we rely on. 1.8 is also not backwards compatible.

On 09/16/2010 04:22 PM, gouessej [via jogamp] wrote:
Hi!

I have to lower the minimal ant version (1.8.0) to build JOGL in Eclipse Helios (3.6) that use ANT 1.7. I succeed in building but the generated Java source file (GL.java, GL2.java, etc...) are not copied from gensrc to src then TextRenderer does not find neither GL2 nor Buffers. Should I modify the ANT script??


View message @ http://jogamp.762907.n3.nabble.com/Re-JogAmp-tp1169507p1488127.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.


-- 
http://michael-bien.com/
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

gouessej
Administrator
Hi!

I've succeeded in using ANT 1.8.1 with Eclipse. EGIT is so limited, I have just used the diff command to make a patch (from the master branch) and updated my former post.

What's next? Will you use this patch or do I have to submit it by myself? I might have to suggest a few other patches.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

Sven Gothel
Administrator
On Friday, September 17, 2010 10:51:42 gouessej [via jogamp] wrote:
>
> Hi!
>
> I've succeeded in using ANT 1.8.1 with Eclipse. EGIT is so limited, I have
> just used the diff command to make a patch (from the master branch) and
> updated my former post.
>
> What's next? Will you use this patch or do I have to submit it by myself? I
> might have to suggest a few other patches.

As you wish ..

You can either create a patch we can ammed via git, ie
        http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html

Or you can offer your repository, so I can pull from it (ie github).

If you use email format, pls make sure you attach it and have no wordwrap :)

Thank you for your work to make your fix public.

Cheers, Sven

PS: If I don't react on the ML/Forum, please send me a PM (-> everybody)
Reply | Threaded
Open this post in threaded view
|

Re: JogAmp?

gouessej
Administrator
Ok I'll use git-format-patch
Julien Gouesse | Personal blog | Website