mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Use Irrlicht functions to query npot texture support
This commit is contained in:
parent
de85bc9227
commit
08f1a7fbed
4 changed files with 10 additions and 48 deletions
|
@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "util/numeric.h"
|
||||
#include <cstdio>
|
||||
#include "client/renderingengine.h"
|
||||
#include "client/tile.h" // hasNPotSupport()
|
||||
|
||||
/* Maintain a static cache to store the images that correspond to textures
|
||||
* in a format that's manipulable by code. Some platforms exhibit issues
|
||||
|
@ -117,7 +116,7 @@ video::ITexture *guiScalingResizeCached(video::IVideoDriver *driver,
|
|||
#if ENABLE_GLES
|
||||
// Some platforms are picky about textures being powers of 2, so expand
|
||||
// the image dimensions to the next power of 2, if necessary.
|
||||
if (!hasNPotSupport()) {
|
||||
if (!driver->queryFeature(video::EVDF_TEXTURE_NPOT)) {
|
||||
video::IImage *po2img = driver->createImage(src->getColorFormat(),
|
||||
core::dimension2d<u32>(npot2((u32)destrect.getWidth()),
|
||||
npot2((u32)destrect.getHeight())));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue