Exception in thread "main" java.lang.IllegalArgumentException: GLDrawableFactory.chooseGraphicsConfiguration() was not used when creating this Component at com.sun.opengl.impl.x11.X11GLDrawableFactory.getGLDrawable(X11GLDrawableFactory.java:233) at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:117) at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:82) at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:75) at Line.<init>(Line.java:24) at Line.main(Line.java:107)

// create the canvas we will be drawing onfinalGLCanvascanvas = newGLCanvas();

// as this class implements the GLEventListener interface// it is what tells the canvas what to do.canvas.addGLEventListener( this ); // VERY IMPORTANT LINE

// set the size of the canvascanvas.setSize(500, 300);

// add the canvas to the windowthis.getContentPane().add(canvas); }/** * This is the initialisation method. It is used to set up several of the * state variables that are constant for the programs duration */publicvoidinit(finalGLAutoDrawabledrawable) {// the GL object is used to set the state variablesfinalGLgl = drawable.getGL();

// the GLU object can do alot of complex things// but there it is used to simply set up the coordinates// for the drawing area.finalGLUglu = newGLU();

// this sets the background colour to black// the first three numbers are the specification// of black in RGB, and the last is an alpha component.gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

// sets the size of the viewable drawing area on the screengl.glViewport(-500, -300, 500, 300);

// set the coordinate system. Its is set so that (0,0) is the centre of the canvas.// (-500, -300) is the bottom left corner.glu.gluOrtho2D(-500, 500.0, -300, 300.0); }/** * This method draws the red line that was mentioned in the tutorial * @param drawable */publicvoiddisplay(finalGLAutoDrawabledrawable) {// again we need the object representing the state of oplenGLfinalGLgl = drawable.getGL();

// we earlier set the background colour, now we paint that// colour onto our canvas.gl.glClear(GL.GL_COLOR_BUFFER_BIT);

// these are used to represent the RGB values for a colour// it isnt really necessary to use them in a program as simple as// this, but it is good practice.finalfloatred = 1.0f;finalfloatgreen = 0.0f;finalfloatblue = 0.0f;

1) Create a new project (or use an existing2) Add two new paths: lib and native3) Download latest JOGL and extract it4) Copy the *.jar files to lib, *.so|dll to native5) Back in Eclipse hit the F5 key and expand the lib folder6) Add both JARs to the build path (right-click them)

And now comes the important two steps:

7) Right-click your OpenGL project, choose Libraries and expand the JRE System Library part Click on Native library location, click Edit and chhose the native folder where you have copied the so/dlls to

ok , i finally got a testcase for the bug i mentioned above. it took me basicall all of my weekend, cause it is really a weird bug. it seems to be connected to a certain character, namely the dash (ASCII 150). but not the character alone causes the problem, only when it is surrounded by other text and then all successive calls to the textrenderer produce scrambled text.

Thanks, filed as Issue 326. Note that your dash character is not an ASCII dash but some extended Unicode character, which is probably what is causing the problem (fallback to the full Unicode code path).

thanks Ken. So does the current Textrenderer officially support full Unicode? I would highly encourage this, since the game i am working on, is mainly a chat which relies on a lot of strange characters from different languages.

Tomas Hrasky, a student at the University of Hradec Králové in the Czech Republic, has ported the core of the GLU NURBS code from C++ to Java. This provides rendering of curved lines and surfaces via the traditional GLU APIs. There are example applications under demos.nurbs in the jogl-demos source tree (not yet available via Java Web Start). This is a substantial contribution and has been done very elegantly. I'd like to publicly thank Tomas for doing this work and contributing it to the JOGL project. There is still unimplemented functionality, such as trimmed surfaces and NURBS callbacks; please see the README.txt in src/classes/com/sun/opengl/impl/nurbs/ in the JOGL source tree and consider contributing code to move it toward completion.

I thank Tomas Hrasky too. This is a huge contribution! NURBS was a big hole in JOGL. It is very useful. If I have some time, I will test JOGL 1.1.1. In the past, we needed to use JGeom and I tried to rewrite the GLU NURBS by reusing some code coming from GL4Java but I failed.

I don't find gluQuadricCallback in JOGL 1.1.0. Is there something wrong?

This isn't currently supported. If you would consider contributing code to support it that would be welcome. However it looks like this is of limited utility as the only valid callback is an error callback, and JOGL's DebugGL should provide more in-depth error checking.

This isn't currently supported. If you would consider contributing code to support it that would be welcome. However it looks like this is of limited utility as the only valid callback is an error callback, and JOGL's DebugGL should provide more in-depth error checking.

You're right, I see what you mean, it seems more logical to rely on DebugGL.

If you agree with me, I can suggest you some corrections. On the other hand, it might be interesting to provide an implementation allowing to return all the coordinates in a buffer (rather than only using the immediate mode) in order to allow programmers to reuse them inside a VBO for example. I'm writing some methods to perform this now for my game.

This build contains bug fixes for the TextRenderer, some contributed by John Burkey. It adds control to the TextRenderer for whether to use vertex arrays or immediate mode, contributed by emzic. It adds control over whether GL_LINEAR filtering is enabled for the TextRenderer's backing store, as some machines handle this poorly, resulting in fuzzy text. It also contains a small but deep bug fix in the native code which interacts with the JAWT which was preventing JOGL applets from being unloaded cleanly, and was also the root cause of bizarre ClassCastExceptions when running more than one JOGL applet on Mac OS X.

JSR-231 1.1.1 release candidate 8 has been released. This release fixes a couple more bugs in the TextRenderer; thanks to spiraljetty for the concise test cases illustrating these problems. Some additional controls to the TextRenderer motivated by emzic and other users were also added.

As part of this bug fix the TextRenderer's code changed substantially. It is expected that this will have no user visible impact and that the only changes will be improvements in both correctness and performance when rendering mixed Unicode and Western European text. Still, please test this release and report any problems or regressions you find.

It is hoped that this will be the last release candidate and that the final release of 1.1.1 will be done shortly, within about a month's time. The JSR-231 maintenance release request will be sent to the JCP Program Management Office next week.

BTW I can't get the xtrans demo to work at all. Any hints what type of debugging I need to turn on ? Basically the window just popus up and freezes and nothing shows, how do I know if it's a driver problem?

[E] WGLSD_MakeCurrentToScratch: could not make current[E] OGLSD_InitTextureObject: actual (w=45078528 h=45078528) != requested[E] OGLSurfaceData_initFBObject: could not init texture object[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] OGLSD_InitTextureObject: actual (w=45078528 h=45078528) != requested[E] OGLSurfaceData_initFBObject: could not init texture object[E] WGLSD_MakeCurrentToScratch: could not make current[E] OGLSD_InitTextureObject: actual (w=45078528 h=45078528) != requested[E] OGLSurfaceData_initFBObject: could not init texture object[E] OGLSD_MakeOGLContextCurrent: could not make current[E] OGLContext_SetSurfaces: could not make context current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] OGLSD_MakeOGLContextCurrent: could not make current[E] OGLContext_SetSurfaces: could not make context current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] WGLSD_MakeCurrentToScratch: could not make current[E] OGLSD_MakeOGLContextCurrent: could not make current[E] OGLContext_SetSurfaces: could not make context current

BTW I can't get the xtrans demo to work at all. Any hints what type of debugging I need to turn on ?

This demo requires the Java 2D OpenGL pipeline to be working properly, and this basically requires the absolute latest OpenGL drivers. I just upgraded to the 169.21 NVidia ForceWare drivers and they run the demo very well. You should check your vendor's web site for a driver upgrade.

I have tried to use the nightly build and I have got this exception when I launch TUER :

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.nio.DirectByteBuffer cannot be cast to com.sun.opengl.impl.x11.JAWT_X11DrawingSurfaceInfo at com.sun.opengl.impl.x11.X11OnscreenGLDrawable.lockSurface(X11OnscreenGLDrawable.java:152) at com.sun.opengl.impl.x11.X11OnscreenGLContext.makeCurrentImpl(X11OnscreenGLContext.java:61) at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134) at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182) at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:265) 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:248) at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56) at sun.awt.RepaintArea.paint(RepaintArea.java:224) at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:683) at java.awt.Component.dispatchEventImpl(Component.java:4489) at java.awt.Component.dispatchEvent(Component.java:4243) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

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