indicate model loading failure by nomodel.png

This commit is contained in:
Garux
2025-10-22 21:16:58 +05:00
parent 4705d56a84
commit 374c3fc239
6 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -354,7 +354,7 @@ private:
*j++ = i;
}
m_shader = "";
m_shader = "nomodel";
UpdateAABB();
}
+1 -1
View File
@@ -548,7 +548,7 @@ inline void Model_constructNull( Model& model ){
surface.indices().insert( *i );
}
surface.setShader( "" );
surface.setShader( "nomodel" );
surface.updateAABB();
+1 -1
View File
@@ -293,7 +293,7 @@ private:
*j++ = *i;
}
m_shader = "";
m_shader = "nomodel";
UpdateAABB();
}
+4 -1
View File
@@ -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 );
}
+2 -2
View File
@@ -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 {
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB