turms out :cdo isn't the best
This commit is contained in:
@@ -22,12 +22,12 @@
|
|||||||
|
|
||||||
namespace inferno {
|
namespace inferno {
|
||||||
|
|
||||||
std::unique_ptr<InfernoApp> inferno_create()
|
InfernoApp* inferno_create()
|
||||||
{
|
{
|
||||||
// MOTD
|
// MOTD
|
||||||
yolo::info("INFERNO HART v" INFERNO_VERSION);
|
yolo::info("INFERNO HART v" INFERNO_VERSION);
|
||||||
|
|
||||||
std::unique_ptr<InfernoApp> app = new InfernoApp;
|
InfernoApp* app = new InfernoApp;
|
||||||
app->Input = new InfernoInput;
|
app->Input = new InfernoInput;
|
||||||
|
|
||||||
// Create window
|
// Create window
|
||||||
@@ -36,11 +36,11 @@ std::unique_ptr<InfernoApp> inferno_create()
|
|||||||
// setup the scene
|
// setup the scene
|
||||||
scene::Material basicMaterial("basic");
|
scene::Material basicMaterial("basic");
|
||||||
|
|
||||||
std::unique_ptr<graphics::Shader> basicShader = graphics::shader_create();
|
graphics::Shader* basicShader = graphics::shader_create();
|
||||||
graphics::shader_load(basicShader, "res/shaders/basic.glsl");
|
graphics::shader_load(basicShader, "res/shaders/basic.glsl");
|
||||||
graphics::shader_link(basicShader);
|
graphics::shader_link(basicShader);
|
||||||
|
|
||||||
std::unique_ptr<scene::SceneObject> object = scene::scene_object_create();
|
scene::SceneObject* object = scene::scene_object_create();
|
||||||
|
|
||||||
scene::Mesh cornell;
|
scene::Mesh cornell;
|
||||||
cornell.loadOBJ("res/cornell-box.obj");
|
cornell.loadOBJ("res/cornell-box.obj");
|
||||||
@@ -54,7 +54,7 @@ std::unique_ptr<InfernoApp> inferno_create()
|
|||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
|
||||||
void inferno_cleanup(std::unique_ptr<InfernoApp>& app)
|
void inferno_cleanup(InfernoApp* app)
|
||||||
{
|
{
|
||||||
graphics::window_cleanup();
|
graphics::window_cleanup();
|
||||||
app.reset();
|
app.reset();
|
||||||
@@ -72,7 +72,7 @@ static void inferno_gui_help_marker(const char* desc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void inferno_preset_gui(std::unique_ptr<InfernoApp>& app)
|
void inferno_preset_gui(InfernoApp* app)
|
||||||
{
|
{
|
||||||
ImGuiID dockspace_id = ImGui::GetID("main");
|
ImGuiID dockspace_id = ImGui::GetID("main");
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ void inferno_preset_gui(std::unique_ptr<InfernoApp>& app)
|
|||||||
yolo::info("LAYOUT SET TO DEFAULT");
|
yolo::info("LAYOUT SET TO DEFAULT");
|
||||||
}
|
}
|
||||||
|
|
||||||
void inferno_move_input(std::unique_ptr<InfernoApp>& app)
|
void inferno_move_input(InfernoApp* app)
|
||||||
{
|
{
|
||||||
static GLFWcursor* cursor = glfwCreateStandardCursor(GLFW_HAND_CURSOR);
|
static GLFWcursor* cursor = glfwCreateStandardCursor(GLFW_HAND_CURSOR);
|
||||||
glfwSetCursor(graphics::window_get_glfw_window(), cursor);
|
glfwSetCursor(graphics::window_get_glfw_window(), cursor);
|
||||||
@@ -128,13 +128,13 @@ void inferno_move_input(std::unique_ptr<InfernoApp>& app)
|
|||||||
app->Input->MovementDelta |= 0b00000100;
|
app->Input->MovementDelta |= 0b00000100;
|
||||||
}
|
}
|
||||||
|
|
||||||
void inferno_stop_move_input(std::unique_ptr<InfernoApp>& app)
|
void inferno_stop_move_input(InfernoApp* app)
|
||||||
{
|
{
|
||||||
app->Input->MovementDelta = 0x0;
|
app->Input->MovementDelta = 0x0;
|
||||||
app->Input->MouseDelta = { 0.0f, 0.0f };
|
app->Input->MouseDelta = { 0.0f, 0.0f };
|
||||||
}
|
}
|
||||||
|
|
||||||
int inferno_run(std::unique_ptr<InfernoApp>& app)
|
int inferno_run(InfernoApp* app)
|
||||||
{
|
{
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!graphics::window_new_frame())
|
if (!graphics::window_new_frame())
|
||||||
|
|||||||
Reference in New Issue
Block a user