mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-06 02:10:42 +01:00
CSoftwareTexture::lock no longer returns image data when a mipmapLevel is requested
Returns now getMipMapsData instead which for now will always be 0 in this case (but might work one day) Also removing comment about ITexture::lock() mipmapLevel parameter being broken. It got fixed in November 2019. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6563 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
614308e19c
commit
2b08c37f89
|
@ -211,8 +211,7 @@ public:
|
||||||
only mode or read from in write only mode.
|
only mode or read from in write only mode.
|
||||||
Support for this feature depends on the driver, so don't rely on the
|
Support for this feature depends on the driver, so don't rely on the
|
||||||
texture being write-protected when locking with read-only, etc.
|
texture being write-protected when locking with read-only, etc.
|
||||||
\param mipmapLevel NOTE: Currently broken, sorry, we try if we can repair it for 1.9 release.
|
\param mipmapLevel Number of the mipmapLevel to lock. 0 is main texture.
|
||||||
Number of the mipmapLevel to lock. 0 is main texture.
|
|
||||||
Non-existing levels will silently fail and return 0.
|
Non-existing levels will silently fail and return 0.
|
||||||
\param layer It determines which cubemap face or texture array layer should be locked.
|
\param layer It determines which cubemap face or texture array layer should be locked.
|
||||||
\param lockFlags See E_TEXTURE_LOCK_FLAGS documentation.
|
\param lockFlags See E_TEXTURE_LOCK_FLAGS documentation.
|
||||||
|
|
|
@ -78,7 +78,10 @@ CSoftwareTexture::~CSoftwareTexture()
|
||||||
//! lock function
|
//! lock function
|
||||||
void* CSoftwareTexture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel, u32 layer, E_TEXTURE_LOCK_FLAGS lockFlags)
|
void* CSoftwareTexture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel, u32 layer, E_TEXTURE_LOCK_FLAGS lockFlags)
|
||||||
{
|
{
|
||||||
|
if ( mipmapLevel == 0 )
|
||||||
return Image->getData();
|
return Image->getData();
|
||||||
|
else
|
||||||
|
return Image->getMipMapsData(mipmapLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Tests finished. 72 tests of 72 passed.
|
Tests finished. 72 tests of 72 passed.
|
||||||
Compiled as DEBUG
|
Compiled as DEBUG
|
||||||
Test suite pass at GMT Fri Sep 22 15:57:32 2023
|
Test suite pass at GMT Tue Oct 17 17:50:36 2023
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user