Error due to text

I am writing a program, to put some text on graphic window. But I am getting below error on it. if I disable text option, it start working well. Can you plz guide me on how do I resolve it.

CODING:-

PImage img;
int pitch=-5; 

void setup() {
  size(448,299, P3D); 
  img=loadImage("imagei.jpg");
  }

void draw() {
  background(img);
  text("ROC   "   + (pitch+5),045,25); 
  }

ERROR:-

Framebuffer error (framebuffer unsupported), rendering will probably not work as expected Read http://wiki.processing.org/w/OpenGL_Issues for help.
OpenGL error 1280 at bot beginDraw(): invalid enumerant
OpenGL error 1286 at bot beginDraw(): invalid framebuffer operation
OpenGL error 1286 at top endDraw(): invalid framebuffer operation
java.lang.RuntimeException: java.lang.RuntimeException: Cannot validate shader program:
Unknow error
    at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
    at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
    at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)
    at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
    at javax.media.opengl.Threading.invoke(Threading.java:191)
    at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)
    at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)
    at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)
    at processing.core.PApplet.run(PApplet.java:2254)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Cannot validate shader program:
Unknow error
    at processing.core.PGraphics.showException(PGraphics.java:7852)
    at processing.opengl.PShader.init(PShader.java:936)
    at processing.opengl.PShader.getAttributeLoc(PShader.java:605)
    at processing.opengl.PShader.loadAttributes(PShader.java:1123)
    at processing.opengl.PGraphicsOpenGL.getPolyShader(PGraphicsOpenGL.java:6786)
    at processing.opengl.PGraphicsOpenGL.flushPolys(PGraphicsOpenGL.java:2468)
    at processing.opengl.PGraphicsOpenGL.flush(PGraphicsOpenGL.java:2415)
    at processing.opengl.PGraphicsOpenGL.endDraw(PGraphicsOpenGL.java:1712)
    at processing.core.PApplet.handleDraw(PApplet.java:2404)
    at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)
    at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)
    at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Tagged:

Answers

Sign In or Register to comment.