Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (525)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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 / About GLJPanel on: 2008-08-19 08:37:18
hi all:

When I was using GLJPanel to display 3D scene, at that time, I switch input method, it means I want to type some Chinese or Japanese characters, regardless I was used "ctrl + space" or click Language icon in taskbar to switch. The application always freeze.

The JRE version is 1.6.

Does anybody know this issue?

Thanks in advance.

Mikael
2  Java Game APIs & Engines / JOGL Development / Re: about "java.lang.outOfMemory" on: 2008-08-01 08:52:34
Thank you gibe!

You are very good personal, I think this problem can be solved, but another question, if I am using "Java Web Start" to launch this application, how to set the VM parameter?
3  Java Game APIs & Engines / JOGL Development / about "java.lang.outOfMemory" on: 2008-08-01 06:37:34
hi everybody:

        I am developing a JOGL application, mixing 2D & 3D using the GLJPanel component to render. For the project requirement, the application need to create a lots of instance of GLJPanel.  And this GLJPanel object is actually rewrite by myselft, such following code:

class MyPanel extends GLJPanel
{
   public MyPanel() {
   }
   public void paintComponenet(Graphics g) {
      super.paintComponent(g);
     // do some special
  }
}


Because I need to render special 2D things.  the problem is when I invoke "new MyPanel()"many times later,  there will throw a "java.lang.OutOfMemory" error.  Does someone known this issue? Thanks!
4  Java Game APIs & Engines / JOGL Development / Re: [urgent] Is it a bug? on: 2008-06-16 04:40:22
Thank you Ken Russell.

I will try.
5  Java Game APIs & Engines / JOGL Development / Re: [urgent] Is it a bug? on: 2008-06-13 07:42:42
Supplement:

Of course, I have added the JTextArea to Input words.  Even no JTextArea,  this issue still occur.
6  Java Game APIs & Engines / JOGL Development / [urgent] Is it a bug? on: 2008-06-13 07:40:20
hi everyone:

Does anyone already used the "GLJPanel" component for mix rendering 2D & 3D. Here I encounter a weird problem, When I add the a GLJPanel to a JFrame,  then I press keyboard with "ctrl + space"(i wanna to invoke Chinese input method).  then application will no responding.  Regardless how I drag the title bar or hit any key. it still no responding. and the application can only be destroyed by Windows task manager.(javaw.exe maybe cannot be died). But if I only type English characters(it means I dont press any key combination) it will be works fine.
I tried many ways, including reinstall other JRE version, and this problem aways happens.   If I dont use GLJPanle,  just normally Swing component, Input Chinese characters is Ok.

I have no idea about that.  please help me.

thanks in advance.
7  Java Game APIs & Engines / JOGL Development / JOGL in Applet on: 2008-05-09 02:06:29
I've implemented a JOGL demo using Applet. it works fine on my laptop.  the question is how about put it on the Server, I mean how to invoke nvative library( the .dLL file of jogl )  by Applet. seems the Applet tag in HTML code only indicate how much jar package will be used. no tag indicate the dll things.

I heard some one implement this by downloading .dll file from server, and write them into local disk, then invoke it.  I'am not sure whether it only has this way. because this way is so complex.


thanks
8  Java Game APIs & Engines / JOGL Development / Re: About Java2D/JOGL Interoperability Demo on: 2008-05-09 02:00:29
thanks, I see. I will open a new topic to ask the Applet implemention.
9  Java Game APIs & Engines / JOGL Development / Re: About Java2D/JOGL Interoperability Demo on: 2008-05-06 08:59:56
Thank you very much, it is very exciting. Other question,  Can I dont use the GLEventListener to implement?  because I wan to do the initialize process and rendering action whenever as I want.


thanks
10  Java Game APIs & Engines / JOGL Development / Re: About Java2D/JOGL Interoperability Demo on: 2008-05-06 06:38:15
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  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
public class Main extends JFrame {
   
   GLJPanel panel;  
   public Main() {
      this.setBounds(100, 100, 500, 500);
      JP jp = new JP();      
      getContentPane().add(jp);
      jp.addGLEventListener(new DrawListener());
      setVisible(true);      
   }  
     
   
   class JP extends GLJPanel {
      public JP() {
         super(new GLCapabilities());
         this.setSize(500,500);        
         
      }
      public void paintComponent(Graphics g) {
         //g.setColor(new Color(0xFFFFFF));
         g.drawString("some words", 30, 30);
      }
     
   }
   
   
   public static void main(String[] args) {
      Main m = new Main();      
     
   }
}
   
class DrawListener implements GLEventListener {
   
    public void init(GLAutoDrawable gld) {
        GL gl = gld.getGL();
        GLU glu =  new GLU();
        gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
        gl.glViewport(0, 0, 500, 300);
        gl.glMatrixMode(GL.GL_PROJECTION);
        gl.glLoadIdentity();
        glu.gluOrtho2D(0.0, 500.0, 0.0, 300.0);
    }
   
   
    public void display(GLAutoDrawable drawable) {
        float red = 0.0f;
        float green = 0.0f;
        float blue = 0.0f;
        GL gl = drawable.getGL();
        gl.glClear(GL.GL_COLOR_BUFFER_BIT);
        gl.glPointSize(5.0f);
        for (int i = 0; i < 50; i++) {
         red -= .09f;
         green -= .12f;
         blue -= .15f;
         if (red < 0.15)
          red = 1.0f;
         if (green < 0.15)
          green = 1.0f;
         if (blue < 0.15)
          blue = 1.0f;
         gl.glColor3f(red, green, blue);
         gl.glBegin(GL.GL_POINTS);
         gl.glVertex2i((i * 10), 150);
         gl.glEnd();
     }
    }

    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
    }
   
    public void displayChanged(GLAutoDrawable drawable, boolean modeChanged,
      boolean deviceChanged) {
    }
}



Please help me and let me understand what's the correctly code structure, as the above code, it doesn't work on drawing string and rendering 3D together. if I eliminate draw string, then render 3D is well.

I have no idea why.

thanks in advance.
11  Java Game APIs & Engines / JOGL Development / Re: About Java2D/JOGL Interoperability Demo on: 2008-05-05 09:27:19
Thank you , so, you mean that demo only used JOGL with 2D pipeline capability without directly use Graphics object?    Such as render a texture instead draw image?
12  Java Game APIs & Engines / JOGL Development / About Java2D/JOGL Interoperability Demo on: 2008-05-05 08:42:16
Who can tell me about a demo window can draw 2D icon on top of 3D scene which it located at the left corner in Demo frame.

The icon is a JAVA trademark.

How to do that, because I try to use GLCanvas to draw 3D and  draw 2D using the Graphics reference from GLCanvas, but when draw image, the screen will flicker. I didn't use GLEventListener cause I need a special framework.  Does anyone know if without GLEventListener, is it OK?


thanks
Mikael
13  Java Game APIs & Engines / JOGL Development / Re: About JOGL mixing 2D & 3D on: 2008-04-30 04:40:41
thanks Mathias!

I probably understand. Anyway, it is very new feature. I think to use draw Texture instead directly drawImage is best choice.


thank you!

Mikael
14  Java Game APIs & Engines / JOGL Development / Re: About JOGL mixing 2D & 3D on: 2008-04-24 09:30:42
thanks a lot, cylab. it 's   a exciting webpage, it will help me.

And I expect someone can answer why the Applet cannot display mixing 2D/3D
15  Java Game APIs & Engines / JOGL Development / About JOGL mixing 2D & 3D on: 2008-04-24 04:09:55
hi all:

I glad to see you-all here and feel impassioned discussion. my question is does Applet can implement mix 2D and 3D together to render? I saw some topic include how a Swing UI using Java Web Start to show how to mix 2D and 3D, but didn't see a Applet example. 

I've tried to use Applet, put a JPanel on it, and this panle also populated a GLCanvas to render 3D things.  when I invoke getGraphics() of GLCanvas for rendering 2D things, it always return NULL. 

But I do the same things in a JFrame, I mean it's not a Applet application.  it works fine.  only 2D things will be flicker.

plz help me, I am a fresher.

thanks
Mikael
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.

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

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

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

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

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

Norakomi (30 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 (76 views)
2014-11-13 12:34:49

digdugdiggy (53 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!