Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  [SOLVED] Problems with gluBuild2DMipmaps in JOGL 2  (Read 2582 times)
0 Members and 2 Guests are viewing this topic.
Offline eddiebro3

JGO n00b
*

Posts: 12



« on: 2009-07-13 17:01:02 »

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
Offline lhkbob

JGO Neuromancer
****

Posts: 1174
Medals: 35



« Reply #1 on: 2009-07-13 17:10:49 »

What problems are you having?

Offline eddiebro3

JGO n00b
*

Posts: 12



« Reply #2 on: 2009-07-13 17:20:24 »

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...
Games published by our own members! Go get 'em!
Offline Orangy Tang

JGO Kernel
*****

Posts: 2960
Medals: 37


Monkey for a head


« Reply #3 on: 2009-07-14 04:46:17 »

See here.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline eddiebro3

JGO n00b
*

Posts: 12



« Reply #4 on: 2009-07-14 13:04:27 »

Excuse me for the previous explanation of my problem. I will try to explain better Wink. 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...
Offline bienator

JGO Ninja
***

Posts: 632
Medals: 1


OutOfCoffeeException


« Reply #5 on: 2009-07-14 13:40:24 »

looks like it isn't implemented yet Wink

Offline bobjob

JGO Ninja
***

Posts: 646
Medals: 14


David Aaron Muhar


« Reply #6 on: 2009-07-14 21:59:05 »

Quote
GLU
Jogl contains support for the GLU (OpenGL Utility Library) version 1.3. Jogl originally supported GLU by wrapping the C version of the APIs, but over time, and thanks to the contributions of several individuals, it now uses a pure-Java version of SGI's GLU library. The pure Java port is enabled by default, and addresses stability issues on certain Linux distributions as well as the lack of native GLU 1.3 support on the Windows platform. In case of problems with the Java port, the C version of the GLU library may be used by specifying the system property -Djogl.glu.nojava on the command line. All of the same functionality is exposed with both the Java and C versions of the GLU library; currently NURBS support is the only missing feature on both sides. If you run into problems with the Java port of the GLU library please file a bug using the Issue Tracker on the Jogl home page.

To use the GLU, simply instantiate a GLU object via new GLU() at the beginning of your program. The methods on the GLU object may be called at any point when an OpenGL context is current. Because the GLU implementation is not thread-safe, one GLU object should be created for each GLEventListener or other entity performing OpenGL rendering in a given thread.

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline eddiebro3

JGO n00b
*

Posts: 12



« Reply #7 on: 2009-07-17 11:26:20 »

Inserting -Djogl.glu.nojava in the command line don't work.
Offline eddiebro3

JGO n00b
*

Posts: 12



« Reply #8 on: 2009-07-17 11:27:59 »

looks like it isn't implemented yet Wink

I think u are right it's a bug.

Thx.
Offline jiapei100

Full Member
**

Posts: 113



« Reply #9 on: 2009-08-11 11:27:47 »



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

Welcome to Vision Open
http://www.visionopen.com
Games published by our own members! Go get 'em!
Offline sgoethel

Jr. Member
**

Posts: 97
Medals: 1


keep the source alive


« Reply #10 on: 2009-08-12 09:59:58 »

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 Smiley
I guess the native GL2 GLU version is buggy here.

Cheers, Sven

JogAmp [ GlueGen, JOAL, JOGL, JOCL, ..]
http://www.jogamp.org
Offline cegoes

JGO n00b
*

Posts: 17



« Reply #11 on: 2009-09-09 09:52:40 »

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
Offline rsantina

Full Member
**

Posts: 101



« Reply #12 on: 2009-09-23 02:26:09 »

Is the java version faster than the c version (with binding) ?
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.132 seconds with 20 queries.