Bug 530 : createGraphics for offline P3D whilst using JAVA2D
Last modified: 2008-06-11 07:25




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
Stephen Williams
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2007-03-05 10:09
If the applet doesn't use P3D the created P3D has problems. If the applet
uses P3D it still doesn't work 'til I use...
createGraphics(width, height, P3D, null, this);





PGraphics3D g3D;
void setup(){
size(100, 100, P3D); // try size(100, 100);
g3D = (PGraphics3D)createGraphics(100, 100, P3D); // lights dont work
//g3D = (PGraphics3D)createGraphics(width, height, P3D, null, this); //
lights work if the applet is using P3D

}
void draw(){
background(255);
g3D.beginDraw();
g3D.directionalLight(51, 102, 126, -1, 0, 0);
g3D.noStroke();
g3D.fill(255);

g3D.translate(20, 50, 0);
g3D.background(0);
g3D.sphere(30);
g3D.endDraw();
image(g3D, 0, 0, 100, 100);
}



OS=XP
REV=0124
Additional Comment #1 From fry 2007-03-07 17:14
this is part of all the other background() and createGraphics() mess...

temporary workaround is to add g3D.format = RGB inside setup and it'll work
fine.
Additional Comment #2 From fry 2008-06-11 07:25
housekeeping, this was fixed back in release 0127.