From: <eli...@us...> - 2007-04-15 19:33:05
|
Revision: 2767 http://svn.sourceforge.net/java-game-lib/?rev=2767&view=rev Author: elias_naur Date: 2007-04-15 12:33:03 -0700 (Sun, 15 Apr 2007) Log Message: ----------- Don't add border when checking image sizes Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL12.java Modified: trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java 2007-04-11 20:33:07 UTC (rev 2766) +++ trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java 2007-04-15 19:33:03 UTC (rev 2767) @@ -133,7 +133,7 @@ else if (buf instanceof LongBuffer || buf instanceof DoubleBuffer) return 3; else - throw new IllegalStateException("Unsupported buffer type"); + throw new IllegalStateException("Unsupported buffer type: " + buf); } /** Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java 2007-04-11 20:33:07 UTC (rev 2766) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java 2007-04-15 19:33:03 UTC (rev 2767) @@ -148,16 +148,16 @@ return calculateImageStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer); } - static int calculateTexImage1DStorage(Buffer buffer, int format, int type, int width, int border) { - return calculateTexImage1DStorage(format, type, width, border) >> BufferUtils.getElementSizeExponent(buffer); + static int calculateTexImage1DStorage(Buffer buffer, int format, int type, int width) { + return calculateTexImage1DStorage(format, type, width) >> BufferUtils.getElementSizeExponent(buffer); } - static int calculateTexImage2DStorage(Buffer buffer, int format, int type, int width, int height, int border) { - return calculateTexImage2DStorage(format, type, width, height, border) >> BufferUtils.getElementSizeExponent(buffer); + static int calculateTexImage2DStorage(Buffer buffer, int format, int type, int width, int height) { + return calculateTexImage2DStorage(format, type, width, height) >> BufferUtils.getElementSizeExponent(buffer); } - static int calculateTexImage3DStorage(Buffer buffer, int format, int type, int width, int height, int depth, int border) { - return calculateTexImage3DStorage(format, type, width, height, depth, border) >> BufferUtils.getElementSizeExponent(buffer); + static int calculateTexImage3DStorage(Buffer buffer, int format, int type, int width, int height, int depth) { + return calculateTexImage3DStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer); } /** @@ -175,16 +175,16 @@ return calculateBytesPerPixel(format, type) * width * height * depth; } - private static int calculateTexImage1DStorage(int format, int type, int width, int border) { - return calculateBytesPerPixel(format, type) * (width + (border << 1)); + private static int calculateTexImage1DStorage(int format, int type, int width) { + return calculateBytesPerPixel(format, type) * width; } - private static int calculateTexImage2DStorage(int format, int type, int width, int height, int border) { - return calculateTexImage1DStorage(format, type, width, border) * (height + (border << 1)); + private static int calculateTexImage2DStorage(int format, int type, int width, int height) { + return calculateTexImage1DStorage(format, type, width) * height; } - private static int calculateTexImage3DStorage(int format, int type, int width, int height, int depth, int border) { - return calculateTexImage2DStorage(format, type, width, height, border) * (depth + (border << 1)); + private static int calculateTexImage3DStorage(int format, int type, int width, int height, int depth) { + return calculateTexImage2DStorage(format, type, width, height) * depth; } private static int calculateBytesPerPixel(int format, int type) { Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2007-04-11 20:33:07 UTC (rev 2766) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2007-04-15 19:33:03 UTC (rev 2767) @@ -1261,7 +1261,7 @@ void glTexImage1D(@GLenum int target, int level, int internalformat, @GLsizei int width, int border, @GLenum int format, @GLenum int type, @BufferObject(BufferKind.UnpackPBO) - @Check(value = "GLChecks.calculateTexImage1DStorage(pixels, format, type, width, border)", canBeNull = true) + @Check(value = "GLChecks.calculateTexImage1DStorage(pixels, format, type, width)", canBeNull = true) @Const @GLbyte @GLshort @@ -1271,7 +1271,7 @@ void glTexImage2D(@GLenum int target, int level, int internalformat, int width, int height, int border, @GLenum int format, @GLenum int type, @BufferObject(BufferKind.UnpackPBO) - @Check(value = "GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height, border)", canBeNull = true) + @Check(value = "GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)", canBeNull = true) @Const @GLbyte @GLshort Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL12.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL12.java 2007-04-11 20:33:07 UTC (rev 2766) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL12.java 2007-04-15 19:33:03 UTC (rev 2767) @@ -97,7 +97,7 @@ void glTexImage3D(@GLenum int target, int level, int internalFormat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @GLenum int format, @GLenum int type, @BufferObject(BufferKind.UnpackPBO) - @Check(value = "GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth, border)", canBeNull = true) + @Check(value = "GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)", canBeNull = true) @Const @GLbyte @GLshort This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |