We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › "PGraphicsOpenGL" was not found
Page Index Toggle Pages: 1
"PGraphicsOpenGL" was not found (Read 1656 times)
"PGraphicsOpenGL" was not found
May 12th, 2007, 5:02pm
 
Hi All,

I´ve been trying this simple code:

import javax.media.opengl.*;
import javax.media.opengl.glu.*;

GL gl;
GLU glu;

void setup()
{
 gl=((PGraphicsOpenGL)g).gl;
 glu=((PGraphicsOpenGL)g).glu;
}  

void draw()
{
}

and I´ve got this error:

C:/DOCUME~1/q/CONFIG~1/Temp/build62717.tmp/Temporary_8075_376.java:9:8:9:22: Semantic Error: Type "PGraphicsOpenGL" was not found.

C:/DOCUME~1/q/CONFIG~1/Temp/build62717.tmp/Temporary_8075_376.java:10:9:10:23: Semantic Error: Type "PGraphicsOpenGL" was not found.

I read the OpenGL part of the forum and only found one subject in this line, but not the same.

Thank you.
Re: "PGraphicsOpenGL" was not found
Reply #1 - May 12th, 2007, 6:10pm
 
You need to import processing.opengl.*; as well as the javax.media.opengl ones.
Re: "PGraphicsOpenGL" was not found
Reply #2 - May 13th, 2007, 10:56pm
 
John, Thank you for the answer. I added the new line and the code seems like:
---------------------------------------
import processing.opengl.*;
import javax.media.opengl.*;
import javax.media.opengl.glu.*;
GL gl;
GLU glu;
void setup()
{
 gl=((PGraphicsOpenGL)g).gl;
 glu=((PGraphicsOpenGL)g).glu;
}
void draw()
{}
--------------------------------------
Now I have this error:

java.lang.ClassCastException: processing.core.PGraphicsJava2D cannot be cast to processing.opengl.PGraphicsOpenGL  
Re: "PGraphicsOpenGL" was not found
Reply #3 - May 13th, 2007, 11:02pm
 
I tried this too:

---------------------------------
import processing.opengl.*;
import javax.media.opengl.*;
import javax.media.opengl.glu.*;

GL gl;
GLU glu;

void setup()
{
 size(200,200, OPENGL);
 gl=((PGraphicsOpenGL)g).gl;
 glu=((PGraphicsOpenGL)g).glu;
}
--------------------------------

but the error now is...

java.lang.UnsatisfiedLinkError: C:\Archivos de programa\Java\jre1.6.0\bin\jogl.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.ja
va:78)
Re: "PGraphicsOpenGL" was not found
Reply #4 - May 13th, 2007, 11:39pm
 
I´ve reinstalled jogl libraries and run!!
Page Index Toggle Pages: 1