From 4fcec11b51014262960c16929e590deac34266c9 Mon Sep 17 00:00:00 2001 From: kallaballa Date: Mon, 25 Sep 2023 09:53:27 +0200 Subject: [PATCH] actually use the OFFSCREEN constant --- modules/v4d/samples/beauty-demo.cpp | 2 +- modules/v4d/samples/cube-demo.cpp | 2 +- modules/v4d/samples/many_cubes-demo.cpp | 2 +- modules/v4d/samples/nanovg-demo.cpp | 2 +- modules/v4d/samples/optflow-demo.cpp | 4 ++-- modules/v4d/samples/pedestrian-demo.cpp | 2 +- modules/v4d/samples/shader-demo.cpp | 2 -- modules/v4d/samples/video-demo.cpp | 2 +- 8 files changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/v4d/samples/beauty-demo.cpp b/modules/v4d/samples/beauty-demo.cpp index 112859518..64b79c4c5 100644 --- a/modules/v4d/samples/beauty-demo.cpp +++ b/modules/v4d/samples/beauty-demo.cpp @@ -333,7 +333,7 @@ int main(int argc, char **argv) { int main() { #endif using namespace cv::v4d; - cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Beautification Demo", false, false, 0); + cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Beautification Demo", OFFSCREEN, false, 0); window->printSystemInfo(); facemark->loadModel("assets/models/lbfmodel.yaml"); diff --git a/modules/v4d/samples/cube-demo.cpp b/modules/v4d/samples/cube-demo.cpp index 2baba78aa..af9fa0d70 100644 --- a/modules/v4d/samples/cube-demo.cpp +++ b/modules/v4d/samples/cube-demo.cpp @@ -241,7 +241,7 @@ static bool iteration(cv::Ptr window) { } int main() { - cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Cube Demo", false, false, 0); + cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Cube Demo", OFFSCREEN, false, 0); window->printSystemInfo(); #ifndef __EMSCRIPTEN__ //Creates a writer sink (which might be hardware accelerated) diff --git a/modules/v4d/samples/many_cubes-demo.cpp b/modules/v4d/samples/many_cubes-demo.cpp index 38558ec0e..111e39c53 100644 --- a/modules/v4d/samples/many_cubes-demo.cpp +++ b/modules/v4d/samples/many_cubes-demo.cpp @@ -254,7 +254,7 @@ static bool iteration(cv::Ptr window) { } int main() { - cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Many Cubes Demo", false, false, 0); + cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Many Cubes Demo", OFFSCREEN, false, 0); window->printSystemInfo(); #ifndef __EMSCRIPTEN__ diff --git a/modules/v4d/samples/nanovg-demo.cpp b/modules/v4d/samples/nanovg-demo.cpp index 530c13bfa..236f49fa4 100644 --- a/modules/v4d/samples/nanovg-demo.cpp +++ b/modules/v4d/samples/nanovg-demo.cpp @@ -182,7 +182,7 @@ int main(int argc, char **argv) { #else int main() { #endif - cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Mandelbrot Shader Demo", false, false, 0); + cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Mandelbrot Shader Demo", OFFSCREEN, false, 0); window->printSystemInfo(); #ifndef __EMSCRIPTEN__ diff --git a/modules/v4d/samples/optflow-demo.cpp b/modules/v4d/samples/optflow-demo.cpp index d2d1d60d4..19386fa28 100644 --- a/modules/v4d/samples/optflow-demo.cpp +++ b/modules/v4d/samples/optflow-demo.cpp @@ -479,9 +479,9 @@ int main(int argc, char **argv) { try { using namespace cv::v4d; - cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Sparse Optical Flow Demo", false, false, 0); + cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Sparse Optical Flow Demo", OFFSCREEN, false, 0); #ifndef __EMSCRIPTEN__ - miniWindow = V4D::make(270, 240, "Mini", false, false, 0); + miniWindow = V4D::make(270, 240, "Mini", OFFSCREEN, false, 0); #endif window->printSystemInfo(); window->setStretching(stretch); diff --git a/modules/v4d/samples/pedestrian-demo.cpp b/modules/v4d/samples/pedestrian-demo.cpp index b6273810e..f4ec116cb 100644 --- a/modules/v4d/samples/pedestrian-demo.cpp +++ b/modules/v4d/samples/pedestrian-demo.cpp @@ -235,7 +235,7 @@ int main(int argc, char **argv) { int main() { #endif using namespace cv::v4d; - cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Pedestrian Demo", false, false, 0); + cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Pedestrian Demo", OFFSCREEN, false, 0); hog.setSVMDetector(cv::HOGDescriptor::getDefaultPeopleDetector()); window->printSystemInfo(); diff --git a/modules/v4d/samples/shader-demo.cpp b/modules/v4d/samples/shader-demo.cpp index 4738da9d0..32e43e066 100644 --- a/modules/v4d/samples/shader-demo.cpp +++ b/modules/v4d/samples/shader-demo.cpp @@ -26,8 +26,6 @@ constexpr const char* OUTPUT_FILENAME = "shader-demo.mkv"; int glow_kernel_size = std::max(int(DIAG / 200 % 2 == 0 ? DIAG / 200 + 1 : DIAG / 200), 1); // Red, green, blue and alpha. All from 0.0f to 1.0f float base_color_val[4] = {0.2, 0.6, 1.0, 1.0}; -// Keep alpha separate for the GUI -float alpha = 1.0f; //0.0-1.0 //contrast boost int contrast_boost = 15; //0.0-255 //max fractal iterations diff --git a/modules/v4d/samples/video-demo.cpp b/modules/v4d/samples/video-demo.cpp index bc4160f3a..4cf823a09 100644 --- a/modules/v4d/samples/video-demo.cpp +++ b/modules/v4d/samples/video-demo.cpp @@ -218,7 +218,7 @@ int main(int argc, char** argv) { int main() { #endif using namespace cv::v4d; - cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Video Demo", false, false, 0); + cv::Ptr window = V4D::make(WIDTH, HEIGHT, "Video Demo", OFFSCREEN, false, 0); window->printSystemInfo(); #ifndef __EMSCRIPTEN__