You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
582 B
26 lines
582 B
#include <opencv2/v4d/v4d.hpp> |
|
|
|
int main() { |
|
using namespace cv; |
|
using namespace cv::viz; |
|
|
|
Ptr<V4D> v4d = V4D::make(Size(1280, 720), "GL Tetrahedron"); |
|
v4d->setVisible(true); |
|
|
|
v4d->gl([](const Size sz) { |
|
glViewport(0, 0, sz.width, sz.height); |
|
}); |
|
|
|
v4d->run([=]() { |
|
v4d->gl([]() { |
|
//Clears the screen blue |
|
glClearColor(0.0f, 0.0f, 1.0f, 1.0f); |
|
glClear(GL_COLOR_BUFFER_BIT); |
|
}); |
|
|
|
//If onscreen rendering is enabled it displays the framebuffer in the native window. |
|
//Returns false if the window was closed. |
|
return v4d->display(); |
|
}); |
|
} |
|
|
|
|