8#ifndef META_OCEAN_RENDERING_TEXTURE_2D_H
9#define META_OCEAN_RENDERING_TEXTURE_2D_H
132 static inline void calculatePowerOfTwoDimension(
const unsigned int width,
const unsigned int height,
unsigned int& powerOfTwoWidth,
unsigned int& powerOfTwoHeight);
148 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:62
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:143
virtual WrapType wrapTypeT() const
Returns the texture wrap type in t direction.
virtual FrameType sourceFrameType() const
Returns the frame type of the image which was provided for this texture.
virtual bool setWrapTypeS(const WrapType type)
Sets the texture wrap type in s direction.
FrameType textureFrameType_
The frame type of the image data which is stored in the graphic hardware.
Definition Texture2D.h:140
~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:146
virtual bool hasTransparentPixel() const
Returns whether this texture contains at least one transparent pixel.
virtual FrameType textureFrameType() const
Returns the frame type of the image data which is stored in the graphic hardware.
FrameType sourceFrameType_
The frame type of the image which was provided for this texture.
Definition Texture2D.h:137
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:64
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