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

@@ -698,12 +698,6 @@ bool CD3D9Driver::setActiveTexture(u32 stage, const video::ITexture* texture)
if (CurrentTexture[stage] == texture)
return true;
if (texture && texture->getDriverType() != EDT_DIRECT3D9)
{
os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR);
return false;
}
CurrentTexture[stage] = texture;
if (!texture)
@@ -711,13 +705,20 @@ bool CD3D9Driver::setActiveTexture(u32 stage, const video::ITexture* texture)
pID3DDevice->SetTexture(stage, 0);
pID3DDevice->SetTextureStageState( stage, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE );
}
else
else if (texture->getDriverType() == EDT_DIRECT3D9)
{
pID3DDevice->SetTexture(stage, ((const CD3D9Texture*)texture)->getDX9BaseTexture());
if (stage <= 4)
if (((const CD3D9Texture*)texture)->HasVertexTextureSupport() && stage < 4 )
pID3DDevice->SetTexture(D3DVERTEXTEXTURESAMPLER0 + stage, ((const CD3D9Texture*)texture)->getDX9BaseTexture());
}
else
{
os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR);
setActiveTexture(stage, 0);
return false;
}
return true;
}
@@ -909,13 +910,6 @@ void CD3D9Driver::setViewPort(const core::rect<s32>& area)
}
//! gets the area of the current viewport
const core::rect<s32>& CD3D9Driver::getViewPort() const
{
return ViewPort;
}
bool CD3D9Driver::updateVertexHardwareBuffer(SHWBufferLink_d3d9 *hwBuffer)
{
if (!hwBuffer)