FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 948 : Post draw in Libraries with 148
Last modified: 2008-10-13 07:23
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
INVALID -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
gll
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2008-10-13 06:24
REV: 148
SYSTEM: WINXP sp2
JAVA: 1.5 JDK
GRAPHIC: GeForce 6800
SYSTEM: INSPIRON 9300 DELL
-----------------------------------------
I have recently tried to upgrade to p5 v148.
I'm currently working on a library using OpenGL. Everything was working fine with p5
v135. It seems to be when post() inside a library is calling something to draw in the
PApplet.
Otherwise, here's a link to someone who had a same error code, but doesn't seems
to be the same error.
http://processing.org/discourse/yabb_beta/YaBB.cgi
?
board=os_libraries_tools;action=display;num=1219185785
-----------------------------------------
...
OpenGL error 1282 at render_lines in: invalid operation
OpenGL error 1282 at render_lines out: invalid operation
OpenGL error 1282 at render_triangles in: invalid operation
OpenGL error 1282 at render_triangles out: invalid operation
OpenGL error 1282 at render_lines in: invalid operation
OpenGL error 1282 at render_lines out: invalid operation
OpenGL error 1282 at render_triangles in: invalid operation
OpenGL error 1282 at render_triangles out: invalid operation
...
[code]public class MyLib {
final public PApplet p5;
public MyLib(PApplet p5){
this.p5 = p5;
p5.registerPre(this);
p5.registerPost(this);
}
public void pre(){
p5.emissive(1);
p5.shininess(1);
p5.directionalLight(75,75,35, -1, -1, -1);
}
public void post(){
p5.stroke(255,0,0);
p5.line(0,0,p5.width,p5.height);
}
}
[/code]
Additional Comment
#1 From fry 2008-10-13 06:26
from libraries/howto.txt:
public void post()
method called after draw has completed and the frame is done.
no drawing allowed.
Additional Comment
#2 From gll 2008-10-13 07:23
Thx!
I was using post() instead of draw() because I unsure if draw was called after
PApplet.draw(). It was working for a while.
Thank you, Thank you, everything is working now.