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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user