Use static string literals instead of String for scene IDs
This commit is contained in:
parent
3692736a61
commit
b3b69756e6
2 changed files with 8 additions and 6 deletions
|
|
@ -12,6 +12,9 @@ use raidillon_glium::GliumPlatform;
|
|||
const TEST_GLTF: &str = "pink-monkey.gltf";
|
||||
|
||||
const RENDERING_TEST_SYSTEM: &str = "rendering_test_system";
|
||||
|
||||
const MAIN_SCENE_ID: &str = "main_scene";
|
||||
|
||||
struct RenderingTestSystem;
|
||||
|
||||
impl System for RenderingTestSystem {
|
||||
|
|
@ -52,13 +55,12 @@ fn main() {
|
|||
engine.system_manager.add_system(RENDERING_TEST_SYSTEM, Box::new(RenderingTestSystem));
|
||||
|
||||
// Set up the scene
|
||||
let main_scene_id = "Main".to_owned();
|
||||
let main_scene = Scene::new(
|
||||
main_scene_id.clone(),
|
||||
MAIN_SCENE_ID.to_owned(),
|
||||
None,
|
||||
);
|
||||
engine.scene_manager.add_scene(main_scene_id.clone(), main_scene);
|
||||
engine.scene_manager.set_active_scene(main_scene_id.clone());
|
||||
engine.scene_manager.add_scene(MAIN_SCENE_ID, main_scene);
|
||||
engine.scene_manager.set_active_scene(MAIN_SCENE_ID);
|
||||
|
||||
#[cfg(feature = "glium")]
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue