Re: TextRenderer and VAOs

Posted by Rami Santina on
URL: https://forum.jogamp.org/TextRenderer-and-VAOs-tp4029530p4029536.html

hi, you need to use the program before calling bind or it will consider it as invalid operation. Not sure why ur clearing the binding.

something like this works perfectly for me; using curve render in an app for annotations etc

 if(!regionRenderer.isInitialized()) {
         regionRenderer.init(gl);
         regionRenderer.setAlpha(gl, 0.6f);
         regionRenderer.setColorStatic(gl, 1, 0, 0);
 }


renderState.getShaderState().useProgram(gl, true);
regionRenderer.resetModelview(null);
renderState.pmvMatrix().glMultMatrixf(pmvMatrix.val, 0);
 regionRenderer.setColorStatic(gl, color.getRed(), color.getGreen(), color.getBlue());
regionRenderer.setAlpha(gl, 0.6f);
regionRenderer.updateMatrix(gl);
regionRenderer.draw(gl, region, initPosition, texDim);
 renderState.getShaderState().useProgram(gl, false);

Inline image 1


On Sun, Jul 7, 2013 at 11:56 PM, JanBenes [via jogamp] <[hidden email]> wrote:
Hi Julien,

I have tried both RC12 and the latest, i.e.

gluegen: 3ceb32fb505363ccc02fc4cce1362257ca98a3e5
jogl: 433e3914324b90c910b018bb7d9d80e814c67123

and under both of those, the MWE that I've posted throws an exception.


If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/TextRenderer-and-VAOs-tp4029530p4029534.html
To start a new topic under jogl, email [hidden email]
To unsubscribe from jogamp, click here.
NAML