Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (762)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (847)
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] 2 3
1  Java Game APIs & Engines / JOGL Development / Re: Swing in/over a GLCanvas on: 2009-06-24 07:43:53
Can't you add the GLCanvas to a JPanel and add the JRViewer to the JPanel?
Or am I missing the point here.
2  Java Game APIs & Engines / JOGL Development / JFileChooser Animator on: 2009-02-28 15:21:21
Hello,

can somebody tell me what could cause this behaviour?
When I open a JFileChooser-dialog over a GLFrame or GLJPanel, Iget strange text (see screenshot).
This only happens when I use an Animator or FPSAnimator.

thanks
3  Java Game APIs & Engines / JOGL Development / Re: maximizing GLCanvas on linux on: 2008-03-15 04:18:32
I haven't had much time to figure it ou but I noticed that this only seems to happen with windowmanager xfwm4, this is the default WM for (desktop environement) xfce4 (linux), so it's probabely a bug in that manager.
4  Java Game APIs & Engines / JOGL Development / Re: maximizing GLCanvas on linux on: 2008-03-13 12:35:36
This is alI have, just a GLCanvas  added to a JFrame.
No GLEventListener attached. So no reshape, init display...
5  Java Game APIs & Engines / JOGL Development / Re: maximizing GLCanvas on linux on: 2008-03-12 10:59:03
When the gui blocks, I mean that the only thing I can do is to shut down the pc (exept for my mousepointer, I can still move that). So, there is no way I can run jstack when I am experiencing that problem.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
import javax.swing.*;
import javax.media.opengl.*;

public class Test{
   JFrame frame = new JFrame("test");
   GLCanvas canvas = new GLCanvas();

   public static void main (String args[]) {
      new Test();
   }

   public Test(){
      frame.setSize(100, 100);

      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

      frame.add(canvas);

      frame.pack();
      frame.setVisible(true);
   }
}
6  Java Game APIs & Engines / JOGL Development / maximizing GLCanvas on linux on: 2008-03-11 10:20:02
Hello,

I'm having problems maximizing a GLCanvas in Linux. When I try to do so, my gui blocks (I mean, the pc doesn't react on my keyboard, my mousepointer still moves but there is no reaktion on mouseclicks).
I'm working on linux
7  Java Game APIs & Engines / JOGL Development / Re: GLJPanel in Eclipse on: 2008-03-03 09:50:13
stupid me...,

Still, strange that it only happens with GLJPanel on the command line with -Dsun.java2d.opengl="true". Or is this just coincidence?

Nico
8  Java Game APIs & Engines / JOGL Development / Re: GLJPanel in Eclipse on: 2008-02-27 09:33:47
Hello,

I have been searching for a while and made a small testcase.

GLDemo.java
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  
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.media.opengl.*;

public class GLDemo{
   public GLDemo(){
      JFrame frame = new JFrame("test");
      frame.setPreferredSize(new Dimension(800, 600));

      JPanel upperPanel = new JPanel();
      upperPanel.setLayout(null);
      upperPanel.setBackground(Color.GREEN);

      //GLCanvas glpanel = new GLCanvas();
      GLJPanel glpanel = new GLJPanel();
      glpanel.addGLEventListener(new GLDemoRenderer());

      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

      glpanel.setSize(450, 450);
      upperPanel.add(glpanel);
      frame.add(upperPanel);

      frame.pack();

      frame.setVisible(true);
   }

   public static void main (String args[]) {
      SwingUtilities.invokeLater(new Runnable(){
         public void run(){
            GLDemo gldemo = new GLDemo();
         }
      });
   }
}


GLDemoRenderer.java
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  
import javax.media.opengl.*;
import javax.media.opengl.glu.GLU;
import com.sun.opengl.util.*;

public class GLDemoRenderer implements GLEventListener{

   public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged){
   }

   public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height){
      final GL gl = drawable.getGL();
      gl.glViewport(0, 0, width, height);
      gl.glMatrixMode(GL.GL_PROJECTION);
      gl.glLoadIdentity();
      gl.glOrtho(-2, 2, -2, 2,0, 10);
      gl.glMatrixMode(GL.GL_MODELVIEW);
   }

   public void display(GLAutoDrawable drawable){
      final GL gl = drawable.getGL();
      final GLUT glut = new GLUT();

      gl.glClear(GL.GL_COLOR_BUFFER_BIT);
      gl.glLoadIdentity();

      gl.glTranslatef(0.0f, 0.0f, -6.0f);
      glut.glutWireCube(1.0f);
      gl.glLoadIdentity();
   }

   public void init(GLAutoDrawable drawable){
      final GL gl = drawable.getGL();
      gl.glClearColor(0,0,0,0);
   }
}


When, in GLDemo.java,
1  
GLJPanel glpanel = new GLJPanel
is changed into
1  
GLCanvas glpanel = new GLCanvas()
the cube is drawn on an other place.

I'm working on Ubuntu 7.10, java 6, jsr-231-1.1.0

thanks,
Nico
9  Java Game APIs & Engines / JOGL Development / GLJPanel in Eclipse on: 2008-02-26 15:19:48
Hello,

 I have a strange behaviour. I'm having a GLJPanel in a project in Eclipse, When I run it, everythins is as should be (the (0, 0) co├Ârdinate is at the center of the screen). When I try to run everything from command-line, everything is moved downwards.

If I use a GLCanvas, embedded in a JPanel, they both (Eclipse and command-line) show the (0, 0)-co├Ârdinate in the center of the screen.

Does anybody know what the problem could be??

Thanks in advance,
Nico

Okay, it has something to do with -Dsun.java2d.opengl="true", if I remove that part, the strange behaviour doesn't apear.
10  Java Game APIs & Engines / JOGL Development / Re: GLJPanel or GLCanvas on: 2008-02-25 16:30:54
Hello,

basically GLJPanel is a light-weight component and GLCanvas is a heavy-weight component.
GLJPanel is slower than GLCanvas but GLPanel is easier when using other light-weight-components (like Swing).

Nico
11  Game Development / Newbie & Debugging Questions / Re: FSEM on Linux on: 2008-02-21 14:18:30
Quote
an engineer of Sun Microsystems said that under KDE, if you create an undecorated window that occupies all the screen, this window manager considers this window as in full screen exclusive mode, is that true?

I don't know anything about that, sounds strange. I tried installing KDE and running CapabilitiesTest.java, no FSEM. But I wouldn't have a clue about how KDE handles this.

Nico
12  Game Development / Newbie & Debugging Questions / Re: classpath issues Linux on: 2008-01-18 12:32:09
It works again  Cheesy

I had to remove ejc too to make it happen.

javac -version did gave me
1  
2  
3  
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)


Oh yes, it did give all those compile-errors too.

Thanks alot
13  Game Development / Newbie & Debugging Questions / Re: classpath issues Linux on: 2008-01-18 10:24:45
I've been using eclipse for a while(couple of months), so I didn't need the command-line (actually, I use Geany for small programs), so I don't really know what could have been changed, maybe java-build?
Am I the only one witch this 'problem' ?
14  Game Development / Newbie & Debugging Questions / Re: classpath issues Linux on: 2008-01-18 09:32:56
It works that way.
Still strange, it used to work with *    and
1  
java -classpath "/homenico/extrajars/jogl/*:." HoofdDraad


also doesn't give any problems.
15  Game Development / Newbie & Debugging Questions / classpath issues Linux on: 2008-01-18 07:54:12
Hello,

I'm recently having the following problem.
When I try to compile a program with
1  
javac -classpath "/home/nico/extrajars/jogl/*:." HoofdDraad.java

the following message appears:
1  
incorrect classpath: /home/nico/extrajars/jogl/*

This used to work for me!
Both gluegen-rt.jar and jogl.jar are in /home/nico/extrajars/jogl/   ,
Normally I compile java-programs in Eclipse, so it can be that this problem is not that recent.

I can run programs with
1  
java -classpath "/homenico/extrajars/jogl/*:." HoofdDraad


java -version gives me
1  
2  
3  
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

and I'm working with Xubuntu 7.04.

I believe it's a bug but I'm unsure.
16  Game Development / Newbie & Debugging Questions / Re: FSEM on Linux on: 2008-01-16 16:39:09
Yep, I gues you're right.
I have Ubuntu 7.10 (xorg 1.7.2 if I'm correct).
I will have to wait until the bug gets fixed.

thanks.
17  Game Development / Newbie & Debugging Questions / FSEM on Linux on: 2008-01-15 09:55:39
Maybe this is not the place to ask but since this is a games-forum and FSEM is probabely pretty game-related.

If I'm correct, FSEM exists since java 1.4.
1)I have now java 1.6, still no FSEM for Linux...
2)I believe that there are also still problems in Windows and MacOS.

I was just wondering if some progress is to be expected on those points in the (near) future?

Thanks in advance
Nico
18  Java Game APIs & Engines / Java 3D / JCanvas3D on: 2007-10-11 13:19:18
I'm still a noob in Java3D.
Can somebody show me how I can use a JCanvas3D in stead of a Canvas3D?

I did
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
public test(){
      JFrame frame = new JFrame("hello");
      frame.setSize(400, 400);
           
      GraphicsConfigTemplate3D gCT = new GraphicsConfigTemplate3D();        
                JCanvas3D jCanvas3D = new JCanvas3D(gCT);
               
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     
      frame.add(jCanvas3D);
     
      frame.setVisible(true);
   }


and I get
1  
CANVAS CRASHED!!!


without explanation.
19  Java Game APIs & Engines / JOGL Development / Re: Problem with GL_SMOOTH on: 2007-09-28 10:34:57
mmmh..., okay...
I see why you didn't post your code earlier.
This goes way beyond my knowledge of Jogl or OpenGL, I fear someone else will have to help you.
Sorry
20  Java Game APIs & Engines / JOGL Development / Re: Problem with GL_SMOOTH on: 2007-09-28 10:09:31
Maybe, you could show your init and display code...
It's very strange that vertices move when you change shade model?
21  Java Game APIs & Engines / JOGL Development / Re: Problem with GL_SMOOTH on: 2007-09-28 08:52:28
Try to disable light and material, see if that changes anything (except the light and material of course).
22  Java Game APIs & Engines / JOGL Development / Re: Problem with GL_SMOOTH on: 2007-09-27 15:31:28
Is that the only line of code that you change?
Can you give an example of code where your'e facing that problem?
23  Game Development / Newbie & Debugging Questions / Re: Keep mouse in JFrame on: 2007-09-27 15:14:06
The fact is, there where other things that where different, that did change.
24  Game Development / Newbie & Debugging Questions / Re: Keep mouse in JFrame on: 2007-09-27 12:23:00
But now, it works, don't even know what I did differently....
25  Game Development / Newbie & Debugging Questions / Re: Keep mouse in JFrame on: 2007-09-27 11:34:19
When I run the program, my mouse stays positioned at a fixed place ( more or less in the center of my JFrame).
When I run it as a Java Web Start, the mouse doesn't stay fixed anymore.
So, yes, java.awt.Robot#mouseMove(int x, int y) doesn't work.
Maybe I should have gone to the java-forums, but since this is also a newbie-forum...
26  Game Development / Newbie & Debugging Questions / Re: Keep mouse in JFrame on: 2007-09-27 11:10:47
So, now i have signed my jars, i have changed my jnlp-filIe. I added
1  
2  
3  
<security>
           <all-permissions/>
 </security>


The program still runs identically the same as before.

Anyway, thanks for the link!
27  Game Development / Newbie & Debugging Questions / Re: Keep mouse in JFrame on: 2007-09-27 08:24:02
I'm sorry but I don't quite understand what you mean with
Quote
Sign it with appropriate privileges ( createRobot ) to use the Robot ?

I am also a JWS-newbie
28  Game Development / Newbie & Debugging Questions / Re: Keep mouse in JFrame on: 2007-09-27 08:08:41
Could you please explain me how I can constrain the mouse-pointer to a fixed position in a JWS-application?
29  Game Development / Newbie & Debugging Questions / Re: constant FPS on: 2007-09-25 17:14:19
Thanks for the answers,
but still...
I'm using Linux, and if I use nanoTimer(), I have the same result .
30  Game Development / Newbie & Debugging Questions / constant FPS on: 2007-09-25 11:04:13
Can somebody tell me if that is normal?
If I execute the following code
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  
import javax.swing.*;


public class TimerTest {

   public static void main (String args[]) {
      SwingUtilities.invokeLater(new Runnable(){
         public void run(){
            new TimerTest();
         }
      });
   }

   public TimerTest(){
      long startTime = System.currentTimeMillis();
      System.out.println(startTime);

      try{
         Thread.sleep(20);
      }
      catch(Exception e){}
      long endTime = System.currentTimeMillis();
      System.out.println(endTime);

      System.out.println("difference= "+(endTime-startTime));
   }
}


I get something like:
1190718128803
1190718128827
difference= 24

So the Thread is sleeping for 24ms (always more or less between 23 and 27). I have a dual core processor and I've heard that nanoTimer gives difficulties with dual-core.
Pages: [1] 2 3
 
EgonOlsen (361 views)
2018-06-10 19:43:48

EgonOlsen (363 views)
2018-06-10 19:43:44

EgonOlsen (302 views)
2018-06-10 19:43:20

DesertCoockie (539 views)
2018-05-13 18:23:11

nelsongames (867 views)
2018-04-24 18:15:36

nelsongames (849 views)
2018-04-24 18:14:32

ivj94 (1301 views)
2018-03-24 14:47:39

ivj94 (422 views)
2018-03-24 14:46:31

ivj94 (1085 views)
2018-03-24 14:43:53

Solater (433 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
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!