summaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/util/texture
Commit message (Collapse)AuthorAgeFilesLines
* Deleted obsolete source code in preparation for copying JOGL_2_SANDBOXKenneth Russel2009-06-1510-5579/+0
| | | | | | | on to trunk git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1958 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added documentation to describe the target parameter.moorej2008-05-021-0/+3
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1618 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added table of Porter-Duff compositing rules in the face of Kenneth Russel2008-02-181-0/+22
| | | | | | | | premultiplied alpha based on some code from the Java 2D OpenGL pipeline git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1535 232f8b59-042b-4e1e-8c03-345bb8c30851
* Removed incorrect statements from TextureIO class about certain Kenneth Russel2008-01-161-8/+4
| | | | | | | | | methods not automatically generating mipmaps which appear to have been vestigial comments from the original checkin of this code; errors pointed out by Tom Gaskins of NASA World Wind Java project git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1500 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added support for loading non-mipmapped, non-power-of-two compressed Kenneth Russel2007-09-042-5/+75
| | | | | | | | | | | textures on pre-OpenGL 2.0 hardware by first loading an "empty" compressed texture and then updating a sub-rectangle of its image. Straightforward port of this code to the mipmapped case did not work; added error checking for this case and throwing of GLException. Bug pointed out by Dave Collins from NASA World Wind Java project. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1354 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 307: Rectangular (but still pow2) dds textures with mipmaps ↵Kenneth Russel2007-08-061-6/+6
| | | | | | | | | | | incorrectly loaded Clamped several divisions of width and height to 1 as per bug description. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1328 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed regression pointed out by Tom Gaskins where Kenneth Russel2007-07-121-7/+21
| | | | | | | | getEstimatedMemorySize() was returning 0 due to the lazier initialization of the data buffer in the custom image conversion case git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1299 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed problems in TextureIO classes where they did not work with Kenneth Russel2007-05-072-15/+73
| | | | | | | | OpenGL 1.1. Added logic to back off from using OpenGL 1.2 image types by using same code paths as for custom BufferedImage types. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1238 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 296: TextureIO cube map support brokenKenneth Russel2007-04-212-36/+56
| | | | | | | | | | | | | Fixed code paths supporting cube maps. As a positive side-effect, the VertexProgRefract demo's cube map is now rendered completely correctly; inversion of the positive and negative Y images, and the negative Y scale factor on the texture matrix, are no longer needed, and the seams around the top image are gone. Fixed code relating to automatic mipmap generation in the presence of only GL_ARB_texture_rectangle and not GL_ARB_texture_non_power_of_two. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1212 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added automatic mipmap generation support via GL_GENERATE_MIPMAP Kenneth Russel2007-04-081-7/+58
| | | | | | | | | | texture parameter to Texture class. Exposed this support up through the TextureRenderer and TextRenderer classes. Tested by temporarily enabling mipmap support for TextCube demo; no visual improvement, however, so left it disabled for now. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1194 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added TextureIO.setTexRectEnabled() and isTexRectEnabled() based onKenneth Russel2007-04-032-1/+38
| | | | | | | | discussions with Chris Campbell of the Java 2D team, and changed Texture implementation to respect it git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1190 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added Texture.getAspectRatio().Kenneth Russel2007-03-211-0/+13
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1177 232f8b59-042b-4e1e-8c03-345bb8c30851
* Simplified math in last putbackKenneth Russel2007-03-161-2/+2
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1171 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 287: TextRenderer rendering artifacts Kenneth Russel2007-03-161-3/+17
| | | | | | | | | | Stress testing uncovered that when neither GL_ARB_texture_non_power_of_two or GL_ARB_texture_rectangle were available, the Texture class was returning incorrect texture coordinates for textures which needed to be flipped vertically. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1170 232f8b59-042b-4e1e-8c03-345bb8c30851
* On advice from Chris Campbell, forced TYPE_INT_ARGB and Kenneth Russel2007-02-271-3/+12
| | | | | | | | | | TYPE_4BYTE_ABGR images down custom code path in order to obey general invariant that image data sent down to OpenGL has premultiplied alpha. Fixed bug in handling of TYPE_INT_ARGB images in custom image conversion. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1155 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 276: Bug in handling of RGB-like custom BufferedImages in TextureIO Kenneth Russel2007-02-221-1/+1
| | | | | | | | | Code path handling RGB-like TYPE_CUSTOM BufferedImages in the TextureIO classes should have been computing the row length by dividing the scanline stride by 3, not 4. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1150 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 273: class DDSImage don't support cubemap textures Kenneth Russel2007-02-211-16/+144
| | | | | | | Incorporated suggested fix from java.net user bandures. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1146 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 267: class DDSImage return incorrect mipmap level data. Kenneth Russel2007-01-261-2/+2
| | | | | | | Applied recommended fix from submitter. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1107 232f8b59-042b-4e1e-8c03-345bb8c30851
* With help from Chris Campbell, fixed incredibly stupid bug on my part Kenneth Russel2007-01-061-0/+38
| | | | | | | | | | | | | | | | where the new Java 2D TextureRenderer was destroying and re-creating the OpenGL texture every frame. This was why the Java 2D Overlay class was so expensive, and why the TextRenderer wasn't as fast as it seemed it should be. Fixed bugs in all of the Java 2D demos which were covered up by this implicit sync, as well as in the TextRenderer class itself where it was missing a key sync operation. Added code to the Texture.updateSubImage() implementation to clip the incoming rectangle to the bounds of the input data and texture, to keep OpenGL from dropping almost-valid updates on the floor. Ran all of the Java 2D integration demos to verify these fixes. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1071 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 257: RFE: Texture.updateSubImage(x,y,w,h) Kenneth Russel2006-12-292-143/+233
| | | | | | | | | | | | | | | | | | | | Changed TextureIO's BufferedImage code paths to no longer copy the data in order to correct for the vertical flip needed between Java 2D's and OpenGL's coordinate systems, but instead to correct for this using a flip of the texture coordinates. This was needed to change the semantics for the BufferedImage from "by-copy" to "by-reference". Made the custom BufferedImage copying code path occur lazily upon a call to TextureData.getBuffer(). Added support for the GL_EXT_abgr extension but disabled the code path currently as it appears there may be bugs in its support on some drivers. Added computation of row width for all BufferedImage types with help and suggestions from Chris Campbell. Improved handling of some BufferedImage types like TYPE_INT_ARGB and TYPE_4BYTE_ABGR. Added Texture.updateSubImage() taking a source rectangle as well as a destination coordinate. Wrote TestSubImage test to show use of the new API which exercises all BufferedImage types. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1057 232f8b59-042b-4e1e-8c03-345bb8c30851
* Texture documentation improvements suggested by Chris Campbell and James GoslingKenneth Russel2006-12-051-7/+54
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1016 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed javadoc code tag problem pointed out by Chris CampbellKenneth Russel2006-11-271-2/+2
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1006 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added documentation by Chris Campbell to Texture class on Kenneth Russel2006-11-181-2/+48
| | | | | | | non-power-of-two restrictions, and premultiplied alpha and blending git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@988 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 247: Texture class should use GL_CLAMP if OpenGL version is 1.1 Kenneth Russel2006-11-151-4/+4
| | | | | | | | Changed code to check for presence of OpenGL 1.2 and use GL_CLAMP instead of GL_CLAMP_TO_EDGE if not available. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@984 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 238: BufferedImage flips on call to ImageIO.newTexture Kenneth Russel2006-07-201-33/+81
| | | | | | | | Now copy texture data in the case where it needs to be flipped vertically and restore the image afterward. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@852 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed bug pointed out by Tom Gaskins from NASA in handling of creationKenneth Russel2006-06-021-24/+51
| | | | | | | | of compressed textures; can not allocate texture with glTexImage2D and fill it with glCompressedTexSubImage2D git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@797 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed build breakage with last checkinKenneth Russel2006-05-211-0/+1
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@773 232f8b59-042b-4e1e-8c03-345bb8c30851
* Removed debugging printlnsKenneth Russel2006-05-201-4/+10
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@772 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed bugs in handling of mipmapped compressed texturesKenneth Russel2006-05-203-15/+16
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@771 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added StreamUtil for reading all data from an InputStream. Added Kenneth Russel2006-05-052-79/+155
| | | | | | | | support to DDSImage and TextureIO classes for reading DDS files from InputStreams and URLs based on request from Tom Gaskins. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@754 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed bug found by user Kickaha on javagaming.org forums where entire Kenneth Russel2006-04-131-2/+2
| | | | | | | image's texture coordinates were being computed before target was set git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@711 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added support requested by user mantesat on JOGL forum for null Kenneth Russel2006-03-031-1/+6
| | | | | | | texture buffer git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@646 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 203: Missing setup of GL_UNPACK_ALIGNMENT for mipmapped Kenneth Russel2006-02-101-4/+12
| | | | | | | | | images in TextureIO Added missing set of GL_UNPACK_ALIGNMENT in mipmap case. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@593 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 190: Add TextureIO features Kenneth Russel2006-01-222-0/+128
| | | | | | | | | Added getEstimatedMemorySize() to TextureData and Texture classes. Filled out setTexParameter* methods to include all variants (i, f, iv, fv) in the underlying OpenGL binding. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@561 232f8b59-042b-4e1e-8c03-345bb8c30851
* Renamed com.sun.opengl.utils to com.sun.opengl.util. Moved Kenneth Russel2006-01-1310-0/+4623
TextureIO-related classes to com.sun.opengl.util.texture and TextureProvider, TextureWriter and format-specific readers to com.sun.opengl.util.texture.spi. Renamed BufferUtils to BufferUtil. Added ImageUtil and FileUtil. Cleaned up javadoc. Updated demos. Cleaned up some imports. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@538 232f8b59-042b-4e1e-8c03-345bb8c30851