public Component CreateCollisionComponent() { var component = new SceneComponent(new RawModel(ProxyModelLoader.LoadModel(CollisionBoxPath)), DefaultTexture, DefaultShader); ComponentCreator.AddComponentToRoot(component); return(component); }
public Actor CreateActor(string modelPath) { if (actor != null) { actor.CleanUp(); ComponentCreator.RemoveComponentFromRoot(actor); } actor = new Actor(new RenderCore.RawModel(ProxyModelLoader.LoadModel(modelPath)), DefaultTexture, DefaultShader); ComponentCreator.AddComponentToRoot(actor); return(actor); }
private void RenderBasePass() { if (PostConstructor) { CollisionBoxModel = new RawModel(ProxyModelLoader.LoadModel(CollisionBoxPath)); DefaultTexture = ProxyTextureLoader.LoadSingleTexture(ProjectFolders.TextureAtlasPath + "\\default.jpg"); DefaultShader = new BasicShader(ProjectFolders.ShadersPath + "\\basicVS.glsl", ProjectFolders.ShadersPath + "\\basicFS.glsl"); PostConstructor = false; } if (actor != null && !bComponentHierarchyIsDirty) { actor.Render(EditorCamera.ViewMatrix, projectionMatrix); } skybox.Render(EditorCamera.ViewMatrix, projectionMatrix); }