1
0

Merging r6196 through r6248 from trunk to ogl-es branch

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6249 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2021-08-26 21:57:27 +00:00
parent 08a2846a93
commit 21302d038a
119 changed files with 9580 additions and 4362 deletions

View File

@@ -119,30 +119,30 @@ CSoftwareRenderTarget::CSoftwareRenderTarget(CSoftwareDriver* driver) : Driver(d
{
DriverType = EDT_SOFTWARE;
Texture.set_used(1);
Texture[0] = 0;
Textures.set_used(1);
Textures[0] = 0;
}
CSoftwareRenderTarget::~CSoftwareRenderTarget()
{
if (Texture[0])
Texture[0]->drop();
if (Textures[0])
Textures[0]->drop();
}
void CSoftwareRenderTarget::setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces)
void CSoftwareRenderTarget::setTextures(ITexture* const * textures, u32 numTextures, ITexture* depthStencil, const E_CUBE_SURFACE* cubeSurfaces, u32 numCubeSurfaces)
{
if (Texture != texture)
if (!Textures.equals(textures, numTextures))
{
ITexture* prevTexture = Texture[0];
ITexture* prevTexture = Textures[0];
bool textureDetected = false;
for (u32 i = 0; i < texture.size(); ++i)
for (u32 i = 0; i < numTextures; ++i)
{
if (texture[i] && texture[i]->getDriverType() == EDT_SOFTWARE)
if (textures[i] && textures[i]->getDriverType() == EDT_SOFTWARE)
{
Texture[0] = texture[i];
Texture[0]->grab();
Textures[0] = textures[i];
Textures[0]->grab();
textureDetected = true;
break;
@@ -153,13 +153,13 @@ void CSoftwareRenderTarget::setTexture(const core::array<ITexture*>& texture, IT
prevTexture->drop();
if (!textureDetected)
Texture[0] = 0;
Textures[0] = 0;
}
}
ITexture* CSoftwareRenderTarget::getTexture() const
{
return Texture[0];
return Textures[0];
}