This post was updated on .
Hi. I write example with Sumanta Guha book (http://sumantaguha.com/downloads) https://www.dropbox.com/s/o1t5e8hynuvnk3m/bicubicSplineSurface.cpp from C++ on Java with JOGL version 2 from http://jogamp.org/deployment/jogamp-current/
and when i compiled programm, then crashen on glu.gluNurbsSurface(nurbsObject, 19, uknots, 14, vknots, 30, 3, controlPoints[0][0], 4, 4, GL.GL_MAP2_VERTEX_3); full code here - http://paste.org/57253 with next errors: Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 8 at com.sun.opengl.impl.nurbs.CArrayOfFloats.getRelative(CArrayOfFloats.java:110) at com.sun.opengl.impl.nurbs.Knotspec.pt_io_copy(Knotspec.java:361) at com.sun.opengl.impl.nurbs.Knotspec.copy(Knotspec.java:340) at com.sun.opengl.impl.nurbs.Knotspec.copy(Knotspec.java:332) at com.sun.opengl.impl.nurbs.Splinespec.copy(Splinespec.java:182) at com.sun.opengl.impl.nurbs.Quilt.toBezier(Quilt.java:101) at com.sun.opengl.impl.nurbs.GLUnurbsImpl.nurbssurface(GLUnurbsImpl.java:856) at javax.media.opengl.glu.GLU.gluNurbsSurface(GLU.java:1714) at org.yourorghere.Test.display(Test.java:142) at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78) at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435) at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194) at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:412) at javax.media.opengl.GLCanvas.display(GLCanvas.java:244) at javax.media.opengl.GLCanvas.paint(GLCanvas.java:277) at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264) at sun.awt.RepaintArea.paint(RepaintArea.java:240) at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347) at java.awt.Component.dispatchEventImpl(Component.java:4937) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:682) at java.awt.EventQueue$3.run(EventQueue.java:680) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:696) at java.awt.EventQueue$4.run(EventQueue.java:694) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:693) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) Exception in thread "Thread-2" javax.media.opengl.GLException: java.lang.ArrayIndexOutOfBoundsException: 8 at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271) at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410) at javax.media.opengl.GLCanvas.display(GLCanvas.java:244) at com.sun.opengl.util.Animator.display(Animator.java:144) at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.ArrayIndexOutOfBoundsException: 8 at com.sun.opengl.impl.nurbs.CArrayOfFloats.getRelative(CArrayOfFloats.java:110) at com.sun.opengl.impl.nurbs.Knotspec.pt_io_copy(Knotspec.java:361) at com.sun.opengl.impl.nurbs.Knotspec.copy(Knotspec.java:340) at com.sun.opengl.impl.nurbs.Knotspec.copy(Knotspec.java:332) at com.sun.opengl.impl.nurbs.Splinespec.copy(Splinespec.java:182) at com.sun.opengl.impl.nurbs.Quilt.toBezier(Quilt.java:101) at com.sun.opengl.impl.nurbs.GLUnurbsImpl.nurbssurface(GLUnurbsImpl.java:856) at javax.media.opengl.glu.GLU.gluNurbsSurface(GLU.java:1714) at org.yourorghere.Test.display(Test.java:142) at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78) at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435) at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194) at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:452) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:682) at java.awt.EventQueue$3.run(EventQueue.java:680) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:691) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 8 at com.sun.opengl.impl.nurbs.CArrayOfFloats.getRelative(CArrayOfFloats.java:110) at com.sun.opengl.impl.nurbs.Knotspec.pt_io_copy(Knotspec.java:361) at com.sun.opengl.impl.nurbs.Knotspec.copy(Knotspec.java:340) at com.sun.opengl.impl.nurbs.Knotspec.copy(Knotspec.java:332) at com.sun.opengl.impl.nurbs.Splinespec.copy(Splinespec.java:182) at com.sun.opengl.impl.nurbs.Quilt.toBezier(Quilt.java:101) at com.sun.opengl.impl.nurbs.GLUnurbsImpl.nurbssurface(GLUnurbsImpl.java:856) at javax.media.opengl.glu.GLU.gluNurbsSurface(GLU.java:1714) at org.yourorghere.Test.display(Test.java:142) at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78) at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435) at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194) at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:412) at javax.media.opengl.GLCanvas.display(GLCanvas.java:244) at javax.media.opengl.GLCanvas.paint(GLCanvas.java:277) at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264) at sun.awt.RepaintArea.paint(RepaintArea.java:240) at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347) at java.awt.Component.dispatchEventImpl(Component.java:4937) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:682) at java.awt.EventQueue$3.run(EventQueue.java:680) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:696) at java.awt.EventQueue$4.run(EventQueue.java:694) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:693) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) I'm use JDK 1.7, Netbeans 7.2 and ATI Radeon HD 4570 and other computer - Win7, JDK 1.7, NVIDIA GeForce 9800 Please help
National Research Irkutsk State Technical University (Russia, Irkutsk, Baikal)
|
Administrator
|
Hi
You still use JOGL 1. Please provide the full code with JOGL 2.0 so that we can help you. JOGL 1 is no more maintained. Edit.: The size of controlPoints is wrong, why not using the same size than the one in the C++ code?
Julien Gouesse | Personal blog | Website
|
I'm installed jogamp-all-platforms.7z from http://jogamp.org/deployment/v2.0-rc11/archive/ and from http://jogamp.org/deployment/jogamp-current/ together and separately and still not working.
And I cann't compile example from http://jogamp.org/jogl-demos/src/demos/nurbs/ :(
National Research Irkutsk State Technical University (Russia, Irkutsk, Baikal)
|
Administrator
|
On 11/17/2012 04:33 PM, fyodor [via jogamp] wrote:
> I'm installed jogamp-all-platforms.7z from > http://jogamp.org/deployment/v2.0-rc11/archive/ and from > http://jogamp.org/deployment/jogamp-current/ together and separately and still > not working. Currently RC11 is current. > And I cann't compile example from > http://jogamp.org/jogl-demos/src/demos/nurbs/ :( You need to pick the _same_ jogl-demos version, i.e.: <http://jogamp.org/deployment/v2.0-rc11/archive/Sources/jogl-demos-v2.0-rc11.tar.7z> or <http://jogamp.org/git/?p=jogl-demos.git;a=summary> while checking out the tag 'v2.0-rc11'. Note that we are on a rolling release scheme meaning that the source repository's HEAD may not be compatible w/ a previous release. Hence we tag them _and_ provide source tar balls etc. Having the source and jogamp binary release, you may have a look at our Wiki page regarding IDE usage etc. ~Sven > National Research Irkutsk State Technical University (Russia, Irkutsk, Baikal) > signature.asc (909 bytes) Download Attachment |
I'm not search
com.jogamp.opengl.util.glut.gl2.GLUTgl2;, com.jogamp.opengl.util.GLUT;. Please tell me where to get them and need subtitute simple.xml on org.simpleframework.xml
National Research Irkutsk State Technical University (Russia, Irkutsk, Baikal)
|
Administrator
|
Just look at the Java documentation here and the Simple framework is here.
Julien Gouesse | Personal blog | Website
|
SimpleXML SimpleXML set long.Now one of the problems is that I can not find com.jogamp.opengl.util.glut.gl2.GLUTgl2 to link libraries. Library not included GLUT in com.jogamp.opengl.util all the libraries that I downloaded. Please give a link to the library, which is still contains
National Research Irkutsk State Technical University (Russia, Irkutsk, Baikal)
|
Administrator
|
Replace all references to GLUTgl2 by GLUT and let us know if there is something missing. GLUT is in the RC11, I have just checked it, this class is in the package com.jogamp.opengl.util.gl2.
Julien Gouesse | Personal blog | Website
|
In string " gl.glMatrixMode(GL2ES1.GL_MODELVIEW);" Netbeans swears on GL2ES1 in nurbs.curveapp.GLListener.java. As well as other in strings and files, where there is GL2ES1.
Next problem with "this.gl = drawable.getGL().getGL2();" - Netbeans stresses getGL2(). Please, help
National Research Irkutsk State Technical University (Russia, Irkutsk, Baikal)
|
Administrator
|
On 11/21/2012 10:26 AM, fyodor [via jogamp] wrote:
> In string " gl.glMatrixMode(*GL2ES1*.GL_MODELVIEW);" Netbeans swears on > *GL2ES1* in /nurbs.curveapp.GLListener.java/. As well as other in strings and > files, where there is *GL2ES1*. > > Next problem with "this.gl = drawable.getGL().getGL2();" - Netbeans stresses > *getGL2()*. > > Please, help It surely looks like you haven't added the GlueGen and JOGL JARs to your Netbeans project properly (-> see wiki/IDE/Netbeans). Please allow us to check your project setup, to do so: - create a very small NB project - put it somewhere (git ?) for us to validate - again, add all information necessary (Java/NB version, JOGL version, ..) You may do this creating a new bugreport. ~Sven > National Research Irkutsk State Technical University (Russia, Irkutsk, Baikal) signature.asc (909 bytes) Download Attachment |
Administrator
|
In reply to this post by fyodor
Sven is probably right. Please just follow these steps and ensure you have no JARs from JOGL 1 in your classpath to avoid conflicts.
Julien Gouesse | Personal blog | Website
|
In reply to this post by Sven Gothel
Product Version: NetBeans IDE 7.2 (Build 201207171143)
Java: 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01 System: Windows XP version 5.1 x86; Cp1251; ru_RU (nb) I'm installed in netbeans http://plugins.netbeans.org/plugin/3260/netbeans-opengl-pack and manual including JogAMP-rc11 and SimpleXML I'm add library in C:\Documents and Settings\Admin\Application Data\NetBeans\7.2 folder... Image with project opened in Netbeans - https://www.dropbox.com/s/6s3xgn4hfpajvfd/screenForJOGLforum.JPG https://www.dropbox.com/s/lljg2t7yfcuuar3/NURBS-test.zip - project created in Netbeans with example
National Research Irkutsk State Technical University (Russia, Irkutsk, Baikal)
|
Administrator
|
Netbeans OpenGL pack has no more been maintained for several years, remove it to avoid conflicts with the install of JOGL 2.0 RC11.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by fyodor
In the project tab, select the "Libraries" node -> "Add JAR/Folder" and select all JARs required for JOGL (especially jogl-all.jar and gluegen-rt.jar).
Julien Gouesse | Personal blog | Website
|
Big Thank you. I still got it to work. I modified code: Import javax.media.opengl.GL2;
javax.media.opengl.GL2ES1; javax.media.opengl.glu.gl2.GLUgl2; Replace simple on org.simpleframework; include in demos.nurbs.icons file StreamUtil but icons not loaded in GUI. Example worked on RC11. You can download modified code here - https://dl.dropbox.com/u/63702798/demosNURBS%20worked%20joglRC11.zip
National Research Irkutsk State Technical University (Russia, Irkutsk, Baikal)
|
Administrator
|
You're welcome. I'm happy to know it works for you.
Storing GL instance is generally a bad idea, rather call drawable.getGL().getGL2() to get it at the beginning of your display() method. A GL instance may become invalid at runtime, that's why fetching it at each display is better.
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |