Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (524)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
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]
  ignore  |  Print  
  BlendInspect  (Read 6181 times)
0 Members and 1 Guest are viewing this topic.
Offline broumbroum

Junior Devvie





« Reply #30 - Posted 2007-09-29 20:58:33 »

just have a look to the errors on J2SE 1.5 OSX ppc arch:
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  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
Exception in thread "Thread-4" javax.media.opengl.GLException: java.lang.NoSuchMethodError: com.sun.opengl.util.texture.Texture.updateSubImage(Lcom/sun/opengl/util/texture/TextureData;IIIIIII)V
   at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
   at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:256)
   at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
   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:613)
Caused by: java.lang.NoSuchMethodError: com.sun.opengl.util.texture.Texture.updateSubImage(Lcom/sun/opengl/util/texture/TextureData;IIIIIII)V
   at com.sun.opengl.util.j2d.TextureRenderer.sync(TextureRenderer.java:661)
   at com.sun.opengl.util.j2d.TextureRenderer.getTexture(TextureRenderer.java:293)
   at com.sun.opengl.util.j2d.TextureRenderer.draw3DRect(TextureRenderer.java:499)
   at com.sun.opengl.util.j2d.TextRenderer.draw3D(TextRenderer.java:559)
   at com.sun.opengl.util.j2d.TextRenderer.draw(TextRenderer.java:491)
   at u.display(Unknown Source)
   at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
   at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:281)
   at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
   at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:298)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
   at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: com.sun.opengl.util.texture.Texture.updateSubImage(Lcom/sun/opengl/util/texture/TextureData;IIIIIII)V
   at com.sun.opengl.util.j2d.TextureRenderer.sync(TextureRenderer.java:661)
   at com.sun.opengl.util.j2d.TextureRenderer.getTexture(TextureRenderer.java:293)
   at com.sun.opengl.util.j2d.TextureRenderer.beginRendering(TextureRenderer.java:576)
   at com.sun.opengl.util.j2d.TextureRenderer.begin3DRendering(TextureRenderer.java:374)
   at com.sun.opengl.util.j2d.TextRenderer.beginRendering(TextRenderer.java:685)
   at com.sun.opengl.util.j2d.TextRenderer.begin3DRendering(TextRenderer.java:439)
   at u.display(Unknown Source)
   at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
   at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:281)
   at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
   at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:258)
   at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
   at javax.media.opengl.GLCanvas.paint(GLCanvas.java:142)
   at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
   at sun.awt.RepaintArea.paint(RepaintArea.java:241)
   at apple.awt.ComponentModel.handleEvent(ComponentModel.java:251)
   at java.awt.Component.dispatchEventImpl(Component.java:4097)
   at java.awt.Component.dispatchEvent(Component.java:3869)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
   at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Since your last update. There's also a black rectangular shape on panel...  Wink it somekinda misses the method in OGL as far as I can guess.

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Offline emzic

Senior Devvie





« Reply #31 - Posted 2007-10-02 08:46:34 »

thanks very much for the information!

pretty much all of the mac-testers so far, have this problem. does anyone know why this exception is thrown on macs?
it seems it is the textrenderer.

java.lang.NoSuchMethodError: com.sun.opengl.util.texture.Texture.updateSubImage(Lcom/sun/opengl/util/texture/TextureData;IIIIIII)V

btw: it is currently on the opengl.org frontpage Smiley
http://www.opengl.org/news/permalink/blendinspect_opengl_blendmode_visualization/

you can also digg it:
http://digg.com/programming/BlendInspect

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #32 - Posted 2007-10-02 19:46:11 »

My best guess as to why that exception is being thrown is that an old version of JOGL was installed in /System/Library/Java/Extensions against the advice of the JOGL User's Guide.

I don't have a PPC Mac to test on but actually the app doesn't work on OS X Intel (Mac Mini -- Intel Integrated Graphics). The OpenGL canvas seems to be a small strip in the upper-left corner of the window and the rest of the window is white. Why did you make the window non-resizable? Can you publish the source code for the app so we can try to diagnose what is going wrong with your component hierarchy setup?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #33 - Posted 2007-10-02 19:53:17 »

Actually I have to take that back. The problem seems to be that I installed the Developer Preview of Java 6 on my Mac Mini and it's causing problems with Java Web Start.
Offline emzic

Senior Devvie





« Reply #34 - Posted 2007-10-02 22:19:49 »

thanks a lot for your help, Ken.

most of the people that tested it on a mac did report the same problem, so i doubt that the reason is that they installed the jogl manually. i will post the source code as soon as i get home from work.

the reason why the window is not resizable, is that i dont have to care about aspect-ratios, distortions, out-of-bounds objects,  overlapping texts, etc... Smiley or in other words... lazyness.

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Offline emzic

Senior Devvie





« Reply #35 - Posted 2007-10-04 15:39:20 »

sorry for the delay. here are the two relevant classes:

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  
36  
37  
38  
39  
40  
41  
42  
43  
public class MainFrame extends Frame {
   private static final long serialVersionUID = 1L;
   public static int INIT_WIDTH = 700;
   public static int INIT_HEIGHT = 500;
   
   private Animator animator;
   
   private static RenderFrame renderframe;

   public MainFrame () {
      super("BlendInspect by Matthias Grumet");
     
      setLocationRelativeTo(null);
      setResizable(false);
     
      Toolkit.getDefaultToolkit().setDynamicLayout(true);
     
      renderframe = new RenderFrame();
      animator = new Animator(renderframe);
      addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
            new Thread(new Runnable() {
               public void run() {
                  animator.stop();
                  System.exit(0);
               }
            }).start();
         }
      });
      animator.start();
     
      add(renderframe);

      setVisible(true);
      setInnerSize(INIT_WIDTH, INIT_HEIGHT);
      setLocation((int) Math.round(GraphicsEnvironment
            .getLocalGraphicsEnvironment().getCenterPoint().getX()
            - INIT_WIDTH / 2.0), (int) Math.round(GraphicsEnvironment
            .getLocalGraphicsEnvironment().getCenterPoint().getY()
            - INIT_HEIGHT / 2.0));
   
   }
}



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  
public class RenderFrame extends GLCanvas implements GLEventListener, MouseMotionListener, MouseListener {
   private static final long serialVersionUID = 1L;

   private GL gl;

   public RenderFrame () {
      addGLEventListener(this);
      addMouseMotionListener(this);
      addMouseListener(this);
   }


   public void init(GLAutoDrawable drawable) {
      gl = drawable.getGL();
      gl.glClearColor(0,0,0,1);
      gl.glEnable(GL.GL_DEPTH_TEST);
      gl.glDisable(GL.GL_ALPHA_TEST);
      gl.glEnable(GL.GL_TEXTURE_2D);
      gl.glEnable(GL.GL_BLEND);
   }

   public void display(GLAutoDrawable drawable) {
      gl = drawable.getGL();
      gl.glClearColor(0,0,0,1);
      gl.glClear(GL.GL_DEPTH_BUFFER_BIT | GL.GL_COLOR_BUFFER_BIT);
      ...      
   }

   public void displayChanged(GLAutoDrawable drawable, boolean arg1, boolean arg2) {}

}

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #36 - Posted 2007-10-05 08:35:21 »

You're violating the AWT rules about performing all component-related work on the Event Dispatch Thread after the component has been realized. See this article. It applies to Swing but is generally true of the AWT components as well. Add all of the components, set the location of the frame, then make it visible and start your Animator. Follow the example of the JOGL demos.
Offline emzic

Senior Devvie





« Reply #37 - Posted 2007-10-05 10:28:13 »

ok, thanks a lot for the information!

i have uploaded an updated version now! again i would be very grateful for mac-testers! thanks!

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Offline lhkbob

JGO Knight


Medals: 32



« Reply #38 - Posted 2007-10-05 15:09:44 »

I'm still getting the same  problem Sad

Offline emzic

Senior Devvie





« Reply #39 - Posted 2007-10-05 16:04:58 »

thanks for testing, lhkbob.

hmmm, i really need to get a mac to debug this problem ....

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline emzic

Senior Devvie





« Reply #40 - Posted 2007-10-06 12:19:42 »

here is info from one of the mac-testers who got it to work:

Quote
I just get the application menu. Also, it asks to save the application blendinspect.app to a folder. It appears the app is never saved to the folder.

Also, I did not have Open Safe files check in Safari. So, I had to double click on the blendinspect.jnlp file on the desktop to get it going. If I did check the Open Safe files in Safari it worked automatically. But it just produced the same situation as described previously.

That is strange. If I cancel the save blendinspect.app then it runs.

Maybe when I try to save there is a permissions issue and it messes up the process? But if I cancel then it works.

thank you!

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Offline broumbroum

Junior Devvie





« Reply #41 - Posted 2007-10-06 12:26:00 »

here is info from one of the mac-testers who got it to work:

thank you!
I've written a post about it : http://b23prodtm-mambo.webhop.info/index.php?option=com_content&task=view&id=121&Itemid=1

Use the Java Cache Viewer instead of the JWS because it is somehow bugged on 1.5...  Grin

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Offline emzic

Senior Devvie





« Reply #42 - Posted 2007-10-06 12:28:48 »

ah thanks a lot!
so this is actually something that has to be done by the user, right?

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Offline lhkbob

JGO Knight


Medals: 32



« Reply #43 - Posted 2007-10-06 22:31:08 »

I tried doing this and it ran, woohoo.  There was a small glitch that I noticed on the mac that might not be a problem on windows (I don't remember seeing it then).  Anyway, while running the canvas seems shifted up, so that a small portion is covered by the window frame.  This causes your highlighting and text selection to be off by about 1 line.  I think that it is caused by the program thinking that the GL context is anchored in the wrong place.

Pages: 1 [2]
  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.

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

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

toopeicgaming1999 (10 views)
2014-11-26 15:20:08

SHC (24 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (26 views)
2014-11-25 11:26:43

Gibbo3771 (24 views)
2014-11-24 19:59:16

trollwarrior1 (37 views)
2014-11-22 12:13:56

xFryIx (75 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50
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

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