From e782a9d343c3abe98663de9bda102b5eeae8cc02 Mon Sep 17 00:00:00 2001 From: kallaballa Date: Sat, 24 Jun 2023 09:40:02 +0200 Subject: [PATCH] comments --- modules/v4d/samples/cube-demo.cpp | 13 +++++-------- modules/v4d/samples/video-demo.cpp | 9 ++++++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/v4d/samples/cube-demo.cpp b/modules/v4d/samples/cube-demo.cpp index 13b3c35b7..3014b1894 100644 --- a/modules/v4d/samples/cube-demo.cpp +++ b/modules/v4d/samples/cube-demo.cpp @@ -6,7 +6,7 @@ #include //adapted from https://gitlab.com/wikibooks-opengl/modern-tutorials/-/blob/master/tut05_cube/cube.cpp -//Demo Parameters +//** Demo Parameters **/ constexpr long unsigned int WIDTH = 1280; constexpr long unsigned int HEIGHT = 720; constexpr bool OFFSCREEN = false; @@ -20,7 +20,7 @@ const int GLOW_KERNEL_SIZE = std::max(int(DIAG / 138 % 2 == 0 ? DIAG / 138 + 1 : using std::cerr; using std::endl; -//OpenGL constants and variables +/** OpenGL constants and variables **/ const unsigned int triangles = 12; const unsigned int vertices_index = 0; const unsigned int colors_index = 1; @@ -28,12 +28,12 @@ unsigned int shader_program; unsigned int vao; unsigned int uniform_transform; -//The centrals V4D objects +//The central V4D object cv::Ptr window; -//Simple transform and pass-through shaders +//Simple transform & pass-through shaders static GLuint load_shader() { - //Shader version 330 and 300 es is very similar. + //Shader versions "330" and "300 es" are very similar. //If you are careful you can write the same code for both versions. #if !defined(__EMSCRIPTEN__) && !defined(OPENCV_V4D_USE_ES3) const string shaderVersion = "330"; @@ -232,9 +232,6 @@ static bool iteration() { }); #endif - //Ignored in WebAssmebly builds because there is no sink set. - window->write(); - return window->display(); } diff --git a/modules/v4d/samples/video-demo.cpp b/modules/v4d/samples/video-demo.cpp index d05035329..c01eace9c 100644 --- a/modules/v4d/samples/video-demo.cpp +++ b/modules/v4d/samples/video-demo.cpp @@ -11,6 +11,10 @@ #include +using std::cerr; +using std::endl; + +/** Demo parameters **/ constexpr long unsigned int WIDTH = 1280; constexpr long unsigned int HEIGHT = 720; constexpr bool OFFSCREEN = false; @@ -21,9 +25,7 @@ constexpr double FPS = 60; constexpr const char* OUTPUT_FILENAME = "video-demo.mkv"; #endif -using std::cerr; -using std::endl; - +/**OpenGL contants and variables **/ const unsigned int triangles = 12; const unsigned int vertices_index = 0; const unsigned int colors_index = 1; @@ -197,6 +199,7 @@ static bool iteration() { }); #endif + //Ignored in WebAssmebly builds because there is no sink set. window->write(); return window->display();