File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
examples/app/vsgshadertoy Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ void mainImage( out vec4 fragColor, in vec2 fragCoord )
8686}
8787)" ;
8888
89- // The default shader is composed of three dancing spheres
9089string shaderToyToFragmentShader (const string& toyShader)
9190{
9291 return R"(
@@ -257,15 +256,9 @@ int main(int argc, char** argv)
257256 }
258257 else {
259258 toyShader = readFile (argv[1 ]);
260- string title;
261- // extract the filename from the path
262- auto pos = string (argv[1 ]).find_last_of (" /" );
263- if (pos != string::npos)
264- title = string (argv[1 ]).substr (pos+1 );
265- else
266- title = argv[1 ];
267-
268- windowTraits->windowTitle = title;
259+ vsg::Path filePath (argv[1 ]);
260+
261+ windowTraits->windowTitle = vsg::simpleFilename (filePath) + vsg::fileExtension (filePath);
269262 }
270263
271264
You can’t perform that action at this time.
0 commit comments