Skip to content

Commit 4bd6000

Browse files
authored
Merge pull request #1418 from johnhaddon/glFix
ShaderStateComponent : Handle ToGLTextureConverter exceptions
2 parents d7d3769 + f233bdd commit 4bd6000

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Changes

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Fixes
55
-----
66

77
- ShaderNetworkAlgo : Fixed crash caused by cyclic connections in `removeUnusedShaders()`.
8+
- ShaderStateComponent : Fixed GL rendering failures caused by unsupported values for texture parameters.
89

910
10.5.7.1 (relative to 10.5.7.0)
1011
========

src/IECoreGL/ShaderStateComponent.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,14 @@ class ShaderStateComponent::Implementation : public IECore::RefCounted
139139
it->second->typeId() == IECore::SplinefColor3fData::staticTypeId()
140140
)
141141
{
142-
texture = IECore::runTimeCast<const Texture>( CachedConverter::defaultCachedConverter()->convert( it->second.get() ) );
142+
try
143+
{
144+
texture = IECore::runTimeCast<const Texture>( CachedConverter::defaultCachedConverter()->convert( it->second.get() ) );
145+
}
146+
catch( const std::exception &e )
147+
{
148+
IECore::msg( IECore::Msg::Error, "ShaderStateComponent", e.what() );
149+
}
143150
}
144151
else if( it->second->typeId() == IECore::StringData::staticTypeId() )
145152
{

0 commit comments

Comments
 (0)