Changeset 3224
- Timestamp:
- 08/03/04 20:06:36 (9 years ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osg/Image.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/Image.cpp
r3190 r3224 57 57 if (image._data) 58 58 { 59 int num_components = 60 _pixelFormat == GL_LUMINANCE ? 1 : 61 _pixelFormat == GL_LUMINANCE_ALPHA ? 2 : 62 _pixelFormat == GL_RGB ? 3 : 63 _pixelFormat == GL_RGBA ? 4 : 4; 64 65 int size = _s*_t*_r*num_components; 59 int size = image.getTotalSizeInBytesIncludingMipmaps(); 66 60 setData(new unsigned char [size],USE_NEW_DELETE); 67 61 memcpy(_data,image._data,size);
