8 #ifndef META_OCEAN_RENDERING_TEXTURE_2D_H
9 #define META_OCEAN_RENDERING_TEXTURE_2D_H
123 static inline void calculatePowerOfTwoDimension(
const unsigned int width,
const unsigned int height,
unsigned int& powerOfTwoWidth,
unsigned int& powerOfTwoHeight);
128 ocean_assert(width != 0u && height != 0u);
Definition of a frame type composed by the frame dimension, pixel format and pixel origin.
Definition: Frame.h:30
ObjectType
Definition of different object type.
Definition: Object.h:63
This class is the base class for all 2D textures.
Definition: Texture2D.h:38
virtual WrapType wrapTypeT() const
Returns the texture wrap type in t direction.
virtual FrameType frameType() const
Returns the frame type of this 2D texture.
virtual bool setWrapTypeS(const WrapType type)
Sets the texture wrap type in s direction.
~Texture2D() override
Destructs a 2D texture object.
Texture2D()
Creates a new 2D texture object.
virtual WrapType wrapTypeS() const
Returns the texture wrap type in s direction.
ObjectType type() const override
Returns the type of this object.
virtual bool setWrapTypeT(const WrapType type)
Sets the texture wrap type in t direction.
virtual Vector2 imageTextureRatio() const
Returns the ratio between original image dimension and actual texture dimension in horizontal and ver...
static void calculatePowerOfTwoDimension(const unsigned int width, const unsigned int height, unsigned int &powerOfTwoWidth, unsigned int &powerOfTwoHeight)
Calculates the smallest power of two texture in which a given image with arbitrary dimension fits.
Definition: Texture2D.h:126
virtual bool hasTransparentPixel() const
Returns whether this texture contains at least one transparent pixel.
This class is the base class for all textures.
Definition: rendering/Texture.h:38
WrapType
Definition of different texture wrapping types.
Definition: rendering/Texture.h:96
static unsigned int smallestPowerOfTwo(const unsigned int value)
Returns the smallest power of two value that is equal or larger than a given value.
Definition: base/Utilities.h:885
SmartObjectRef< Texture2D > Texture2DRef
Definition of a smart object reference holding a 2D texture.
Definition: Texture2D.h:24
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15