Hi there, I've been trying to create a JOGL offscreenDrawable without PBuffers as some of our clients have older machines that don't work with PBuffers.
In a PBuffer situation I can create the offscreen drawable, draw into it and extract a BufferedImage to save to file as a .png without any problems:
I'm new to JOGL and have been trying to solve this for over a week now and I'm going round in circles.
This is what I have so far, split into 3 sections:
1. Create GLDrawable, GLContext and make GLContext current (Where I have problems)
2. Render to GLContext (Working ok)
3. Get a BufferedImage from the current context and save to a png file (works fine, no problems there)
The code below Fails because of the fact that method glBindBuffer is not available in the offscreen drawable I created (glBindBuffer is available in my main drawable that is visible in the application):
Anyway I want to move away from buffers, maybe use FBOs, which probably means the code needs to change a bit.
glBindBuffer:false
javax.media.opengl.GLException: Method "glBindBuffer" not available
at jogamp.opengl.gl4.GL4bcImpl.glBindBuffer(GL4bcImpl.java:311)
at com.jogamp.opengl.util.awt.TextRenderer$Pipelined_QuadRenderer.drawVertexArrays(TextRenderer.java:1810)
at com.jogamp.opengl.util.awt.TextRenderer$Pipelined_QuadRenderer.draw(TextRenderer.java:1791)
at com.jogamp.opengl.util.awt.TextRenderer$Pipelined_QuadRenderer.access$000(TextRenderer.java:1733)
at com.jogamp.opengl.util.awt.TextRenderer.flushGlyphPipeline(TextRenderer.java:813)
at com.jogamp.opengl.util.awt.TextRenderer.endRendering(TextRenderer.java:709)
at com.jogamp.opengl.util.awt.TextRenderer.endRendering(TextRenderer.java:545)
I hope I am missing something basic that someone can give me a hand with.
Than you,
Fabricio
Forgot to say, I'm using jogl from JogAmp.org version 2.0-b58-20120620