Reputation: 339
Whenever I try to use 3D graphics in Processing 2.0.1, like this:
void setup() {
size(640, 360, P3D);
fill(204);
}
void draw() {
lights();
background(0);
camera(30.0, mouseY, 220.0,
0.0, 0.0, 0.0,
0.0, 1.0, 0.0);
noStroke();
box(90);
stroke(255);
line(-100, 0, 0, 100, 0, 0);
line(0, -100, 0, 0, 100, 0);
line(0, 0, -100, 0, 0, 100);
}
...I get an OpenGL error. Here is the console output (I'm using Sublime Text 2 rather than the Processing IDE):
Listening for transport dt_socket at address: 8213
OpenGL error 1280 at bot beginDraw(): invalid enumerant
OpenGL error 1280 at bot endDraw(): invalid enumerant
OpenGL error 1282 at bot endDraw(): invalid operation
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0, 0xae31248, refCount 1, unCloseable false]
Finished.
[Finished in 28.6s]
However, I do seem to have OpenGL (and it must be working otherwise because WebGL functions OK.) :
laura@drukqs ~ $ lspci | grep VGA
00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Wrestler [Radeon HD 6290]
laura@drukqs ~ $ glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD PALM
OpenGL version string: 3.0 Mesa 9.1.3
OpenGL shading language version string: 1.30
OpenGL extensions:
I am using Linux Mint 15 on an Acer Aspire One 722, and I doubt my graphics driver is that great, but that can't be the problem, can it? Because like I said, WebGL does work.
EDIT: It also doesn't work in the Processing IDE, or on the Examples page on the Processing website.
Upvotes: 0
Views: 4530
Reputation: 339
OK, it looks like the simple solution was to use the proprietary graphics driver...of course my computer has other problems with P3D, but that's a post for another day.
Upvotes: 0