Own legacy platform services on Web and Android
This commit is contained in:
@@ -16,6 +16,7 @@ App app;
|
||||
GLFWwindow* wnd;
|
||||
float theta = 0;
|
||||
glm::vec2 g_cursor_pos;
|
||||
std::unique_ptr<pp::platform::PlatformServices> g_platform_services;
|
||||
|
||||
template<typename F>
|
||||
class TaskCallback
|
||||
@@ -120,7 +121,7 @@ void StartApp()
|
||||
{
|
||||
App::I = &app;
|
||||
pp::platform::legacy::set_legacy_glfw_window(wnd);
|
||||
app.set_platform_services(&pp::platform::legacy::platform_services());
|
||||
app.set_platform_services(g_platform_services.get());
|
||||
app.initLog();
|
||||
app.create();
|
||||
app.width = 1024;
|
||||
@@ -197,6 +198,8 @@ void main_loop()
|
||||
|
||||
int main()
|
||||
{
|
||||
g_platform_services = pp::platform::legacy::create_platform_services();
|
||||
|
||||
if (glfwInit() != GL_TRUE)
|
||||
printf("Failed to init GLFW");
|
||||
wnd = glfwCreateWindow(1024, 768, "PanoPainter", nullptr, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user