diff --git a/plugins/assmodel/model.cpp b/plugins/assmodel/model.cpp index d9fe8eba..5d0aca17 100644 --- a/plugins/assmodel/model.cpp +++ b/plugins/assmodel/model.cpp @@ -354,7 +354,7 @@ private: *j++ = i; } - m_shader = ""; + m_shader = "nomodel"; UpdateAABB(); } diff --git a/plugins/md3model/model.h b/plugins/md3model/model.h index 43a542ae..7fcf3f8d 100644 --- a/plugins/md3model/model.h +++ b/plugins/md3model/model.h @@ -548,7 +548,7 @@ inline void Model_constructNull( Model& model ){ surface.indices().insert( *i ); } - surface.setShader( "" ); + surface.setShader( "nomodel" ); surface.updateAABB(); diff --git a/plugins/model/model.cpp b/plugins/model/model.cpp index 8338f385..5a154215 100644 --- a/plugins/model/model.cpp +++ b/plugins/model/model.cpp @@ -293,7 +293,7 @@ private: *j++ = *i; } - m_shader = ""; + m_shader = "nomodel"; UpdateAABB(); } diff --git a/plugins/shaders/shaders.cpp b/plugins/shaders/shaders.cpp index 80af4a40..32f23c68 100644 --- a/plugins/shaders/shaders.cpp +++ b/plugins/shaders/shaders.cpp @@ -955,7 +955,10 @@ public: if ( m_pTexture->texture_number == 0 ) { m_notfound = m_pTexture; - const auto name = StringStream( GlobalRadiant().getAppPath(), "bitmaps/", ( IsDefault() ? "notex.png" : "shadernotex.png" ) ); + const auto name = StringStream( GlobalRadiant().getAppPath(), "bitmaps/", + ( string_equal( m_template.getName(), "nomodel" )? "nomodel.png" + : IsDefault() ? "notex.png" + : "shadernotex.png" ) ); m_pTexture = GlobalTexturesCache().capture( LoadImageCallback( 0, loadBitmap ), name ); } diff --git a/radiant/nullmodel.cpp b/radiant/nullmodel.cpp index 365b3456..de090113 100644 --- a/radiant/nullmodel.cpp +++ b/radiant/nullmodel.cpp @@ -47,10 +47,10 @@ class NullModel : RenderableWireframeAABB m_aabb_wire; public: NullModel() : m_aabb_local( Vector3( 0, 0, 0 ), Vector3( 8, 8, 8 ) ), m_aabb_solid( m_aabb_local ), m_aabb_wire( m_aabb_local ){ - m_state = GlobalShaderCache().capture( "" ); + m_state = GlobalShaderCache().capture( "nomodel" ); } ~NullModel(){ - GlobalShaderCache().release( "" ); + GlobalShaderCache().release( "nomodel" ); } VolumeIntersectionValue intersectVolume( const VolumeTest& volume, const Matrix4& localToWorld ) const override { diff --git a/setup/data/tools/bitmaps/nomodel.png b/setup/data/tools/bitmaps/nomodel.png new file mode 100644 index 00000000..dd923023 Binary files /dev/null and b/setup/data/tools/bitmaps/nomodel.png differ