Add some docs for mipmap level access.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3272 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2010-04-04 10:07:12 +00:00
parent 9e9e55a903
commit aa446ecbd1
1 changed files with 18 additions and 5 deletions

View File

@ -94,7 +94,11 @@ public:
pixels. After lock() has been called and all operations on the pixels
are done, you must call unlock().
Locks are not accumulating, hence one unlock will do for an arbitrary
number of previous locks.
number of previous locks. You should avoid locking different levels without
unlocking inbetween, though, because only the last level locked will be
unlocked.
The size of the i-th mipmap level is defined as max(getSize().Width>>i,1)
and max(getSize().Height>>i,1)
\param readOnly Specifies that no changes to the locked texture are
made. Unspecified behavior will arise if still write access happens.
\param mipmapLevel Number of the mipmapLevel to lock. 0 is main texture.
@ -105,7 +109,8 @@ public:
virtual void* lock(bool readOnly = false, u32 mipmapLevel=0) = 0;
//! Unlock function. Must be called after a lock() to the texture.
/** One should avoid to call unlock more than once before another lock. */
/** One should avoid to call unlock more than once before another lock.
The last locked mip level will be unlocked. */
virtual void unlock() = 0;
//! Get original size of the texture.
@ -133,7 +138,7 @@ public:
/** \return The color format of texture. */
virtual ECOLOR_FORMAT getColorFormat() const = 0;
//! Get pitch of texture (in bytes).
//! Get pitch of the main texture (in bytes).
/** The pitch is the amount of bytes used for a row of pixels in a
texture.
\return Pitch of texture in bytes. */
@ -149,11 +154,19 @@ public:
}
//! Regenerates the mip map levels of the texture.
/** Required after modifying the texture, usually after calling unlock(). */
/** Required after modifying the texture, usually after calling unlock().
\param mipmapData Optional parameter to pass in image data which will be
used instead of the previously stored or automatically generated mipmap
data. The data has to be a continuous pixel data for all mipmaps until
1x1 pixel. Each mipmap has to be half the width and height of the previous
level. At least one pixel will be always kept.*/
virtual void regenerateMipMapLevels(void* mipmapData=0) = 0;
//! Check whether the texture is a render target
/** \return True if this is a render target, otherwise false. */
/** Render targets can be set as such in the video driver, in order to
render a scene into the texture. Once unbound as render target, they can
be used just as usual textures again.
\return True if this is a render target, otherwise false. */
virtual bool isRenderTarget() const { return false; }
//! Get name of texture (in most cases this is the filename)