Show Posts
|
|
Pages: [1] 2
|
|
2
|
Java Game APIs & Engines / JOGL Development / *lightWeight" problem on Leopard
|
on: 2008-01-10 16:25:59
|
|
Hi
I'm developing a project in JOGL. Everything worked well so far, but since I upgraded my macbook to Leopard, the JMenuItem pop under the JOGL canvas. I do have the following line preventing that behaviour to happen on linux and windows (and osx 10.4 if i remember well) JPopupMenu.setDefaultLightWeightPopupEnabled(false);
is this a known bug ?
|
|
|
|
|
4
|
Java Game APIs & Engines / JOGL Development / Loading the libraries dynamically
|
on: 2007-07-06 15:42:49
|
|
Hi all
I developped an application using jogl and everything works fine when I launch it as a standalone version with java -Djava.library.path=....
but now my application is to be used (as a pluggin) from another application and i cannot copy the libs to the client jre, and i have no control over the way the application is launched (i cannot enforce the use of -Djava.library.path=...)
i tried to happend my library path to the current one using System.setProperty("java.library.path", ...); despite the fact that the path is correctly set, it won't find the libraries (I have read that using setProperty() with java.library.path is useless since the path is only scanned once, at startup ...)
Does anyone have an idea, on how to load the jogl library dynamically ?
Thanks in advance
|
|
|
|
|
6
|
Java Game APIs & Engines / JOGL Development / freezing when poping a JOptionPane in a picking method
|
on: 2007-05-04 15:17:41
|
|
Hi there,
I have a picking method in my application (called by the display method of the GLEventListener) This methods is supposed to do some operations, or display a WarningMessage in a JOptionPane if the operation in invalid.
but the JOptionPane.showMessage() freeze the application when called from the same thread that display
do you have a solution ? (using SwingWorker or something else)
Thanks
|
|
|
|
|
7
|
Java Game APIs & Engines / JOGL Development / Re: Problem with multiple jogl GLCanvas
|
on: 2006-05-29 13:12:46
|
|
i had this problem too, it seems there are too much jogl thread time compared to AWT thread time
if only one of your canvas is "moving" at the time and this others display a still picture as long as noonne touch them (this was my case) you should stop all "inactive canvas"'s animators and only start the animator of the one canvas that is moving
but if you have, lets say, two simultaneous display of a moving scene from different point of view, i don't know what to do
|
|
|
|
|
9
|
Java Game APIs & Engines / JOGL Development / Re: jogl application crashing X, how to debug ?
|
on: 2006-05-22 10:10:56
|
|
with the other jre (gcj), the this.getContentPane.add(canvas); crashed the application
now with j2sk1.4.2 the application works, but still does this xlib problem at a random point. sometimes it crashes almost immediatly, sometimes i can use it for ten minutes
I'll try to log exactly every opengl commands and see if there is a correlation at crashing point also, a friend of mine suspect it comes from the fact that i'm running sid/testing version of debian
but what is weird is that a add absolutly no problem before april 18th, so either I changed something import in my code at that point (i'll check in the CVS) or I had a mother board failure (the RAM is ok)
|
|
|
|
|
10
|
Java Game APIs & Engines / JOGL Development / Re: jogl application crashing X, how to debug ?
|
on: 2006-05-19 14:09:58
|
Ok, problem solved I narrowed down the code to the minimum crashing code. The problem is in the GLCanvas, i don't even need a GLEventListener the crashing code is when i add the GLcanvas to the JFrame : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| package fr.ustrasbg.ibmc.assemble; import javax.swing.*; import javax.media.opengl.GLCanvas; import java.awt.*;
public final class Main extends JFrame { static Main window; public static void main(String[] args) { window = new Main(); }
public Main() { JPopupMenu.setDefaultLightWeightPopupEnabled(false); GLCanvas canvas = new GLCanvas(); canvas.setSize(800, 800); this.getContentPane().add(canvas, BorderLayout.CENTER); this.pack(); this.setVisible(true); } } |
in fact, when upgrading ma system, my version of java was replaced by /usr/lib/jvm/java-gcj/jre/bin/java which have problems with AWT
|
|
|
|
|
13
|
Java Game APIs & Engines / JOGL Development / thread question : how to impose the Main-*** queue instead of the awt-eventqueue
|
on: 2006-05-15 15:02:42
|
|
Hi all
I want some actions to take place in a Main-***** thread and not in a AWT-EventQueue-*** thread
but those actions are targetted by a JMenuItem, and thus follow the AWT event pathway
What I do know is launch a Thread from the main() with a run() { while(true) { if(flag) { //do the actions flag = false; } yield(); } }
and the JMenuItem sets the flag to true, when i need the code to be executed
the problem is that the while(true) yield(); take 100% of the CPU (though it is not realy slowing the computer)
but if a start/stop the thread just when i need instead of starting it withing the main(), it ends up in the AWT-EventQueue, and that is bugging the display() thread of my renderer
thx for any clue
|
|
|
|
|
17
|
Java Game APIs & Engines / JOGL Development / jogl application crashing X, how to debug ?
|
on: 2006-05-05 11:18:47
|
|
Hello everybody
my application is, after a random amount of time, crashing X : i can move the mouse, but clicking has no effect, keyboard is not responding (CTRL-ALT-DEL, CTRL-ALT-F123456...) but i can still access the computer via ssh (killing java has no effect)
at this moment i was unable to reproduce this on another computer (with another ATI card, not the same model however)
I guess that a certain sequence of opengl command are bowsering X ... how can i determine the last 10-20 opengl commands before the crash ? is there a log somewhere ? can i create one with DebugGL ?
thx
(i'm under Debian 2.6.11-1-686, x.org)
|
|
|
|
|
21
|
Java Game APIs & Engines / JOGL Development / Re: Xlib: unexpected async reply
|
on: 2006-03-30 18:34:02
|
my application is crashing with the latest nightly builds too it is the first upgrade of jogl i did for two month or so and during 3-4month i haven't upgraded my system (you may be aware of a certain drivers problem with the latest versions of xorg) i can't figure out how to check my version of xlibs my system is a debian, with an ati (  ) 9600 please, tell my all the informations you need to know also do you know the last 'stable' version regarding this issue ?
|
|
|
|
|
22
|
Java Game APIs & Engines / JOGL Development / Re: Webstart vs. jre/lib/ext
|
on: 2006-03-02 14:41:06
|
|
i like deploying my apps in a .zip or .tgz file
the user extract it where he wants and click on the icon under windows or runs the shell script under linux
i think javaws is good, but as an nd user it doesn't allow much control over the application
|
|
|
|
|
24
|
Java Game APIs & Engines / JOGL Development / Use of progress bar, splash screen and other threaded stuff
|
on: 2006-02-24 14:16:38
|
|
Hi,
In my main window i have a menu bar, the canvas for jogl, and a progress bar when a compute something big i want my progress bar to move
but the bar only starts moving when the computation is over and stops directly
i also tried to use a splash screen instead, and it the same, the splash screen appears at the beginning of the computation, but its containt is only drawn once the compuation is over
I know this must be a threading problem, but i don't see how to work around. Is it related to the light/heavy weight "problem" ?
does anyone have a example of code ?
|
|
|
|
|
28
|
Java Game APIs & Engines / JOGL Development / quadric crashing, when fog enabled
|
on: 2006-02-23 15:17:40
|
Hi When i try to draw a sphere trough GLU everything works fine, but when fog is enabled it crashes with : Caused by: javax.media.opengl.GLException: glGetError() returned the following error codes after a call to glEnd(): GL_INVALID_ENUM at javax.media.opengl.DebugGL.checkGLGetError(DebugGL.java:9787) at javax.media.opengl.DebugGL.glEnd(DebugGL.java:1510) at com.sun.opengl.impl.GLUquadricImpl.drawSphere(GLUquadricImpl.java:888) at javax.media.opengl.glu.GLU.gluSphere(GLU.java:1172)
my fog 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
| public void applyFog() { if(fog) { gl.glDepthFunc(GL.GL_LESS); gl.glDepthRange(-1,1); if(!gl.glIsEnabled(GL.GL_DEPTH_TEST)) gl.glEnable(GL.GL_DEPTH_TEST); gl.glFogi(GL.GL_FOG_MODE, GL.GL_LINEAR); gl.glFogf(GL.GL_FOG_DENSITY, fogDensity); gl.glFogf(GL.GL_FOG_START, depth/2); gl.glFogf(GL.GL_FOG_END , depth); gl.glFogfv(GL.GL_FOG_COLOR, background.getRGBOpenGl(), 0); if(!gl.glIsEnabled(GL.GL_FOG)) gl.glEnable(GL.GL_FOG); if(gl.glIsEnabled(GL.GL_SMOOTH)) gl.glDisable(GL.GL_SMOOTH); } else { if(gl.glIsEnabled(GL.GL_FOG)) gl.glDisable(GL.GL_FOG); } } |
I add added test, not to enable.disable something twice, but it still crashes GLU's crashing 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 28 29 30 31 32 33
| if (!textureFlag) {
gl.glBegin(GL.GL_TRIANGLE_FAN);
gl.glNormal3f(0.0f, 0.0f, 1.0f);
gl.glVertex3f(0.0f, 0.0f, nsign * radius);
for (j = 0; j <= slices; j++) {
theta = (j == slices) ? 0.0f : j * dtheta;
x = -sin(theta) * sin(drho);
y = cos(theta) * sin(drho);
z = nsign * cos(drho);
if (normals) {
gl.glNormal3f(x * nsign, y * nsign, z * nsign);
}
gl.glVertex3f(x * radius, y * radius, z * radius);
}
gl.glEnd();
} |
is there an incompatibility between my fog code et glu's code ?
|
|
|
|
|
30
|
Java Game APIs & Engines / JOGL Development / Re: differences between linux & windows
|
on: 2006-02-10 18:05:21
|
ok, i have the same under linux & windows now but a wierd thing is, once the lights are set, i can't change them : i tried modifiying the lights parameters from a widget, the next method is called, but i see no effect on the scene 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| public void setLight(GL gl) { System.out.println("Ambient "+lightAmbient+ " specular "+lightSpecular+" diffuse "+lightDiffuse+" materialShininess "+materialShininess); gl.glDisable(GL.GL_LIGHTING); gl.glDisable(GL.GL_LIGHT0); gl.glDisable(GL.GL_COLOR_MATERIAL);
gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, new float[]{lightAmbient,lightAmbient,lightAmbient}, 0); gl.glLightfv(GL.GL_LIGHT0, GL.GL_SPECULAR, new float[]{lightSpecular,lightSpecular,lightSpecular}, 0); gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, new float[]{lightDiffuse,lightDiffuse,lightDiffuse}, 0); gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, lightPosition, 0); float specularReflection[] = {1, 1, 1, 1}; gl.glMaterialfv(GL.GL_FRONT, GL.GL_SPECULAR, specularReflection, 0); gl.glMateriali(GL.GL_FRONT, GL.GL_SHININESS, materialShininess);
gl.glEnable(GL.GL_COLOR_MATERIAL); gl.glEnable(GL.GL_LIGHTING); gl.glEnable(GL.GL_LIGHT0); gl.glEnable(GL.GL_NORMALIZE);
} |
is it only possible the set the light parameters once ? or within a given block ?
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|