|
wavelength 1.0.0
|
Texture, a bitmap loaded from a file or rendered to. More...
#include <rndtex.h>


Public Member Functions | |
| RndTex (const char *pszName) | |
| Construct an empty 32-bit texture without a file. | |
| ~RndTex () override | |
| Release the bitmap. | |
| void * | operator new (size_t nSize) |
| Allocate a texture, billed to the class name. | |
| void | operator delete (void *pBlock) |
| Release a texture. | |
| void | DumpText (PrnStream &stream) override |
| Write a description of the texture, and of its bitmap at a dump level of 2 or more. | |
| void | Save (BinStream &stream) override |
| Write the texture. | |
| void | Replace (RndObject *pFrom, RndObject *pTo) override |
| Do nothing, for a texture refers to no object. | |
| const char * | ClassName () const override |
| Report the class name. | |
| void | Copy (const RndObject *pSource, int nFlags) override |
| Copy the size, the format, and the file of another texture, then load the bitmap again. | |
| void | Load (BinStream &stream) override |
| Read what Save() wrote, or an earlier version of it, then load the bitmap. | |
| virtual RndBitmap * | LockBitmap (int nFlags) |
| Give access to the bitmap. | |
| virtual void | UnlockBitmap () |
| End an access LockBitmap() gave. | |
| virtual void | SyncBitmap () |
| Load the bitmap from the file, or allocate a blank one of the size and the format when there is no file. | |
| virtual void | ResetBitmap () |
| Release the bitmap. | |
| void | SetBitmap (int nWidth, int nHeight, int nBpp, const FilePath &file, int nMipMapK, int nRendered) |
| Set the size, the format, and the file, then load the bitmap. | |
| bool | CheckSize () |
| Report whether the size and the format are valid, with a notice when they are not unless a dimension is 0. | |
| const FilePath & | GetFile () const |
| int | GetHeight () const |
| int | GetMipMapK () const |
| int | GetWidth () const |
| Public Member Functions inherited from RndObject | |
| RndObject (const char *pszName) | |
| Construct an object and register it under a name. | |
| virtual | ~RndObject () |
| Notify every referrer, then erase the registration. | |
| void | SetName (const char *pszName) |
| Register the object under a different name. | |
| void | AddRef (RndObject *pReferrer) |
| Register an object as a store of a pointer to this one. | |
| void | RemoveRef (RndObject *pReferrer) |
| Drop the first registration AddRef() made for a referrer. | |
| const char * | GetName () const |
| const std::list< RndObject * > & | GetRefs () const |
| int | GetInternal () const |
| void | SetInternal (int nInternal) |
Static Public Member Functions | |
| static const char * | CheckDim (int nSize) |
| Report what is wrong with a texture dimension. | |
| static RndObject * | New (const char *pszName) |
| Create a texture. | |
Static Public Attributes | |
| static const char * | sClassName |
| The class name a .rnd file writes, Tex. | |
| static int | sRev |
| The format version Save() writes and Load() accepts. | |
| Static Public Attributes inherited from RndObject | |
| static constexpr int | kCopyChildLists = 0x200 |
| The bit of the Copy() flags that copies the child lists of the mix-ins. | |
Protected Attributes | |
| RndBitmap | mBitmap |
| int | mMipMapK |
| int | mRendered |
| int | mWidth |
| int | mHeight |
| int | mBpp |
| FilePath | mFile |
| Protected Attributes inherited from RndObject | |
| std::list< RndObject * > | mRefs |
| String | mName |
Texture, a bitmap loaded from a file or rendered to.
The RTTI includes the class name and records RndObject as the one base.
|
explicit |
Construct an empty 32-bit texture without a file.
| pszName | The registry key. |
|
override |
Release the bitmap.
|
inline |
Allocate a texture, billed to the class name.
| nSize | The object size the compiler supplies. |
|
inline |
Release a texture.
| pBlock | The block. |
|
overridevirtual |
Write a description of the texture, and of its bitmap at a dump level of 2 or more.
| stream | The stream to write to. |
Reimplemented from RndObject.
|
overridevirtual |
Write the texture.
| stream | The stream to write to. |
Implements RndObject.
Do nothing, for a texture refers to no object.
| pFrom | The object being replaced. |
| pTo | The replacement, or null. |
Implements RndObject.
|
inlineoverridevirtual |
Report the class name.
Implements RndObject.
|
overridevirtual |
Copy the size, the format, and the file of another texture, then load the bitmap again.
| pSource | The texture to copy from. |
| nFlags | The set of fields to copy. |
Implements RndObject.
|
overridevirtual |
|
inlinevirtual |
Give access to the bitmap.
The base body ignores the flags. The name is inferred.
| nFlags | The access the caller needs. |
Reimplemented in PsTex.
|
inlinevirtual |
End an access LockBitmap() gave.
The base body does nothing. The name is inferred.
Reimplemented in PsTex.
|
virtual |
Load the bitmap from the file, or allocate a blank one of the size and the format when there is no file.
An invalid size leaves the bitmap empty. The name is inferred.
Reimplemented in PsTex.
|
virtual |
Release the bitmap.
The name is inferred.
Reimplemented in PsTex.
| void RndTex::SetBitmap | ( | int | nWidth, |
| int | nHeight, | ||
| int | nBpp, | ||
| const FilePath & | file, | ||
| int | nMipMapK, | ||
| int | nRendered ) |
Set the size, the format, and the file, then load the bitmap.
| nWidth | The width. |
| nHeight | The height. |
| nBpp | The bits per pixel. |
| file | The file, or an empty path for none. |
| nMipMapK | The mipmap distance factor. |
| nRendered | Non-zero for a texture rendered to. |
|
static |
Report what is wrong with a texture dimension.
| nSize | The dimension. |
| bool RndTex::CheckSize | ( | ) |
Report whether the size and the format are valid, with a notice when they are not unless a dimension is 0.
|
inlinestatic |
Create a texture.
| pszName | The registry key. |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
The class name a .rnd file writes, Tex.
|
static |
|
protected |
The bitmap.
|
protected |
The mipmap distance factor.
|
protected |
Non-zero for a texture rendered to.
|
protected |
Width in pixels.
|
protected |
Height in pixels.
|
protected |
Bits per pixel.
|
protected |
The file the bitmap loads from.