Added Texuture::SubloadCallback example into the osgprerender demo to illustrate

how to use it.

Changed the ImpostorSprite to use LINEAR,LINEAR for min and mag filters for the
impostor texture.
This commit is contained in:
Robert Osfield
2002-08-16 15:14:43 +00:00
parent 7dfefaf67f
commit 2ab0f689eb
4 changed files with 145 additions and 38 deletions

View File

@@ -105,12 +105,18 @@ class SG_EXPORT Image : public Object
inline const unsigned char *data() const { return _data; }
unsigned char* data(int column, int row=0,int image=0)
inline unsigned char* data(int column, int row=0,int image=0)
{
if (!_data) return NULL;
return _data+(column*getPixelSizeInBits())/8+row*getRowSizeInBytes()+image*getImageSizeInBytes();
}
inline const unsigned char* data(int column, int row=0,int image=0) const
{
if (!_data) return NULL;
return _data+(column*getPixelSizeInBits())/8+row*getRowSizeInBytes()+image*getImageSizeInBytes();
}
/** Flip the image horizontally.*/
void flipHorizontal(int image=0);