[SOLVED] Problems with gluBuild2DMipmaps in JOGL 2

Hi people! I’m having problems porting applications that uses texture mapping with gluBuild2DMipmaps in JOGL 2. Anyone has the same problem or know how to solve?

Thx

What problems are you having?

I’m trying to migrating the codes from http://pepijn.fab4.be/software/nehe-java-ports/ to JOGL 2, all examples(for example Lesson 7) that using the gluBuild2DMipmaps to mapping textures aren’t working.

Any Help will appreciated…

See here.

Excuse me for the previous explanation of my problem. I will try to explain better ;). I tried to migrate the examples of Nehe OpenGL tutorial available on site http://pepijn.fab4.be/software/nehe-java-ports/ for the new version of JOGL2. The examples:

Lesson07
Lesson08
Lesson10
Lesson15
Lesson16
Lesson18
Lesson22
Lesson29

uses the function gluBuild2DMipmaps that causes the following exception:

Caused by: javax.media.opengl.GLException: not implemented
at javax.media.opengl.glu.GLU.gluBuild2DMipmaps(GLU.java:1485)
at demos.nehe.lesson22.Renderer.loadGLTextures(Renderer.java:188)
at demos.nehe.lesson22.Renderer.init(Renderer.java:141)
at demos.common.GLDisplay$MyHelpOverlayGLEventListener.init(GLDisplay.java:287)
at com.sun.opengl.impl.GLDrawableHelper.init(GLDrawableHelper.java:88)
at javax.media.opengl.awt.GLCanvas$InitAction.run(GLCanvas.java:601)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:149)
at javax.media.opengl.awt.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:635)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

In this address(http://sites.google.com/site/eddiebro3/Nehe-Source.rar), I’m providing the source code to OpenGL Nehe Tutorial Moved to JOGL2.

So, anyone know the causes of that exception?

Please help…

looks like it isn’t implemented yet :wink:

Inserting -Djogl.glu.nojava in the command line don’t work.

I think u are right it’s a bug.

Thx.

Yes, this is definitely a bug.

Hehe… Lesson 7,8,10,15,16,18,22,29 …

Why there is no nehe Leeson 35, 38, 41, 43, 46 in JOGL, but in C++?

Regards
JIA

Thank you for finding this bug …

Hopefully I have time to fix it this weekend.
However, feel free to send me a git repo / pull offer with a fix :slight_smile:
I guess the native GL2 GLU version is buggy here.

Cheers, Sven

I found the problem, to fix the Lessons 7,8,10,15,16,18,22 and 29 of nehe just change:

GLU glu = new GLU();

to

GLUgl2 glu = new GLUgl2();

The call to the method glu.gluBuild2DMipmaps in JOGL 2 will work fine now!

Well it appear not a bug but a change need object.

I fixed the source code and release here:

http://sites.google.com/site/eddiebro3/Nehe-Source.rar

Best Regards
Claudio Eduardo Goes

Is the java version faster than the c version (with binding) ?