Bug 1037

Summary: FBObject/GLFBODrawable: Do not assume using a TextureAttachment for a Colorbuffer, also make DEPTH optional.
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: enhancement CC: askinner, sgothel
Priority: ---    
Version: 2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
e96882ae569c681e1b28da6701bf547f6dd9eda8 1d813dbb19ee20c7d0a3a4614c88e3733fd489dc
Workaround: ---
Bug Depends on:    
Bug Blocks: 1016    

Description Sven Gothel 2014-07-28 01:19:49 CEST
In certain cases a TextureAttachment for the FBO's color buffer
is not desired, either for performance reasons where texture functionality
is not required or to avoid texture restrictions like size, etc.
Comment 1 Sven Gothel 2014-07-28 15:20:35 CEST
GLFBODrawable shall use TextureAttachment for the FBO's color buffer
and a DEPTH buffer per default.

However, the user shall be allowed to use a plain ColorAttachment (renderbuffer)
and also no DEPTH buffer.
Comment 2 Sven Gothel 2014-07-28 15:32:51 CEST
commit e96882ae569c681e1b28da6701bf547f6dd9eda8:

- Colorbuffer interface exposes Attachment details
  like format, size, etc as well as it's implementation
  specifics, isTextureAttachment() and getTextureAttachment() 
  allowing a clean   cast and type query.

- Allow ColorAttachment to be used for non MSAA

- Make TextureAttachment optional for method 'use(GL, TextureAttachment)'

- Only validate size against MAX_TEXTURESIZE if using a TextureAttachment

- API Change:
- rename: getColorAttachmentCount() -> getColorbufferCount()
- add: getTextureAttachmentCount()
- change 'TextureAttachment getSamplingSink()' -> 'Colorbuffer getSamplingSink()'
Comment 3 Sven Gothel 2014-07-28 18:40:08 CEST
1d813dbb19ee20c7d0a3a4614c88e3733fd489dc:

FBObject: Add proper attachment size validation at init, reset and attachColorbuffer(..) / attachRenderbuffer(..)