mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-18 05:33:52 +01:00
CNullDriver: store real size for dummy textures
This commit is contained in:
parent
688debb643
commit
3152a6cc46
@ -725,7 +725,9 @@ video::ITexture* CNullDriver::findTexture(const io::path& filename)
|
||||
|
||||
ITexture* CNullDriver::createDeviceDependentTexture(const io::path& name, IImage* image)
|
||||
{
|
||||
return new SDummyTexture(name, ETT_2D);
|
||||
SDummyTexture* dummy = new SDummyTexture(name, ETT_2D);
|
||||
dummy->setSize(image->getDimension());
|
||||
return dummy;
|
||||
}
|
||||
|
||||
ITexture* CNullDriver::createDeviceDependentTextureCubemap(const io::path& name, const core::array<IImage*>& image)
|
||||
|
@ -783,6 +783,8 @@ namespace video
|
||||
{
|
||||
SDummyTexture(const io::path& name, E_TEXTURE_TYPE type) : ITexture(name, type) {};
|
||||
|
||||
void setSize(const core::dimension2d<u32>& size) { Size = OriginalSize = size; }
|
||||
|
||||
virtual void* lock(E_TEXTURE_LOCK_MODE mode = ETLM_READ_WRITE, u32 mipmapLevel=0, u32 layer = 0, E_TEXTURE_LOCK_FLAGS lockFlags = ETLF_FLIP_Y_UP_RTT) _IRR_OVERRIDE_ { return 0; }
|
||||
virtual void unlock()_IRR_OVERRIDE_ {}
|
||||
virtual void regenerateMipMapLevels(void* data = 0, u32 layer = 0) _IRR_OVERRIDE_ {}
|
||||
|
Loading…
Reference in New Issue
Block a user