Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (542)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (604)
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: weird mac+fullscreen excl. framerate issue on: 2010-02-12 15:13:26
As I said in another topic, I found the myframe.setUndecorated(true) on mac dramatically decreases performances (300Hz to 15Hz for me). if someone has a workaround (the setExtendedState trick didn't work for me)
2  Java Game APIs & Engines / JOGL Development / Re: textureIO making UnsatisfiedLinkError on: 2010-02-12 14:31:35
There was no jogl jar there ... but I fixed the problem. I replaced all the jar/jnilib with the nighly build one and now it works.

... well almost. I still have a performance problem. I still played with my test application and I have a poor 15Hz to display a simple textured quad. I tweaked the parameters a little bit and I get a 366Hz ... when I remove the myframe.setUndecorated(true); !!!!

well I should start a new topic and close this one maybe. The problem is very different to the topic title now !
   
3  Java Game APIs & Engines / JOGL Development / Re: textureIO making UnsatisfiedLinkError on: 2010-02-12 08:19:47
well I don't think so. all the jnilib are in the same directory and java find at least few of them (otherwise jogl doesn't work at all). The glPixelStorei0 signature let me think it is a jnilib problem. Maybe an architecture problem ? how do we know what architecture are the jnilib for ?
4  Java Game APIs & Engines / JOGL Development / textureIO making UnsatisfiedLinkError on: 2010-02-11 16:34:07
I just migrated to the latest jogl2 libraries and found a strange error. I started a project from scratch trying to isolate the error

What I do (beside normal initialization) is just loading a texture 

> tex = TextureIO.newTexture(new File("Desert.png"), false);

and it causes

> java.lang.UnsatisfiedLinkError: com.sun.opengl.impl.gl2.GL2Impl.glPixelStorei0(II)V

without it I can have an openGL window with quads in it. I run a 10.6 mac os X with java 1.6.0_17

I carefully copied the following files from the jogl-2-1.0-macosx-universal.zip (15 september 2009 version on the Kenai site in jsr-231-2.0-beta10/ folder)
-rwxrwxrwx@  1 fredericvernier  staff    13763  2 fév  2007 Desert.png
-rw-r--r--   1 fredericvernier  staff    26487 11 fév 16:19 gluegen-rt.jar
-rw-r--r--   1 fredericvernier  staff  1960856 11 fév 16:19 jogl.all.jar
-rw-r--r--@  1 fredericvernier  staff    49872 11 fév 16:21 libgluegen-rt.jnilib
-rw-r--r--@  1 fredericvernier  staff  3050288 11 fév 16:21 libjogl_gl2.jnilib
-rw-r--r--@  1 fredericvernier  staff    50424 11 fév 16:21 libnativewindow_awt.jnilib
-rw-r--r--@  1 fredericvernier  staff    45248 11 fév 16:21 libnativewindow_jvm.jnilib
-rw-r--r--@  1 fredericvernier  staff   113920 11 fév 16:21 libnewt.jnilib
-rw-r--r--   1 fredericvernier  staff    81678 11 fév 16:19 nativewindow.all.jar
-rw-r--r--   1 fredericvernier  staff   109727 11 fév 16:19 newt.all.jar

Did I miss something in the new file distribution structure ?
Should I include a more specific jar instead of the *.all.jar ?
Where the glPixelStorei0 function is supposed to be ?

  Thank you very much if you can help.
5  Java Game APIs & Engines / JOGL Development / Re: Textures and BufferedImage on: 2006-12-03 12:00:45
Thank you very much. I used the TYPE_INT_ARGB_PRE BufferedImage and could get high performances AND transparency on
my "rotating windows"
Here is a simple "hello-world" app using the jogl binding :
http://diamondspin.free.fr/dstour1-jogl/dstour1-jogl.jnlp

I just tested it on Mac Os X and Windows.
I still have to update the window content to refresh the texture

  Thank you again

6  Java Game APIs & Engines / JOGL Development / Textures and BufferedImage on: 2006-11-29 11:03:35
We are trying to make something like XTrans (more or less) and we paint component in BufferedImage we then want to display
as textures on a GLCanvas. We use the Texture / TextureIO objects but we have very different performances according to the
BufferedImage type (we have it on MacOSx and windows on 3 different computers). With a TYPE_3BYTE_BGR we have something
incredibly fast (75 frames per seconds and more) but as soon as we add the alpha channel to have transparent BufferedImage
(for instance TYPE_4BYTE_ABGR ), performances fall to 15fps. What we do is very simple :

  BufferedImage frimg = fr.getFrontImage();
  TextureData frTextureData = TextureIO.newTextureData(frimg, false);
  frtex.updateImage(frTextureData);
  TextureCoords coords2 = frtex.getImageTexCoords();
  frtex.enable();
  frtex.bind();

  gl.glBegin(GL.GL_QUADS);
    gl.glTexCoord2f(coords2.right(), coords2.top());
    gl.glVertex2i(0, 0);
    gl.glTexCoord2f(coords2.left(), coords2.top());
    gl.glVertex2i(fr.getWidth(), 0);
    gl.glTexCoord2f(coords2.left(), coords2.bottom());
    gl.glVertex2i(fr.getWidth(), fr.getHeight());
    gl.glTexCoord2f(coords2.right(), coords2.bottom());
    gl.glVertex2i(0, fr.getHeight());
  gl.glEnd();

does somenone has an idea why alpha channel slow the update process so much ? can we do something ?

   Fred
7  Java Game APIs & Engines / JOGL Development / Re: Java2D/JOGL Interoperability Demo on: 2006-07-14 15:21:21
What about the Mac Os X version of the Java2D/JOGL Interoperability. It is mentionned in the initial post but couldn't find any later reference.
I have java 1.6.0-dp (universal binaries)  on Mac OS X v10.4.7, the jogl version I use is 1.0.0-beta5 (universal binaries) and unfortunately get this message after
turning a couple debug option on :
JOGL specification version 1.0.0
JOGL implementation version 1.0.0-beta5
JOGL implementation vendor Sun Microsystems, Inc.
OGLUtilities.UNDEFINED = 0
OGLUtilities.WINDOW = 1
OGLUtilities.PBUFFER = 2
OGLUtilities.TEXTURE = 3
OGLUtilities.FLIP_BACKBUFFER = 4
OGLUtilities.FBOBJECT = 5
Checking for Java2D/OpenGL support
Java2D support: default GraphicsConfiguration = apple.awt.CGraphicsConfig
JOGL/Java2D integration disabled

Am I doing something wrong or is the Java2D/Jogl bridge not enabled yet on Mac OS X ?
8  Java Game APIs & Engines / JOGL Development / Re: Java2D/JOGL Interoperability Demo on: 2006-03-18 22:20:56
I'm experiencing a problem with the Java2D/JOGL Interoperability.

The first one is it crashes when I exit as soon as I activate the flag -Dsun.java2d.opengl=true
I've read it may come from the nvidia driver and I do weird things with my nvidia driver (I've installed
a GeForce forceware82.10 driver on a Quadro FXGo700 to enhance perfs) so I'll have to test on a clean
computer before I can complain ;-)


The second one is an incompatibility question between the flag -Dsun.java2d.opengl=true and -Dopengl.1thread=awt
when I activate -Dopengl.1thread=awt my openGL functions init(), display()... are called by the awt event thread
Thread.currentThread() in display() returns: [AWT-EventQueue-0,6,main] (so it works)

When I activate no flag the default behavior is
Thread.currentThread() in display() returns: [JOGL GLWorkerThread,6,main]

But finally when I actiate the 2 flags together (my live is full new experiences ;-) I get
Thread.currentThread() in display() returns: [Java2D Queue Flusher,10,main]

Which is bad for me because going though the thread [AWT-EventQueue-0,6,main] allowed me to get rid of a poor deadlock in my code

with -Dsun.java2d.opengl=true  I have all the speed I ever dreamed on a GLJPanel ... but I really liked the awt thread stuff. On the other
hand I wonder if I don't miss something about the whole threading issue

If someone has an insight on the problem to share, I would be very gratefull

   Fred
 

9  Java Game APIs & Engines / JOGL Development / Re: Experiences of migrating from JOGL 1.1.1 to JSR231 on: 2006-03-16 05:05:29
Other difference between 1.1 and JSR231, the Version object returning the jogl version disapeared

It took me time to understand the rewind trick. Here is a piece of code making a texture from a BufferedImage
(some of the code is maybe useless)

    GL1.glClearColor(1.0f, 1.0f, 1.0f, 0.0f);
    GL1.glColor3f(0.0f, 0.0f, 0.0f);
    GL1.glPointSize(1.0f);
    GL1.glEnable(GL1.GL_BLEND);
    GL1.glBlendFunc(GL1.GL_SRC_ALPHA, GL1.GL_ONE_MINUS_SRC_ALPHA);
    GL1.glEnable(GL.GL_TEXTURE_2D);

    BufferedImage  BufferedImage1  = new BufferedImage(512, 512, BufferedImage.TYPE_3BYTE_BGR);

    int[]          tmp             = new int[1];
    GL1.glGenTextures(1, tmp, 0);
    TextureChart         = tmp[0];
    GL1.glBindTexture(GL.GL_TEXTURE_2D, TextureChart);

    ByteBuffer     dest            = null;
    byte[]         data            = ((DataBufferByte)BufferedImage1.getRaster().getDataBuffer()).getData();
    dest = ByteBuffer.allocateDirect(data.length);
    dest.order(ByteOrder.nativeOrder());
    dest.put(data, 0, data.length);
    dest.rewind();
// <- NEW STUFF NEEDED BY JSR231
    GL1.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGB, 512, 512, 0, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, dest);
    GL1.glTexParameteri(GL.GL_TEXTURE_2D,GL.GL_TEXTURE_MIN_FILTER,GL.GL_LINEAR);
    GL1.glTexParameteri(GL.GL_TEXTURE_2D,GL.GL_TEXTURE_MAG_FILTER,GL.GL_LINEAR);


Otherwise I have an exception with the new JSR version. Can someone help ?
$ /cygdrive/c/Program\ Files/Java/jdk1.6.0/bin/java -cp jogl-demos.jar demos.gears.Gears
INIT GL IS: com.sun.opengl.impl.GLImpl
Exception in thread "Thread-2" GL_VENDOR: NVIDIA Corporation
GL_RENDERER: Quadro FX Go700/AGP/SSE2
GL_VERSION: 2.0.1
javax.media.opengl.GLException: java.lang.UnsatisfiedLinkError: glGenLists
        at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:205)
        at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:234)
        at javax.media.opengl.GLCanvas.display(GLCanvas.java:127)
        at com.sun.opengl.util.Animator.display(Animator.java:144)
        at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181)
        at java.lang.Thread.run(Thread.java:620)
Caused by: java.lang.UnsatisfiedLinkError: glGenLists
        at com.sun.opengl.impl.GLImpl.glGenLists(Native Method)
        at demos.gears.Gears.init(Gears.java:71)
        at com.sun.opengl.impl.GLDrawableHelper.init(GLDrawableHelper.java:71)
        at javax.media.opengl.GLCanvas$InitAction.run(GLCanvas.java:242)
        at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:123)
        at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:276)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


10  Java Game APIs & Engines / JOGL Development / Re: Java2D/JOGL Interoperability Demo on: 2005-11-27 17:49:23
Let's hope this is the right forum to talk about what following. Sorry otherwise.

I want to talk about the XTrans demo of jogl. First thank you for the person who did it ... but there's no his/her name in the code so she/he stays anonymous  Cry. It is a great demo for me and probably need to be advertized on JavaDesktop. Anyway, there's no name but no copyright as well ... and I would really like to re-use this code. My goal is to re-write a "rotatable" windows manager  called DiamondSpin. You can see screenshot / video of a previous version here : http://www.merl.com/projects/diamondspin/

jogl-java2D bridge looks a much cleaner solution similar to Agile 2D (http://agile2d.sourceforge.net/) but probably with a better support and a more promizing future.

If you looked at the video my question is : when I'll have a rotated JMenu or JComboBox what will happen to the corresponding popup ? Is it possible to intercept the popup ? If it's a LW component I guess yes but what's going to be the wrapper (OffscreenComponentWrapper) for this new component ?

Again this is a very impressive demo and I would be glad to know the author to thank him/her in person.
  Regards,
     fred = frederic.vernier('at')limsi.fr

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.

Elsealabs (15 views)
2014-12-28 10:39:27

CopyableCougar4 (19 views)
2014-12-28 02:10:29

BurntPizza (24 views)
2014-12-27 22:38:51

Mr.CodeIt (14 views)
2014-12-27 04:03:04

TheDudeFromCI (19 views)
2014-12-27 02:14:49

Mr.CodeIt (26 views)
2014-12-23 03:34:11

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

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

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

BurntPizza (115 views)
2014-12-08 04:46:31
How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

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
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!