Bug 297 - buffer size calculation for glTexImage2D is wrong
Summary: buffer size calculation for glTexImage2D is wrong
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P3 normal
Assignee: Sven Gothel
Depends on:
Reported: 2007-04-25 12:04 CEST by Sven Gothel
Modified: 2010-03-24 07:50 CET (History)
0 users

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:50:29 CET

---- Reported by kenchapin 2007-04-25 12:04:58 ----

I'm getting a IndexOutOfBoundsException when the border size is > 0.  Looking 
at the generated GLImpl.java it seems that the necessary buffer size 
calculation from the imageSizeInBytes() function is passed incorrect 
arguments.  From my reading of the OpenGL spec and looking at GLX client 
libraries the border is inclusive of the the width and height, not exclusive.

glTexImage3D should have the same problem.

---- Additional Comments From kbr 2007-04-26 10:50:31 ----

Removed border from required buffer size computation as per bug report and
glTexImage1D, glTexImage2D, and glTexImage3D definitions.

Fix will be present in nightly builds dated 4/27 and later as well as the
forthcoming JOGL 1.1.1.

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

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