|
Polyphase Game Engine
|
#include <Texture.h>
Public Member Functions | |
| DECLARE_ASSET (Texture, Asset) | |
| Texture () | |
| virtual | ~Texture () |
| TextureResource * | GetResource () |
| virtual void | LoadStream (Stream &stream, Platform platform) override |
| virtual void | SaveStream (Stream &stream, Platform platform) override |
| virtual void | Create () override |
| virtual void | Destroy () override |
| virtual bool | Import (const std::string &path, ImportOptions *options) override |
| virtual void | GatherProperties (std::vector< Property > &outProps) override |
| virtual glm::vec4 | GetTypeColor () override |
| virtual const char * | GetTypeName () override |
| virtual const char * | GetTypeImportExt () override |
| void | Init (uint32_t width, uint32_t height, uint8_t *data) |
| void | UpdatePixels (const uint8_t *data, size_t byteSize) |
| void | SetMipmapped (bool mipmapped) |
| bool | IsMipmapped () const |
| bool | IsRenderTarget () const |
| bool | IsSrgb () const |
| bool | IsForcedHighQuality () const |
| uint32_t | GetWidth () const |
| uint32_t | GetHeight () const |
| uint32_t | GetMipLevels () const |
| uint32_t | GetLayers () const |
| PixelFormat | GetFormat () const |
| FilterType | GetFilterType () const |
| WrapMode | GetWrapMode () const |
| int32_t | GetLowQualityDownsampleFactor () const |
| glm::vec2 | GetUVMax () const |
| void | SetUVMax (glm::vec2 uvMax) |
| void | SetFormat (PixelFormat format) |
| void | SetFilterType (FilterType filterType) |
| void | SetWrapMode (WrapMode wrapMode) |
| void | SetForceHighQuality (bool forceHq) |
| const std::vector< uint8_t > & | GetPixels () const |
Public Member Functions inherited from Asset | |
| DECLARE_FACTORY_MANAGER (Asset) | |
| DECLARE_FACTORY (Asset, Asset) | |
| DECLARE_OBJECT (Asset, Object) | |
| Asset () | |
| virtual | ~Asset () |
| virtual void | Copy (Asset *srcAsset) |
| const std::string & | GetName () const |
| bool | IsLoaded () const |
| bool | IsRefCounted () const |
| int32_t | GetRefCount () const |
| bool | IsEmbedded () const |
| void | SetEmbedded (bool embed) |
| bool | IsEngineAsset () const |
| void | SetEngineAsset (bool engineAsset) |
| void | SetName (const std::string &name) |
| void | IncrementRefCount () |
| void | DecrementRefCount () |
| void | LoadFile (const char *path, AsyncLoadRequest *request=nullptr) |
| void | LoadEmbedded (const EmbeddedFile *embeddedAsset, AsyncLoadRequest *request=nullptr) |
| void | SaveFile (const char *path, Platform platform) |
| virtual bool | ShouldSnapshotForPie () const |
| bool | IsTransient () const |
| void | SetTransient (bool transient) |
| uint64_t | GetUuid () const |
| void | SetUuid (uint64_t uuid) |
| void | EnsureUuid () |
| void | WriteHeader (Stream &stream) |
Public Member Functions inherited from Object | |
| virtual | ~Object ()=default |
| virtual const char * | RuntimeName () const =0 |
| virtual const char * | RuntimeParentName () const =0 |
| virtual RuntimeId | InstanceRuntimeId () const =0 |
| virtual Object * | QueryInterface (RuntimeId id) const |
| virtual bool | Is (RuntimeId id) const |
| virtual bool | Is (const char *name) const |
| virtual bool | DrawCustomProperty (Property &prop) |
| template<typename T > | |
| T * | As () const |
| virtual bool | Equals (const Object *rhs) const |
Static Public Member Functions | |
| static bool | LoadFromMemory (const uint8_t *data, size_t size, Texture &out) |
| static bool | HandlePropChange (class Datum *datum, uint32_t index, const void *newValue) |
Static Public Member Functions inherited from Asset | |
| static AssetHeader | ReadHeader (Stream &stream) |
| static std::string | GetNameFromPath (const std::string &path) |
| static std::string | GetDirectoryFromPath (const std::string &path) |
| static const char * | GetNameFromTypeId (TypeId id) |
| static TypeId | GetTypeIdFromName (const char *name) |
Static Public Member Functions inherited from Object | |
| static const char * | ClassRuntimeName () |
Protected Attributes | |
| uint32_t | mWidth |
| uint32_t | mHeight |
| uint32_t | mMipLevels |
| uint32_t | mLayers |
| PixelFormat | mFormat |
| FilterType | mFilterType |
| WrapMode | mWrapMode |
| bool | mMipmapped |
| bool | mRenderTarget |
| bool | mSrgb |
| bool | mForceHighQuality |
| uint8_t | mLowQualityDownsampleFactor |
| glm::vec2 | mUvMax = glm::vec2(1.0f, 1.0f) |
| std::vector< uint8_t > | mPixels |
| TextureResource | mResource |
Protected Attributes inherited from Asset | |
| uint32_t | mVersion = 0 |
| TypeId | mType = INVALID_TYPE_ID |
| uint64_t | mUuid = 0 |
| bool | mEmbedded = false |
| bool | mLoaded = false |
| bool | mEnableRefCount = true |
| bool | mEngineAsset = false |
| bool | mTransient = false |
| std::string | mName = "Asset" |
| int32_t | mRefCount = 0 |
| Texture::Texture | ( | ) |
|
virtual |
|
overridevirtual |
Reimplemented from Asset.
|
overridevirtual |
Reimplemented from Asset.
|
overridevirtual |
Reimplemented from Asset.
| FilterType Texture::GetFilterType | ( | ) | const |
| PixelFormat Texture::GetFormat | ( | ) | const |
| uint32_t Texture::GetHeight | ( | ) | const |
| uint32_t Texture::GetLayers | ( | ) | const |
| int32_t Texture::GetLowQualityDownsampleFactor | ( | ) | const |
| uint32_t Texture::GetMipLevels | ( | ) | const |
|
inline |
| TextureResource * Texture::GetResource | ( | ) |
|
overridevirtual |
Reimplemented from Asset.
|
overridevirtual |
Reimplemented from Asset.
|
overridevirtual |
Reimplemented from Asset.
|
inline |
| uint32_t Texture::GetWidth | ( | ) | const |
| WrapMode Texture::GetWrapMode | ( | ) | const |
|
static |
|
overridevirtual |
Reimplemented from Asset.
| void Texture::Init | ( | uint32_t | width, |
| uint32_t | height, | ||
| uint8_t * | data | ||
| ) |
| bool Texture::IsForcedHighQuality | ( | ) | const |
| bool Texture::IsMipmapped | ( | ) | const |
| bool Texture::IsRenderTarget | ( | ) | const |
| bool Texture::IsSrgb | ( | ) | const |
|
static |
Reimplemented from Asset.
Reimplemented from Asset.
| void Texture::SetFilterType | ( | FilterType | filterType | ) |
| void Texture::SetForceHighQuality | ( | bool | forceHq | ) |
| void Texture::SetFormat | ( | PixelFormat | format | ) |
| void Texture::SetMipmapped | ( | bool | mipmapped | ) |
|
inline |
| void Texture::SetWrapMode | ( | WrapMode | wrapMode | ) |
| void Texture::UpdatePixels | ( | const uint8_t * | data, |
| size_t | byteSize | ||
| ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |