mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge pull request #1201 from BeamNG/fix_old_projects
Fix non OpenGL builds with old projects.
This commit is contained in:
commit
128cca1479
2 changed files with 4 additions and 2 deletions
|
|
@ -150,6 +150,8 @@ bool CustomMaterial::onAdd()
|
||||||
getName(), samplerName.c_str(), mShaderDataName.c_str() ));
|
getName(), samplerName.c_str(), mShaderDataName.c_str() ));
|
||||||
Con::errorf(error);
|
Con::errorf(error);
|
||||||
|
|
||||||
|
pos = i;
|
||||||
|
|
||||||
#if TORQUE_OPENGL
|
#if TORQUE_OPENGL
|
||||||
GFXAssertFatal(0, error);
|
GFXAssertFatal(0, error);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -409,14 +409,14 @@ void ProcessedCustomMaterial::setTextureStages( SceneRenderState *state, const S
|
||||||
if ( !texObject )
|
if ( !texObject )
|
||||||
texObject = GFXTexHandle::ZERO;
|
texObject = GFXTexHandle::ZERO;
|
||||||
|
|
||||||
if ( handles->mRTParamsSC[i]->isValid() && texObject )
|
if ( handles->mRTParamsSC[samplerRegister]->isValid() && texObject )
|
||||||
{
|
{
|
||||||
const Point3I &targetSz = texObject->getSize();
|
const Point3I &targetSz = texObject->getSize();
|
||||||
const RectI &targetVp = texTarget->getViewport();
|
const RectI &targetVp = texTarget->getViewport();
|
||||||
Point4F rtParams;
|
Point4F rtParams;
|
||||||
|
|
||||||
ScreenSpace::RenderTargetParameters(targetSz, targetVp, rtParams);
|
ScreenSpace::RenderTargetParameters(targetSz, targetVp, rtParams);
|
||||||
shaderConsts->set(handles->mRTParamsSC[i], rtParams);
|
shaderConsts->set(handles->mRTParamsSC[samplerRegister], rtParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
GFX->setTexture( samplerRegister, texObject );
|
GFX->setTexture( samplerRegister, texObject );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue