summaryrefslogtreecommitdiffstats
path: root/make/config/jogl/gl-impl-CustomJavaCode-embedded.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-19 00:41:09 -0700
committerSven Gothel <[email protected]>2009-10-19 00:41:09 -0700
commit07684c8fe9534c235d0320ad693be24a8bdcada1 (patch)
tree741995dc88ae73fdb9a0ce58de5eeba613941dbe /make/config/jogl/gl-impl-CustomJavaCode-embedded.java
parent1222d9c3329469efa23c5cbf106059359db132a4 (diff)
imageSizeInBytes .. leaving out the dirt/padding last line
Diffstat (limited to 'make/config/jogl/gl-impl-CustomJavaCode-embedded.java')
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-embedded.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-embedded.java b/make/config/jogl/gl-impl-CustomJavaCode-embedded.java
index ae90a42a0..0408c21a1 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-embedded.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-embedded.java
@@ -34,7 +34,9 @@ private int imageSizeInBytes(int bytesPerElement,
* rowlenght is the actual repeating offset
* to go from line n to line n+1 at the same x-axis position.
*/
- int imageSize = imageHeight * rowLengthInBytes;
-
- return imageSize * depth;
+ return
+ ( depth - 1 ) * imageHeight * rowLengthInBytes + // whole images
+ ( imageHeight - 1 ) * rowLengthInBytes + // lines with padding
+ ( rowLength ) * bytesPerElement; // last line
}
+