Bug 238

Summary: BufferedImage flips on call to ImageIO.newTexture
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 1   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
Workaround: ---

Description Sven Gothel 2010-03-24 07:49:26 CET


---- Reported by eteq 2006-07-16 10:30:36 ----

This patch addresses the problem that when newTexture(BufferedImage, boolean) is
called, the bufferedImage itself is actually flipped, instead of specifying that
the texture coordinates should be flipped.  This allows the same image to be
reused without it being flipped.  

on line 479 in TextureData.java,
chage 

createNIOBufferFromImage(image, true);

to

this.mustFlipVertically = true;
createNIOBufferFromImage(image, false);



---- Additional Comments From kbr 2006-07-20 16:07:30 ----

Fixed by copying texture data in the case where it needs to be flipped
vertically and restoring the image afterward so as to continue to not require
applications to know about flipping texture coordinates vertically in as many
cases as possible.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:49 EDT  ---

This bug was previously known as _bug_ 238 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=238