Posted by
shadoworld56 on
Aug 30, 2014; 4:39am
URL: https://forum.jogamp.org/Trying-to-learn-how-to-use-jogl-Need-help-tp4032957p4032982.html
OneTriangle.javaOneTriangleSwingGLJPanel.javaThank you guys for replying to me. I have tried following the tutorials from wade however I was getting errors due to the class path being weird. I would get errors about OneTriangle not being included properly in the second file. trying to compile the demo program using swing. once I got those errors to go away for some reason the jogl-all.jar wouldn't import properly into one of the .java though it worked fine in the first (the base)
currently I have managed to get both the OneTriangle errors gone and the jogl-all.jar errors gone but now I have these errors
lib/OneTriangleSwingGLJPanel.java:22: error: cannot access WriteCloneable
GLJPanel gljpanel = new GLJPanel( glcapabilities );
^
class file for com.jogamp.common.type.WriteCloneable not found
lib/OneTriangleSwingGLJPanel.java:41: error: cannot find symbol
OneTriangle.render( glautodrawable.getGL().getGL2(), glautodrawable.getWidth(), glautodrawable.getHeight() );
^
symbol: method getWidth()
location: variable glautodrawable of type GLAutoDrawable
lib/OneTriangleSwingGLJPanel.java:41: error: cannot find symbol
OneTriangle.render( glautodrawable.getGL().getGL2(), glautodrawable.getWidth(), glautodrawable.getHeight() );
^
symbol: method getHeight()
location: variable glautodrawable of type GLAutoDrawable
3 errors
any suggestions?
here is my code. its placed in a dir with the jar folder with the required jars
OneTriangle.javaOneTriangleSwingGLJPanel.javajavac -classpath "lib/jargluegen-rt.jar:lib/jar/jogl-all.jar" lib/*.java
this is currently how i am getting them to compile. I am on a mac.
edit:
I have managed to get rid of 2 off the errors.
lib/OneTriangleSwingGLJPanel.java:41: error: cannot find symbol
OneTriangle.render( glautodrawable.getGL().getGL2(), glautodrawable.getWidth(), glautodrawable.getHeight() );
^
symbol: method getWidth()
location: variable glautodrawable of type GLAutoDrawable
lib/OneTriangleSwingGLJPanel.java:41: error: cannot find symbol
OneTriangle.render( glautodrawable.getGL().getGL2(), glautodrawable.getWidth(), glautodrawable.getHeight() );
^
symbol: method getHeight()
location: variable glautodrawable of type GLAutoDrawable
2 errors
still getting these errors though. why would glautodrawable.getWidth() give an error?