vade
YaBB Newbies
Offline
Posts: 38
Problems passing PImage as type in function
Jun 1st , 2005, 5:00am
Hi. Im having an odd issue. Im trying to pass a PImage variable to a function, but am getting this error under OS X: net.java.games.jogl.GLException: java.lang.reflect.InvocationTargetException Here is a code sample. Am I simply 'typing' incorrectly? PImage a,b,c,d; setup() { a = loadImage("http://127.0.0.1/sharecms/multimedia//admin/5.24.05/DSC00150/thumb/sm_DSC00150.JPG"); b = loadImage("http://127.0.0.1/sharecms/multimedia//admin/5.24.05/DSC00150/thumb/sm_DSC00149.JPG"); c = loadImage("http://127.0.0.1/sharecms/multimedia//admin/5.24.05/DSC00150/thumb/sm_DSC00148.JPG"); d = loadImage("http://127.0.0.1/sharecms/multimedia//admin/5.24.05/DSC00150/thumb/sm_DSC00147.JPG"); } draw() { pushMatrix(); drawNode("event1", -200, a); popMatrix(); pushMatrix(); drawNode("event2", -100, b); popMatrix(); pushMatrix(); drawNode("event3", -50, c); popMatrix(); pushMatrix(); drawNode("event4", 250, d); popMatrix(); } void drawNode(String text, int offset, PImage textureImage) // Here is my issue ? { beginShape(LINES); vertex(offset, 100, 0); vertex(offset, -100, 0); vertex(offset, 0, 100); vertex(offset, 0,-100); endShape(); noStroke(); beginShape(QUADS); texture(textureImage); vertex(offset, 5, 5, 0, 0); vertex(offset, 39, 5, 0, 43); vertex(offset, 39, 53, 43,58); vertex(offset, 5, 53, 43,0); endShape(); stroke(80, 80, 80,100); fill(80,80,80,200); rotateY(radians(90)); text(text, 0,0,offset); textFont(displayFont, 10); // reset font size.. }