void PointCloudApplication::setup_graphics() { // Define Viewport glViewport(0, 0, context.viewport_width * ui_scale_factor, context.viewport_height * ui_scale_factor); setup_video_texture(); logo_texture = read_png_texture("pointcloud-logo.png"); point_texture = read_png_texture("trackpoint.png"); switch_to_ortho(); }
App::App(int viewport_width, int viewport_height, int video_width, int video_height, pointcloud_video_format video_format, const char* resource_path, const char* documents_path, const char* device, double ui_scale_factor) : PointCloudApplication(viewport_width, viewport_height, video_width, video_height, video_format, resource_path, documents_path, device, ui_scale_factor) { setup_cuboid(); // Add images to look for (detection will not start until images are activated, though) std::string image_target_1_path = resource_path + std::string("image_target_1.model"); std::string image_target_2_path = resource_path + std::string("image_target_2.model"); pointcloud_add_image_target("image_1", image_target_1_path.c_str(), 0.3, -1); pointcloud_add_image_target("image_2", image_target_2_path.c_str(), 0.3, -1); // Create the texture used for the UI ui_texture = read_png_texture("ui.png", true); }