Bonjour,
J'ai developpé une application avec JOGL qui tourne bien sous windows. j'essaye de la faire tourner sur solaris avec un client X qui est Xming (tournant sur mon PC windows)
J'ai l'exception suivante:
Exception in thread "Thread-30" javax.media.opengl.GLException: Unable to select one of the provided GLCapabilities
at javax.media.opengl.DefaultGLCapabilitiesChooser.chooseCapabilities(DefaultGLCapabilitiesChooser.java:218)
at com.sun.opengl.impl.x11.X11GLDrawableFactory.chooseGraphicsConfiguration(X11GLDrawableFactory.java:190)
at javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)
at animation3D.com.ComGLCanvas.<init>(ComGLCanvas.java:42)
at animation3D.com.ComGLCanvas.<init>(ComGLCanvas.java:55)
at task.TaskJAnimation3D.getComGLLoadingCanvas(TaskJAnimation3D.java:336)
at task.TaskJAnimation3D.initializeDisplay(TaskJAnimation3D.java:147)
Voici les infos sur la machine
Architecture : sparc sun4u
O.S. : SunOS 5.8 Generic_117350-51
J'utilise la librairie solaris_sparc version 1.1.1 (last release build)
J'ai regardé dans le code de DefaultGLCapabilitiesChooser et voici le bout de code qui génère l'exception:
Voici mon code qui génère le canvas
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 // Ready to select. Choose score closest to 0. int scoreClosestToZero = NO_SCORE; int chosenIndex = -1; for (int i = 0; i < scores.length; i++) { int score = scores; if (score == NO_SCORE) { continue; } // Don't substitute a positive score for a smaller negative score if ((scoreClosestToZero == NO_SCORE) || (Math.abs(score) < Math.abs(scoreClosestToZero) && ((sign(scoreClosestToZero) < 0) || (sign(score) > 0)))) { scoreClosestToZero = score; chosenIndex = i; } } if (chosenIndex < 0) { throw new GLException("Unable to select one of the provided GLCapabilities"); }
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 GL gl = gLDrawable.getGL(); textures.loadTextures(); // enables clearing values for the color buffers gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); // select smooth shading gl.glShadeModel(GL.GL_SMOOTH); // enables clearing of the depth buffer gl.glClearDepth(1.0); // enables depth testing gl.glEnable(GL.GL_DEPTH_TEST); // the type of depth test to do gl.glDepthFunc(GL.GL_LEQUAL); // really nice perspective calculations gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST); // enables double buffering gl.glEnable(GL.GL_DOUBLEBUFFER); // enables antialiasing gl.glEnable(GL.GL_LINE_SMOOTH); // enables lighting gl.glEnable(GL.GL_LIGHTING); // enables color material gl.glEnable(GL.GL_COLOR_MATERIAL); // enables texturing gl.glEnable(GL.GL_TEXTURE_2D); // Start initialization with kernel ((DataJAnimation3DXML)dataXml).getAnimation3D(false); // switch load and display glcanvas comGLLoadingCanvas.getAnimator().stop(); comGLLoadingCanvas.setVisible(false); comGLDisplayCanvas.setVisible(true); pack(); // animation3D will run statusField.setText(ComResources.translateText(LanguageConstant.ANIMATION_STATUS) + " : " + ComResources.translateText(LanguageConstant.ANIMATION_RUNNING)); // animation3D is running, we can modify the light comJToolBarAnimation3D.getComJSliderLight().setEnabled(true); // now allowance to move the camera mouseController.attach(gLDrawable);
Merci pour votre aide
Partager