8#ifndef META_OCEAN_RENDERING_TEXTURE_2D_H
9#define META_OCEAN_RENDERING_TEXTURE_2D_H
124 static inline void calculatePowerOfTwoDimension(
const unsigned int width,
const unsigned int height,
unsigned int& powerOfTwoWidth,
unsigned int& powerOfTwoHeight);
137 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:39
Timestamp frameTimestamp_
The timestamp of the current frame.
Definition Texture2D.h:132
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...
FrameType frameType_
The frame type of the current frame.
Definition Texture2D.h:129
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:135
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
This class implements a timestamp.
Definition Timestamp.h:63
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:955
The namespace covering the entire Ocean framework.
Definition Accessor.h:15