Commit Graph

101 Commits

Author SHA1 Message Date
Robert Osfield
214491dd94 From Mathias Froehlich, "Update to the configure check for msvc 7.1.
MemoryBarrier() is used in the implementation, so it should be checked.
This in effect disables the faster atomic ops on msvc 7.1 and older, even if
only the MemoryBarrier() call is missing. But it ensures for the fist cut
that it will build everywhere. If somebody cares for msvc 7.1 enough and has
one for testing installed, he might provide the apropriate defines to guard
that MemoryBarrier() call.

I tested that msvc8 32/64bit still passes the configure tests and compiles.
"
2008-06-27 16:47:43 +00:00
Robert Osfield
93127866a8 From Sid Byce, fixes for compiling with gcc 4.3 2007-12-24 15:19:52 +00:00
Robert Osfield
0c4648e027 Added include<string.h> to fix compile errors under gcc 4.3 2007-12-10 10:16:13 +00:00
Robert Osfield
316b36fab7 Added getColor method to allow easy reading of individual pixels. 2007-10-31 12:55:15 +00:00
Robert Osfield
7086aeeebc Removed log2 and replaced the places where is was used with a new Image::computeNumberOfMipmapLevels method. 2007-10-01 08:50:58 +00:00
Robert Osfield
bd68958877 From Art Tevs, "Following
two lines has to be included into the Image.cpp in the
computeNumComponents(...) method:

case(GL_RGBA16F_ARB): return 4;
case(GL_RGBA32F_ARB): return 4;"
2007-09-24 09:26:21 +00:00
Robert Osfield
5e83ae4821 From Art Trevs, "Features of the patch are:
- Implementation of integer textures as in EXT_texture_integer

- setBorderColor(Vec4) changed to setBorderColor(Vec4d) to pass double values
as border color. (Probably we have to provide an overloading function to
still support Vec4f ?)

- new method Texture::getInternalFormatType() added. Gives information if the
internal format normalized, float, signed integer or unsigned integer. Can
help people to write better code ;-)

"

Futher changes to this submission by Robert Osfield, changed the dirty mipmap
flag into a buffer_value<> vector to ensure safe handling of multiple contexts.
2007-09-11 12:04:58 +00:00
Robert Osfield
91983cbe71 Fixed typo 2007-09-08 07:04:27 +00:00
Robert Osfield
c7a72c8435 From Art Tevs,
"A new texture class Texture2DArray derived from
Texture extends the osg to support the new
EXT_texture_array extensions. Texture arrays provides
a feature for people interesting in GPGPU programming.


Faetures and changes:

- Full support for layered 2D textures.

- New uniform types were added (sampler2DArray)

- FrameBufferObject implementation were changed to
support attaching of 2D array textures to the
framebuffer

- StateSet was slightly changed to support texture
arrays. NOTE: array textures can not be used in fixed
function pipeline. Thus using the layered texture as a
statemode for a Drawable produce invalid enumerant
OpenGL errors.

- Image class was extended to support handling of
array textures

Tests:
I have used this class as a new feature of my
application. It works for me without problems (Note:
Texture arrays were introduced only for shading
languages and not for fixed function pipelines!!!).
RTT with Texture2DArray works, as I have tested them
as texture targets for a camera with 6 layers/faces
(i.e. replacement for cube maps). I am using the array
textures in shader programming. Array textures can be
attached to the FBO and used as input and as output."
2007-09-07 11:21:02 +00:00
Robert Osfield
de4a4042f7 Set main scene graph elements to use thread safe ref/unref by default 2007-08-22 10:34:11 +00:00
Robert Osfield
9d0e273a15 Changed ++_modifedCount cases to dirty(). 2007-08-17 09:37:49 +00:00
Robert Osfield
a7a0e2c4d3 Added Image::g/setOrigin to help movie plugins tell applications that the imagery
is not the usual OpenGL BOTTOM_LEFT orientation, but with the origin TOP_LEFT.  This
allows geometry setup code to flip the t tex coord to render the movie the correct way up.
2007-06-12 16:55:44 +00:00
Robert Osfield
43790b07b3 From Vladimir Shabanov, "osg::Image::isImageTranslucent() now handles
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV and
GL_HALF_FLOAT_NV pixel formats."
2007-06-10 19:22:13 +00:00
Robert Osfield
5423add9e2 Added support for 4,7,12,16 bit luminance and intensity formats 2007-03-06 11:20:39 +00:00
Robert Osfield
f257285efc From Chuck Seberion, added support reading ARB float format textures. 2006-10-14 21:50:29 +00:00
Robert Osfield
179f6100a0 Added missing setDataType and setPacking functions 2006-08-25 15:49:29 +00:00
Robert Osfield
1413eea52c Add error message report to catch attempts to flip mipmap images. 2006-08-24 16:33:23 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
865ee4429c From Eric Sokolowsky,
"Attached is some fixes for Image::readImageFromCurrentTexture. It was
failing when used with a new Image object (some of the fields were
not set before they were used, and some were set to the wrong values).
A new optional parameter was added to give the desired data type, which
defaults to GL_UNSIGNED_BYTE, so programs should only need a recompile
to work properly."
2006-07-06 14:02:14 +00:00
Robert Osfield
0e16b64665 Coverted tabs to space in core libraries. 2005-11-17 13:35:53 +00:00
Robert Osfield
19c1863432 Added (_data || rhs._data) extra qualify to Image::compare is data equal test. 2005-11-17 09:20:58 +00:00
Robert Osfield
6ed9cb40cc From Colin McDonald, fixed image size calculation in getTotalSizeInBytesIncludingMipmaps(),
added checks on success of opening files for writing in the .ive plugin.
2005-11-08 13:51:28 +00:00
Robert Osfield
83da1b0894 From Brede Johansen, fix to the isImageTranslucent() method. 2005-07-26 16:05:42 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Robert Osfield
2ab78cfe38 From Marco Jez, fixed constness of data return type 2005-03-23 21:00:28 +00:00
Robert Osfield
7bf72cd43b From Marco Jez, improved Texture2D and Image handling of compare(). 2005-03-07 14:30:55 +00:00
Robert Osfield
5215d43e14 warning fix 2005-02-10 20:21:01 +00:00
Robert Osfield
ec8624f185 Implemented the osg::Image::isImagTranslucent function. 2005-02-10 15:52:18 +00:00
Robert Osfield
117c791a3b Added osg::BufferObject and a made a number associated to accomodate this
new class. osg::BufferObject wraps up OpenGL pixel and array buffer objects.
Currently implementation is work in progress.
2005-02-09 10:39:45 +00:00
Robert Osfield
9a93d7ae06 Fixes to osg::Image's handling of compressed formats. 2005-01-27 20:18:49 +00:00
Robert Osfield
4c8e48c9e7 From Yuzhong Shen, fix to the image dimensions passed to allocImage in Image::copySubImage 2004-10-18 14:46:57 +00:00
Robert Osfield
d204a087c3 Added proper handling of 3d texture compression 2004-09-30 09:10:29 +00:00
Robert Osfield
e08328a449 Preliminary steps to support for compressed 3D textures. 2004-09-29 10:01:46 +00:00
Robert Osfield
e5cfe0a27a From Marco Jez, addition of new interal texture formats to osg/Texture and Image.cpp 2004-09-01 08:49:48 +00:00
Robert Osfield
cf99c3c9bd Added support in Image::flipVertical for flipping mipmapped imagery
and for flipping compressed imagery.
2004-08-16 20:57:24 +00:00
Robert Osfield
98d30a8ce0 From Pavel Moloshtan, fix to Image copy constructor so that it used the
correct size of image including mipmaps.
2004-08-03 18:06:36 +00:00
Robert Osfield
bb5576bef8 Added support s/getImage(uint i) and getNumImages(). 2004-07-27 10:11:45 +00:00
Robert Osfield
ba20259794 Removed debugging message 2004-07-06 12:32:09 +00:00
Robert Osfield
518cedf6c7 Added dealloc or previous image data into readImageFromTexture 2004-07-05 21:46:02 +00:00
Robert Osfield
cce00c475b Added suppor for copying mipmaps of compressed textures 2004-07-05 21:09:30 +00:00
Robert Osfield
4c0aa24526 Added handling of GL_INTENSITY in osg::Image::computeNumComponents() 2004-06-17 15:07:50 +00:00
Robert Osfield
eb3917060f From George Tarantilis, fixes to DDS size computations.
From Robert Osfield, addition of constructors for internal DDS structures.
2004-05-25 16:10:28 +00:00
Robert Osfield
6800b7d29a Added the setting of the _internalTextureFormat from within osg::Image. 2004-03-17 20:03:56 +00:00
Robert Osfield
28759baa98 From Marco Jez, added support NVidia extension to imager formats. 2004-03-14 15:08:12 +00:00
Robert Osfield
4aa7afedf3 Removed include <iostream> where possible, replacing with istream or ostream and changing
std::cout/cerr to osg::notify().
2004-03-03 13:27:21 +00:00
Robert Osfield
477739f6fc Fixed typos in error reporting 2003-12-24 00:14:45 +00:00
Robert Osfield
fd016af34b Added support for 565 textures to osgbluemarble.
Added a osg::Image::scaleImage() version which allows the datatype to be varied.
2003-10-29 23:10:11 +00:00
Robert Osfield
c199e74bfc Added support for generating compressed textures in osgbluemarble. 2003-10-17 15:26:30 +00:00
Robert Osfield
c2b02608d1 Renamed instance of variables called format to pixelFormat to make a
clearer distinction between pixelFormat and internalTextureFormat.
2003-09-22 09:13:22 +00:00
Robert Osfield
a36d45e68b Added check to allocateImage() so that if the pixel size wouldn't be computed
unless valid _data already existed on the object.
2003-07-23 08:18:19 +00:00