[nostalgia/core] Remove renderer funcions from Context friends

This commit is contained in:
2022-02-03 20:48:58 -06:00
parent 8174d04b06
commit c7cd54ae52
6 changed files with 22 additions and 24 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ ox::Error run(Context *ctx) noexcept {
glfwSwapBuffers(id->window);
}
// destroy GLFW window
oxReturnError(renderer::shutdown(ctx));
oxReturnError(renderer::shutdown(ctx, ctx->rendererData<void>()));
glfwDestroyWindow(id->window);
ctx->setWindowerData(nullptr);
delete id;
+4 -1
View File
@@ -66,7 +66,10 @@ ox::Error initGfx(Context *ctx) noexcept {
//io.MouseDrawCursor = true;
ImGui_ImplGlfw_InitForOpenGL(id->window, true);
}
return renderer::init(ctx);
void *rendererData = nullptr;
oxReturnError(renderer::init(ctx, &rendererData));
ctx->setRendererData(rendererData);
return OxError(0);
}
void setWindowTitle(Context *ctx, const char *title) noexcept {