Show Posts
|
|
Pages: [1] 2
|
|
3
|
Java Game APIs & Engines / JOGL Development / Re: [BUG] TextRenderer broken in Applets?
|
on: 2009-03-18 10:58:10
|
Aaaaah... I tried it with older versions of JOGL: | JSR-231 1.1.0-rc3 - February 14 | Looks OK (but errors (with errors in .so) in console: [1]) | | JSR-231 1.1.0 - April 22 | Looks OK (but error in console: [2]) | | JSR-231 1.1.1-rc1 - May 7 | Looks OK (but error in console: like [2]) | | JSR-231 1.1.1-rc2 - May 24 | Looks OK (but error in console: like [2]) | | JSR-231 1.1.1-rc3 - July 4 | Looks OK (but error in console: like [2]) | | JSR-231 1.1.1-rc4 - October 9 | Looks BROKEN[3] (error in console: like [2]) | | JSR-231 1.1.1-rc5 - October 11 | Looks BROKEN[3] (error in console: like [2]) | | JSR-231 1.1.1-rc6 - October 19 | Looks BROKEN[3] (error in console: like [2]) | | JSR-231 1.1.1-rc7 - February 16 | Looks OK (but error in console: like [2]) | | JSR-231 1.1.1-rc8 - February 22 | Looks BROKEN[4] (error in console: like [2]) | | JSR-231 1.1.1 - May 22 | Looks BROKEN[4] (but error in console: like [2]) |
[1]: http://paste.ubuntuusers.de/394489/[2]: http://paste.ubuntuusers.de/394490/[3]: http://home.in.tum.de/~wengera/jogl/rc4.png[4]: http://home.in.tum.de/~wengera/jogl/rc8.pngI guess that the rror in the console has nothing to do with the bug (since it works with some versions despite the error message). I could imaging that some features of the video driver are missing within applets (for example, antialiasing does not work on my nvidia Quadro), and the TextRenderer uses some of these features? That's why it fails? As a workaround, I can use RC7, but the error should be fixed in the new version of JOGL! Or do you have an idea, which things I have to change so it works with 1.1.1, too? Thanks!
|
|
|
|
|
4
|
Java Game APIs & Engines / JOGL Development / Re: [BUG] TextRenderer broken in Applets?
|
on: 2009-03-18 10:27:37
|
Thanks for testing and your ideas (your ideas could not solve the problem unfortunately). I noticed, that it works perfectly on Windows XP, but not on my Ubuntu 8.10 (GNOME). On Ubuntu, this official demo works fine, too: http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/TextFlow.jnlpBut when I compile it myself (sources from SVN) and run it, I have the exactly same problems as described above (not in an applet, but in a desktop application). Interestingly, I get the following error when running (not on Windows!). 18.03.2009 10:23:39 com.sun.corba.se.impl.ior.IORImpl getProfile WARNUNG: "IOP00511201: (INV_OBJREF) IOR must have at least one IIOP profile" org.omg.CORBA.INV_OBJREF: vmcid: SUN minor code: 1201 completed: No at com.sun.corba.se.impl.logging.IORSystemException.iorMustHaveIiopProfile(IORSystemException.java:473) at com.sun.corba.se.impl.logging.IORSystemException.iorMustHaveIiopProfile(IORSystemException.java:495) at com.sun.corba.se.impl.ior.IORImpl.getProfile(IORImpl.java:334) at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:787) at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:761) at com.sun.corba.se.impl.encoding.CDRInputStream.read_Object(CDRInputStream.java:231) at com.sun.corba.se.impl.resolver.INSURLOperationImpl.getIORFromString(INSURLOperationImpl.java:120) at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:130) at com.sun.corba.se.impl.orb.ORBImpl.string_to_object(ORBImpl.java:836) at org.GNOME.Accessibility.AccessUtil.getRegistryObject(AccessUtil.java:143) at org.GNOME.Accessibility.JavaBridge.registerApplication(JavaBridge.java:1099) at org.GNOME.Accessibility.JavaBridge.<init>(JavaBridge.java:364) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at java.lang.Class.newInstance0(Class.java:372) at java.lang.Class.newInstance(Class.java:325) at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:786) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:874) at java.awt.Window.getToolkit(Window.java:1170) at java.awt.Window.init(Window.java:400) at java.awt.Window.<init>(Window.java:438) at java.awt.Frame.<init>(Frame.java:419) at demos.j2d.TextFlow.main(TextFlow.java:67)
Any idea (Ken?), if this is may be the cause for the problem? What's going wrong?
|
|
|
|
|
6
|
Java Game APIs & Engines / JOGL Development / [BUG] TextRenderer broken in 1.1.1 (+Workaround)
|
on: 2009-03-16 22:31:08
|
|
While the TextRenderer works perfectly in my desktop application, in the applet only some dots are visible. When I want to move the text, it even seems to rotate (EDIT: no, that's right, forget it. NO transformation problem!). I did not investigate more on this problem yet, I just wanted to ask if it is an already known problem!
Unfortunately I could not find any JOGL applets using the TextRenderer on the web - are there examples?
I tried with appletlauncher with the newest JOGL build. The same JOGL build works perfectly for the Java application.
|
|
|
|
|
7
|
Java Game APIs & Engines / JOGL Development / Re: [BUG] Loading custom mipmaps fails
|
on: 2008-12-04 19:23:50
|
The way to do this with the current code would be to first load your mipmaps into an array of TextureData objects, and then allocate one TextureData with an array of Buffers, where the Buffers come from the original TextureDatas. Then create the Texture from the TextureData containing the mipmaps. Thanks for this idea, works perfectly! I will submit a patch for JOGL2 as soon as it is available and I use it. Here is the working code now: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| LinkedList<TextureData> mipmapLevels = new LinkedList<TextureData>(); for (int i = 0; true; i++) { TextureData mipmapLevel = TextureIO.newTextureData(openDataFile(i), false, "png"); mipmapLevels.add(mipmapLevel); if (mipmapLevel.getWidth() <= 1) break; } Buffer[] buffers = new Buffer[mipmapLevels.size()]; int level = 0; for (TextureData mipmapLevel : mipmapLevels) { buffers[level] = mipmapLevel.getBuffer(); level++; } TextureData top = mipmapLevels.getFirst(); TextureData textureData = new TextureData(top.getInternalFormat(), top.getWidth(), top.getHeight(), 0, top.getPixelFormat(), top.getPixelType(), false, false, buffers, null); Texture texture = TextureIO.newTexture(textureData); |
|
|
|
|
|
8
|
Java Game APIs & Engines / JOGL Development / Re: Loading custom mipmaps fails
|
on: 2008-11-23 16:01:50
|
This is exactly what I meant when I said: OK, you could say, that I may not call updateSubImage when there are no mipmap images. But I have no choice: There is neither a method to set mipmap images (updateImage has no parameter for the mipmap level), nor can I first enable auto-mipmap and then overwrite the mipmaps (JOGL doesn't allow to change the mipmap images in this case). The "bug" is, that JOGL does not allow me to define custom mipmaps (if so, please tell me, how), although this would be trivial to do by adding a mipmap level parameter to the setTexImage2D method.
|
|
|
|
|
9
|
Java Game APIs & Engines / JOGL Development / Re: Loading custom mipmaps fails
|
on: 2008-11-21 22:42:10
|
If this is calling TexSubImage2D, try replacing it with TexImage2D.
Thanks!! This was the solution. I think this is a bug in JOGL. Detailed explanation: I want to create a texture with manually loaded mipmaps. So I create a texture with auto-mipmap off. Now I want to add the mipmaps. This fails, because glTexSubImage2D is only allowed, if the corresponding image already exists. But it doesn't, because I disabled auto-mipmap and so there is only level 0 available! OK, you could say, that I may not call updateSubImage when there are no mipmap images. But I have no choice: There is neither a method to set mipmap images (updateImage has no parameter for the mipmap level), nor can I first enable auto-mipmap and then overwrite the mipmaps (JOGL doesn't allow to change the mipmap images in this case). Suggestion: Add a parameter for the mipmap level to Texture.updateImage and the problem is solved. Can you fix that, please?
|
|
|
|
|
11
|
Java Game APIs & Engines / JOGL Development / [Solved] Loading custom mipmaps fails
|
on: 2008-04-16 20:07:15
|
Hi, I want to load my manually created mimaps for a texture, not those generated by OpenGL. My code: 1 2 3 4 5 6 7
| Texture texture = TextureIO.newTexture(myInputStream, false, "png"); for (int i = 1; true; i++) { TextureData mipmap = TextureIO.newTextureData(myMipMapStream[i], false, "png"); texture.updateSubImage(mipmap, i, 0, 0); if (mipmap.getWidth() <= 1) break; } |
There is no error, but the texture is only displayed black ( - at least without alpha, as it should have). The input streams are ok, loading each texture works. Also automatic generating works: 1
| Texture texture = TextureIO.newTexture(myInputStream, true, "png"); |
Any idea? Thanks 
|
|
|
|
|
15
|
Java Game APIs & Engines / JOGL Development / Re: jogl-panel doesn't stay in its position
|
on: 2007-11-15 20:44:22
|
|
*push*
Does anybody now if this could be a driver problem? Anybody seen something like that before?
Please believe me that everything is fine with our code. It works on all other machines we tested, using Windows XP and Linux. If we should provide more information to locate the problem, please tell us.
|
|
|
|
|
17
|
Java Game APIs & Engines / JOGL Development / Re: Problem with JUnit and TextureIO
|
on: 2007-08-21 21:46:08
|
Thanks for the quick responses :-) The createGL() method looks like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| static GL createGL() { GLDrawableFactory f = GLDrawableFactory.getFactory(); if (f.canCreateGLPbuffer()) { try { pbuffer = f.createGLPbuffer(new GLCapabilities(), null, 1, 1, null); pbuffer.display(); if (pbuffer.getContext().makeCurrent() != GLContext.CONTEXT_NOT_CURRENT) return pbuffer.getGL(); } catch (Exception ex) { ex.printStackTrace(); } } return null; } |
Unfortunately I get the exception javax.media.opengl.GLException: javax.media.opengl.GLException: pbuffer creation error: glXCreatePbuffer() failed at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271) at com.sun.opengl.impl.x11.X11GLDrawableFactory.maybeDoSingleThreadedWorkaround(X11GLDrawableFactory.java:668) at com.sun.opengl.impl.x11.X11GLDrawableFactory.createGLPbuffer(X11GLDrawableFactory.java:327) at com.xenoage.score.app.opengl.OpenGLCaps.createGL(OpenGLCaps.java:97) at com.xenoage.score.app.opengl.TextureManagerTest.getImageTexture(TextureManagerTest.java:31) [...] Am I using bad parameters or is my video card not able to create pbuffers? I have a ATI Mobility Radeon 9700 and Linux is running: andi@andi-laptop:~$ fglrxinfo display: :0.0 screen: 0 OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: MOBILITY RADEON 9700 OpenGL version string: 2.0.6334 (8.34.8) With the FireGL-drivers deactivated, using the default ATI drivers supplied with Ubuntu 7.04: javax.media.opengl.GLException: javax.media.opengl.GLException: pbuffer creation error: glXChooseFBConfig() failed at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271) at com.sun.opengl.impl.x11.X11GLDrawableFactory.maybeDoSingleThreadedWorkaround(X11GLDrawableFactory.java:668) at com.sun.opengl.impl.x11.X11GLDrawableFactory.createGLPbuffer(X11GLDrawableFactory.java:327) at com.xenoage.score.app.opengl.OpenGLCaps.createGL(OpenGLCaps.java:97) at com.xenoage.score.app.opengl.TextureManagerTest.getImageTexture(TextureManagerTest.java:31) My fault or driver's fault?
|
|
|
|
|
18
|
Java Game APIs & Engines / JOGL Development / Problem with JUnit and TextureIO
|
on: 2007-08-21 20:59:06
|
Hi, We are using JOGL now for a while and are very satisfied with it. Thanks for the great job  Now I have a problem with JUnit. I have a test method like this: 1 2 3 4 5 6 7
| @Test public void getImageTexture() { GL gl = OpenGLCaps.createGL(); TextureIO.newTexture(...); } |
The line with the TextureIO throws an Exception: javax.media.opengl.GLException: No OpenGL context current on this thread at javax.media.opengl.glu.GLU.getCurrentGL(GLU.java:234) at com.sun.opengl.util.texture.Texture.<init>(Texture.java:146) at com.sun.opengl.util.texture.TextureIO.newTexture(TextureIO.java:440) at com.sun.opengl.util.texture.TextureIO.newTexture(TextureIO.java:489) at com.xenoage.score.app.opengl.ManagedTexture.load(ManagedTexture.java:59) [...] I can understand why it happens, but I do not understand how I can solve the problem. Is there any way? createGL() gives me a valid GL object, since other simple tests work with it (e.g. get maximum texture size). Thanks 
|
|
|
|
|
21
|
Java Game APIs & Engines / Java 3D / Re: Java 3D for fast 2D painting?
|
on: 2007-06-03 11:37:42
|
And though DirectX is supported in Vista, it is not supported outside Microsoft platforms such as Mac, or Linux. And don't conform to Microsoft's OS bashing, it's just plain unfair on everyone else  I never said that DirectX will be the only output engine... DirectX is an addition for Windows/Vista machines with no or bad OpenGL support. In fact I don't like DirectX, but I can't tell my users that they must buy a new Linux computer...
|
|
|
|
|
22
|
Java Game APIs & Engines / Java 3D / Re: Java 3D for fast 2D painting?
|
on: 2007-06-03 11:08:51
|
|
Thanks for the reply, but, sorry, I have never seen a good game written in Java 2D. Do you know one, that proves your statement?
Perhaps it's all possible in Java 2D... I am not somebody who wants to spend nights over optimizing pieces of code, I am a programmer that want to develop a music notation software (music notation is the main topic, not optimizing some output engine).
The reason why I think about Java 3D is the following train of thoughts:
- OpenGL works great (JOGL would be the solution!), the method works, it allows even 3D effects later (not possible with Java 2D) - But: Vista (arrgh! I hate it, but many people have it, so I can not ignore it) does not support OpenGL from the beginning, so there must be OpenGL drivers from the video card manufactures. There are still machines without OpenGL support (example: a notebook from Dell with Intel GMA 945, which is quite common) - Idea: Vista certainly supports DirectX. - Idea: Use OpenGL when possible (all OSs but Microsoft's...), and DirectX otherwise. - Try to find a library for DirectX -> not found. - Try to find a library for OpenGL and DirectX -> found: Java 3D.
If there is the possibility to do the same things with Java 2D, I will try it immediately (really, I'd like to avoid that enourmous Java 3D overhead). But I have seen no demo that shows the great speed of Java 2D yet...
|
|
|
|
|
23
|
Java Game APIs & Engines / Java 3D / Re: Java 3D for fast 2D painting?
|
on: 2007-06-03 10:17:40
|
We need the high speed and tested Java 2D on many machines, it is much too slow on older ones. Maybe it works on today's computers, but we want to support some older (lets say, from 2000 on or so) machines too, and our tests showed, that it is too slow. Even when Java 2D internally uses OpenGL or Direct3D, we believe that it is not as fast as our own implementation, because we know where certain things can be optimized while Java 2D has to "guess", and we need the full control (e.g. the "hope" that Java 2D will manage the textures in the right way is not enough for us). Java 3D: I can only say that the examples work fantastic (e.g. the HelloUniverse runs at 3000 FPS with Direct3D and with 1000 FPS with OpenGL - who said that Java 3D with Direct3D is slow?  ). I just wondered if Java 3D is a too big overhead for our purposes, and if there is a project like JOGL but for Direct3D? If not, we will use Java 3D and try to avoid all unnecessary overhead. Is the immediate mode the right way for this? Are there any good tutorials which show how to get best performance out of Java 3D (if necessary, by ignoring all its features like the scene graph?). Thanks!
|
|
|
|
|
24
|
Java Game APIs & Engines / Java 3D / Java 3D for fast 2D painting?
|
on: 2007-06-03 09:04:40
|
Hi, We are writing a music notation program, which uses of course only 2d images (drawn as quads with textures, because it's much faster than Java 2D). At the moment our library is JOGL, and it works great. Now we have a little problem with some Vista systems which don't have OpenGL video drivers up to now. So we thought about adding a Direct3D output. I noticed that Java 3D supports both OpenGL and DIrect3D, so that's great. I can write on a higher abstract level and Java 3D does the low level job for me. My question: Is Java 3D ok for our purpose? I mean, isn't it too high level? Before we rendered thousands of symbols very quickly with some OpenGL, now it seems that I hav to create a Java object for each symbol? That is quite a lot of overhead. Or should I use the pure immediate mode, which is - hopefully - much faster? Thanks  Andi
|
|
|
|
|
25
|
Java Game APIs & Engines / JOGL Development / Re: GLJPanel slow under Linux
|
on: 2007-05-19 12:46:33
|
1 2 3 4 5
| GLJPanel.addNotify() javax.media.opengl.GLException: pbuffer creation error: glXCreatePbuffer() failed at com.sun.opengl.impl.x11.X11PbufferGLDrawable.createPbuffer(X11PbufferGLDrawable.java:162) at com.sun.opengl.impl.x11.X11PbufferGLDrawable.<init>(X11PbufferGLDrawable.java:73) |
I wonder why... All JOGL demos work great, even those that need pbuffer support! Additional problem on other computer (Windows, no name video card: SiS Mirage Graphics, but drivers are from 02/2007): GLJPanel is always black. No error messages, just normal messages like "GLJPanel.handleReshape: (w,h) = (1392,845)", "glViewport(0, 0, 1392, 845)" and so on... GLCanvas works great in both cases. Is there still work done with GLJPanel to improve its compatibility? Or do I have to buy new computers? ;-) Thanks. EDIT: I have found a way to use GLCanvas, too. It's not looking as good as with GLJPanel, but it's ok. Is there a possibility to find out if GLJPanel supports hardware acceleration? Something like 1
| if (GLJPanel.tryHardwareAcc()) useGLJPanel(); else useGLCanvas(); |
|
|
|
|
|
26
|
Java Game APIs & Engines / JOGL Development / Re: GLJPanel slow under Linux
|
on: 2007-05-18 17:27:40
|
|
I tried
glxinfo | grep pbuffer
but I did not get any results. But the OpenGL version is 1.3, so pbuffers are regular part of OpenGL, aren't they? So I asked, if this is recognized by JOGL too.
Does it help when I post the complete output of glxinfo here? Or is there any possibility to know why exactly acceleration within the GLJPanel fails?
|
|
|
|
|
27
|
Java Game APIs & Engines / JOGL Development / GLJPanel: No hardware acceleration
|
on: 2007-05-18 14:57:17
|
|
Hi,
I have a notebook with an ATI Mobility Radeon 9700. Under Windows, the GLJPanel is fast. Under linux, it's extremly slow, but GLCanvas is very fast and so I think my drivers are ok. I have to use the Swing component, because I use JTextPanes with transparent background within the panel (wow, it's extemely fast, I wouldn't have believed that before!)
Now I try to find the reason for the low speed in Linux. I heard, GLJPanel needs pbuffer-support.
First question: Does JOGL support the GLX 1.3 pbuffers (standard), or the SGI extension, or both?
Thanks,
Andi
EDIT: Thread title changed, because other computer with windows is affected too.
|
|
|
|
|
29
|
Java Game APIs & Engines / JOGL Development / Re: Shared GLJPanel for a JTabbedPane
|
on: 2007-04-15 23:34:01
|
I already found a "dirty" workaround, if we can not find a solution. The JTabbedPane is on the top and is only as high as its buttons. Unfortunately this isn't possible in swing (its content pane seems to be at least around 20 px high, even if all child panels want to have a height of 0 px), but with this workaround I can place the JTabbedPane at the north side of a BorderLayout and the GLJPanel at the center of the BorderLayout: 1 2
| tabPanel.setPreferredSize(new Dimension(0, tabPanel.getUI().getTabBounds(tabPanel, 0).height); |
Now the JTabbedPane is forced to have only the height of its buttons (should work for all look and feels), at it looks as if the GLJPanel belongs to the tabs. A better solution would be great, but it's a temporary solution.
|
|
|
|
|
30
|
Java Game APIs & Engines / JOGL Development / Shared GLJPanel for a JTabbedPane
|
on: 2007-04-15 18:57:23
|
Hi, I have a Swing application with a JTabbedPane. Each tab shows a document that needs a GLJPanel. Since they share the same textures, I want to use only one GLJPanel for all tabs. There would be two ways to do this: - Just use the same component for all tab pages (but seems to be impossible in Swing?  ) - Add the GLJPanel to the current page when opened (ChangeListener). The second idea works - but init() is called again and I have to reload all textures - this is slow. Does anybody have an idea how I could do it? Is there perhaps a way to avoid the reinitialization of the GLJPanel? I also thought about writing my own version of a tabbed pane... Thanks  Andi
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|