Bug 826 - GLJPanel not unbinding the texture
Summary: GLJPanel not unbinding the texture
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: awt (show other bugs)
Version: 2
Hardware: All all
: --- minor
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-09-05 17:16 CEST by Karel Petranek
Modified: 2014-06-13 04:24 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
c427ed22244df44b71a0f1f000b0f93e56c283c2 321cac1e125f806eb437e528b343d07379b31163
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karel Petranek 2013-09-05 17:16:51 CEST
The GLJPanel implementation does not seem to unbind a temporary texture it uses for reading back pixels from the GPU. The texture is bound at line 1266 in GLJPanel:
gl.glBindTexture(GL.GL_TEXTURE_2D, fboTex.getName());

If an application does not use texturing but still specifies texture coordinates (for example allowing an on/off switch for displaying textures), this can cause some hard-to-find rendering issues.

It would be nice to have GLJPanel clean up and possible restore the original texture state.
Comment 2 Sven Gothel 2014-06-13 04:24:41 CEST
Fix Bug 826 Regression caused by commit 41190c3830157abdf9649cbf7767e57108f55075 (Bug 975)
    
Commit 41190c3830157abdf9649cbf7767e57108f55075,
fix for 'Bug 975 GLJPanel's OffscreenDrawable double swap',
caused a regression of commit c427ed22244df44b71a0f1f000b0f93e56c283c2,
fix for 'Bug 826: GLJPanel: Fully restore TextureState and Viewport'.
    
Commit 41190c3830157abdf9649cbf7767e57108f55075 issues offscreenDrawable.swapBuffers()
and hence modifying the texture unit settings before saving the TextureState,
the whole purpose of commit c427ed22244df44b71a0f1f000b0f93e56c283c2.