Bug 709 - Texturing with Newt and FBO flag partly corrupt
Summary: Texturing with Newt and FBO flag partly corrupt
Status: RESOLVED INVALID
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2
Hardware: All all
: P5 enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-03-22 21:06 CET by Maik
Modified: 2013-04-06 14:39 CEST (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
4934f1801ba44d20353652f9ee3686a13323fb74
Workaround: ---


Attachments
self-contained main() test (4.91 KB, text/plain)
2013-03-22 21:06 CET, Maik
Details
first and second frame (45.13 KB, image/png)
2013-03-22 21:07 CET, Maik
Details
third frame (1.39 KB, image/png)
2013-03-22 21:08 CET, Maik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maik 2013-03-22 21:06:45 CET
Created attachment 435 [details]
self-contained main() test

This report is a continuation of this thread:
http://www.ardor3d.com/forums/viewtopic.php?f=10&t=12582

I transformed my Ardor3D test code (with the teapot) to pure JOGL code as good as I could. Although I haven't replicated it 1:1, the desired effects are visible.

My use case is rendering single frames and saving them to files.

When setting caps.setFBO(true); and using a texture from a file [1], then subsequent frames corrupt the texture/scene. I don't think it is really related to using a texture from a file. The only thing I noticed was that everything is fine when I use a self-generated 1D stripe texture (also in the code).

Please confirm if you see the same effects.

I use jogl 2.0rc11 and do tests on Windows atm, although I remember seeing similar problems on Linux when I tried FBOs a while ago.


[1] https://raw.github.com/Renanse/Ardor3D/master/ardor3d-examples/src/main/resources/com/ardor3d/example/media/images/ardor3d_white_256.jpg
Comment 1 Maik 2013-03-22 21:07:35 CET
Created attachment 436 [details]
first and second frame
Comment 2 Maik 2013-03-22 21:08:09 CET
Created attachment 437 [details]
third frame
Comment 3 Sven Gothel 2013-04-06 06:24:10 CEST
Bug 709: Testing texured demo w/ FBO, comparing w/ onscreen - No corruption.

Put your demo in our unit tests, while rendering it onscreen and w/ FBO.
Screenshots show now difference.
Comment 4 Maik 2013-04-06 08:53:20 CEST
Why did you mark this as invalid? Are you saying my code was partially wrong and you fixed it? Does the problem happen on your machine when you use my original class as-is?
Comment 5 Sven Gothel 2013-04-06 14:39:23 CEST
(In reply to comment #4)
> Why did you mark this as invalid? Are you saying my code was partially wrong
> and you fixed it? Does the problem happen on your machine when you use my
> original class as-is?

The only semantical GL change I did was to do a 
  tex.bind(..)
  glEnable(TEX..2D)

maybe this was the issue, I don't know.

FBO deals w/ textures, hence texture selection should happen always.

Invalid, b/c it's not a JOGL bug itself, but more a misunderstanding of usage.

However, we can discuss this further, i.e. how to avoid or notify people to avoid it.

Pls also note that we have tons of GLAutoDrawable test w/ on- and offscreen [fbo, pbuffer]
testing this - you may check those results/code as well 
 com.jogamp.opengl.test.junit.jogl.acore.Test*GLAutoDrawable*