Added TextureRectangle(Image*) contructor.

This commit is contained in:
Robert Osfield
2004-03-09 14:59:33 +00:00
parent a3d99d88ff
commit 9f6383f5dd
4 changed files with 17 additions and 2 deletions

View File

@@ -43,6 +43,19 @@ TextureRectangle::TextureRectangle():
setFilter(MAG_FILTER, LINEAR);
}
TextureRectangle::TextureRectangle(Image* image):
_textureWidth(0),
_textureHeight(0)
{
setWrap(WRAP_S, CLAMP);
setWrap(WRAP_T, CLAMP);
setFilter(MIN_FILTER, LINEAR);
setFilter(MAG_FILTER, LINEAR);
setImage(image);
}
TextureRectangle::TextureRectangle(const TextureRectangle& text,const CopyOp& copyop):
Texture(text,copyop),
_image(copyop(text._image.get())),