Bug 720

Summary: Unify all platform specific GLContextImpl specializations - Allowing to swap on- and offscreen GLDrawables w/ unique GLContext instance
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: critical CC: sgothel
Priority: ---    
Version: 2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
fd418a69eca7b8c1bb74244982305fc6004d0a52
Workaround: ---
Bug Depends on:    
Bug Blocks: 719    

Description Sven Gothel 2013-04-17 16:54:03 CEST

    
Comment 1 Sven Gothel 2013-04-18 03:21:12 CEST
GLContextImpl shall have only _one_ unique platform derivative
to allow proper swapping of GLDrawables of any type via:
  - 'GLAutoDrawable.setContext(GLContext newCtx, boolean destroyPrevCtx)', which calls
  - 'GLContext.setGLDrawable(GLDrawable readWrite, boolean setWriteOnly)'
    
Exception: External context may be specialized.
    
All drawable specific property handling shall be provided
and implemented (if possible) via GLDrawable specializations.
    
 - GLContext.isGLOrientationFlippedVertical() -> GLDrawable.isGLOriented()

 - PNGImage.createFromData() takes 'isGLOriented' to properly handle vertical flipping simply 
   by line ordering

 - TextureIO's PNG writer passes TextureData's getMustFlipVertically() 
    as isGLOriented to PNGImage.createFromData()

 - GLReadBufferUtil respects GLDrawable's isGLOriented() when creating TextureData instance.

 - Screenshot respects GLDrawable's isGLOriented()
    
 - Screenshot is deprecated, use GLReadBufferUtil.
    
 - Removed all PBuffer attributes, i.e. floatingPoint, RenderToTexture and RenderToTextureRectangle.
   - Allows removal of special pbuffer handling in GLContext* implementations.
   - Removed also from GLCapabilities*
   - Removed from deprecated GLPbuffer
    
   Impact:
    - Low, users who desire to render into a texture shall use our FBO GLOffscreenDrawable.
    - Only use case was the deprecated GLPbuffer
    - floating point framebuffer technology is still patented anyways :)
    
 - Removed Java2DGLContext, which was only used for OSX's GLJPanel Java2D bridge,
   which is no more supported anyways.