[fixed] Ubuntu 12.04 [x86] || Processing 2.0a5 P3D and OPENGL mode.
in
Integration and Hardware
•
1 year ago
Hello!
Don't work P3D and OPENGL mode in this version ubuntu. I can't understand why. Please help.
Tested this sketch:
Don't work P3D and OPENGL mode in this version ubuntu. I can't understand why. Please help.
Tested this sketch:
- import processing.opengl.*;
int _num = 10;
Circle [] _circleArr = {
};
void setup() {
size(800, 600,P3D);
//size(screen.width, screen.height);
background(255);
smooth();
strokeWeight(1);
frameRate(30);
fill(150, 50);
drawCircles();
}
void draw() {
//background(255);
fill(255, 80);
rect(0,0, width,height);
for (int i=0; i<_circleArr.length; i++) {
Circle thisCircle = _circleArr[i];
thisCircle.updateMe();
}
}
// Функция отрисовующая круги при клике
void mouseReleased() {
drawCircles();
println(_circleArr.length);
}
// Функция отрисовующая N кругов
void drawCircles() {
for (int i = 0; i < _num; i++) {
Circle thisCircle = new Circle();
//thisCircle.drawMe();
_circleArr = (Circle [])append(_circleArr, thisCircle);
}
}
//================================= objects
class Circle {
float x, y = 0;
float radius = 0;
color linecol, fillcol = 0;
float alph = 0;
float xmove, ymove = 0;
Circle() {
x = random(width);
y = random(height);
radius = random(100) + 10;
linecol = color(random(255), random(255), random(255));
fillcol = color(random(255), random(255), random(255));
alph = random(255);
xmove = random(10)-5;
ymove = random(10)-5;
}
void drawMe() {
noStroke();
fill(fillcol, alph);
ellipse(x, y, radius*2, radius*2);
stroke(linecol, 150);
noFill();
ellipse(x, y, 10, 10);
}
void updateMe() {
x += xmove;
y += ymove;
if (x > (width + radius)) {
x = 0 - radius;
}
if (x < (0 - radius)) {
x = width + radius;
}
if (y > (height + radius)) {
y = 0 - radius;
}
if (y < (0 - radius)) {
y = height + radius;
}
boolean touching = false;
for (int i = 0; i < _circleArr.length; i++) {
Circle otherCircle = _circleArr[i];
if (otherCircle != this) {
float dis = dist(x, y, otherCircle.x, otherCircle.y);
float overlap = dis - radius - otherCircle.radius;
if (overlap < 0) {
float midx, midy;
midx = (x + otherCircle.x)/2;
midy = (y + otherCircle.y)/2;
stroke(0, 100);
noFill();
overlap *= -1;
ellipse(midx, midy, overlap, overlap);
}
}
}
//drawMe();
}
}
- Info: XInitThreads() called for concurrent Thread support
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Creation of window surface failed: EGLGraphicsConfiguration[DefaultGraphicsScreen[EGLGraphicsDevice[type EGL, connection decon, unitID 0, handle 0xffffffff805bd3c0], idx 0], eglConfigID 0x6,
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]], JAWT-Window[windowHandle 0x420001a, surfaceHandle 0x420001a, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], shallUseOffscreenLayer false, isOffscreenLayerSurface false, pos 0/0, size 800x600, visible true, lockedExt false,
config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection :0.0, unitID 0, awtDevice X11GraphicsDevice[screen=0], handle 0x0], idx 0],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]],
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0xf1],
encapsulated EGLGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type X11, connection :0.0, unitID 0, handle 0xffffffff805b2328], idx 0], eglConfigID 0x6,
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]]],
awtComponent AWT-GLCanvas[Realized true,
jogamp.opengl.egl.EGLOnscreenDrawable,
Realized true,
Factory jogamp.opengl.egl.EGLDrawableFactory@1c7ec60,
handle 0x0,
Drawable size 800x600,
AWT pos 0/0, size 800x600,
visible true,
AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection :0.0, unitID 0, awtDevice X11GraphicsDevice[screen=0], handle 0x0], idx 0],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]],
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0xf1],
encapsulated EGLGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type X11, connection :0.0, unitID 0, handle 0xffffffff805b2328], idx 0], eglConfigID 0x6,
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]]]],
surfaceLock <6fa3f3, 174cdb9>[count 1, qsz 0, owner <AWT-EventQueue-0>]], error 0x3000
at jogamp.opengl.egl.EGLDrawable.recreateSurface(EGLDrawable.java:110)
at jogamp.opengl.egl.EGLDrawable.updateHandle(EGLDrawable.java:121)
at jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:165)
at javax.media.opengl.awt.GLCanvas.validateGLDrawable(GLCanvas.java:603)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:413)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:519)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:73)
at sun.awt.RepaintArea.paint(RepaintArea.java:240)
at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:591)
at java.awt.Component.dispatchEventImpl(Component.java:4937)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
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:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
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)
java.lang.NullPointerException
at processing.mode.java.runner.Runner.findException(Runner.java:618)
at processing.mode.java.runner.Runner.reportException(Runner.java:563)
at processing.mode.java.runner.Runner.exception(Runner.java:503)
at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
at processing.mode.java.runner.EventThread.run(EventThread.java:89)
Exception in thread "Animation Thread" javax.media.opengl.GLException: javax.media.opengl.GLException: drawable has invalid handle: jogamp.opengl.egl.EGLOnscreenDrawable[realized true,
factory jogamp.opengl.egl.EGLDrawableFactory@1c7ec60,
surface JAWT-Window[windowHandle 0x420001a, surfaceHandle 0x420001a, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], shallUseOffscreenLayer false, isOffscreenLayerSurface false, pos 0/0, size 800x600, visible true, lockedExt false,
config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection :0.0, unitID 0, awtDevice X11GraphicsDevice[screen=0], handle 0x0], idx 0],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]],
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0xf1],
encapsulated EGLGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type X11, connection :0.0, unitID 0, handle 0xffffffff805b2328], idx 0], eglConfigID 0x6,
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]]],
awtComponent AWT-GLCanvas[Realized true,
jogamp.opengl.egl.EGLOnscreenDrawable,
Realized true,
Factory jogamp.opengl.egl.EGLDrawableFactory@1c7ec60,
handle 0x0,
Drawable size 800x600,
AWT pos 0/0, size 800x600,
visible true,
AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection :0.0, unitID 0, awtDevice X11GraphicsDevice[screen=0], handle 0x0], idx 0],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]],
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0xf1],
encapsulated EGLGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type X11, connection :0.0, unitID 0, handle 0xffffffff805b2328], idx 0], eglConfigID 0x6,
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]]]],
surfaceLock <6fa3f3, 174cdb9>[count 1, qsz 0, owner <AWT-EventQueue-0>]],
eglSurface 0x0,
eglConfig EGLGraphicsConfiguration[DefaultGraphicsScreen[EGLGraphicsDevice[type EGL, connection decon, unitID 0, handle 0xffffffff805bd3c0], idx 0], eglConfigID 0x6,
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]],
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]]
at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:98)
at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:196)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:164)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:831)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:419)
at processing.opengl.PGL.requestDraw(Unknown Source)
at processing.opengl.PGraphicsOpenGL.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.media.opengl.GLException: drawable has invalid handle: jogamp.opengl.egl.EGLOnscreenDrawable[realized true,
factory jogamp.opengl.egl.EGLDrawableFactory@1c7ec60,
surface JAWT-Window[windowHandle 0x420001a, surfaceHandle 0x420001a, bounds [ 0 / 0 800 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], shallUseOffscreenLayer false, isOffscreenLayerSurface false, pos 0/0, size 800x600, visible true, lockedExt false,
config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection :0.0, unitID 0, awtDevice X11GraphicsDevice[screen=0], handle 0x0], idx 0],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]],
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0xf1],
encapsulated EGLGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type X11, connection :0.0, unitID 0, handle 0xffffffff805b2328], idx 0], eglConfigID 0x6,
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]]],
awtComponent AWT-GLCanvas[Realized true,
jogamp.opengl.egl.EGLOnscreenDrawable,
Realized true,
Factory jogamp.opengl.egl.EGLDrawableFactory@1c7ec60,
handle 0x0,
Drawable size 800x600,
AWT pos 0/0, size 800x600,
visible true,
AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection :0.0, unitID 0, awtDevice X11GraphicsDevice[screen=0], handle 0x0], idx 0],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]],
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0xf1],
encapsulated EGLGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type X11, connection :0.0, unitID 0, handle 0xffffffff805b2328], idx 0], eglConfigID 0x6,
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]]]],
surfaceLock <6fa3f3, 174cdb9>[count 1, qsz 0, owner <AWT-EventQueue-0>]],
eglSurface 0x0,
eglConfig EGLGraphicsConfiguration[DefaultGraphicsScreen[EGLGraphicsDevice[type EGL, connection decon, unitID 0, handle 0xffffffff805bd3c0], idx 0], eglConfigID 0x6,
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]],
requested GLCaps[on-scr, rgba 0x8/8/8/1, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw]],
chosen GLCaps[egl cfg 0x6, vid 0xf1: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], [GL, GLES1, GLES2, VG]]]
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:432)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:415)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:951)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:701)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:671)
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)
1