|
I've found I can call
FBObject.init( final GL gl, final int newWidth, final int newHeight, final int newSamples )
and pass in the number of samples I want, but then I receive an error when trying to call
FBObject.attachTexture2D( final GL gl, final int attachmentPoint, final boolean alpha )
with the following exception:
Caused by: com.jogamp.opengl.GLException: Texture2D not supported w/ MSAA. If you have enabled MSAA with exisiting texture attachments, you may want to detach them via detachAllTexturebuffer(gl).
at com.jogamp.opengl.FBObject.attachColorbufferImpl(FBObject.java:1524)
at com.jogamp.opengl.FBObject.attachColorbuffer(FBObject.java:1507)
at com.jogamp.opengl.FBObject.attachTexture2D(FBObject.java:1347)
I guess Texture2D doesn't support multisamples? What should I do instead to create a texture backed FBO with the JOGL API? I also need to attach a multi-sampled packed depth-stencil render buffer.
As I mentioned in my first post I've been able to implement this 'manually' using the base JOGL bindings so I understand the concept, I'm after some JOGL API help more than anything.
Cheers.
|