add command line interface handler and implement convert command from pano to jpg

This commit is contained in:
2017-11-04 16:04:22 +00:00
parent b49414bcd6
commit 2baaff10cc
9 changed files with 142 additions and 56 deletions

16
engine/app_commands.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include "pch.h"
#include "app.h"
#include "canvas.h"
void App::cmd_convert(std::string pano_path, std::string out_path)
{
glDisable(GL_DEPTH_TEST);
glEnable(GL_PROGRAM_POINT_SIZE);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBlendEquation(GL_FUNC_ADD);
ui::Canvas* canvas = new ui::Canvas;
canvas->create(CANVAS_RES, CANVAS_RES);
canvas->project_open_thread(pano_path);
canvas->export_equirectangular_thread(out_path);
}