fixed opengl window
continuous-integration/drone/push Build encountered an error Details

master
Yorick GEOFFRE 3 years ago
parent 0fa2ce4d56
commit ddaca8978e

@ -16,12 +16,6 @@
#include "../../patterns/observer/observable.hpp"
#define DEFAULT_UI_WINDOW_AMOUNT 1 // 2 windows, one for each eye
#define DEFAULT_UI_OFFSET_X 1080 // 1080
#define DEFAULT_UI_OFFSET_Y 0
#define DEFAULT_UI_SIZE_X 1920 // psvr is 960x1080 per eye
#define DEFAULT_UI_SIZE_Y 1080
using namespace std;
using namespace cv;
using namespace cv::ogl;

@ -4,6 +4,7 @@
#include <opencv2/highgui.hpp>
#include <GL/glut.h>
#include <mutex>
#include "../../threadweaver/debugging.hpp"
/// @brief this class represents a single window, there should only ever be one if the app is in opengl mode.
class Window

@ -6,6 +6,7 @@ DisplayOutputNode::DisplayOutputNode(PipelineNode* predecessor, Window *managed)
isLast = true;
//output = NULL;
cost = 2;
inited = false;
}
void DisplayOutputNode::processFrame()
@ -14,10 +15,12 @@ void DisplayOutputNode::processFrame()
if (!inited)
{
#ifdef OGLWIN
namedWindow(_managed->myWindow, WINDOW_OPENGL);
DEBUG_LOG("DisplayOutputNode on thread " << localThread->get_id() << " is creating its opengl UI");
cv::namedWindow(_managed->myWindow, cv::WINDOW_OPENGL);
setWindowProperty(_managed->myWindow, cv::WND_PROP_FULLSCREEN, cv::WINDOW_FULLSCREEN);
cv::setOpenGlContext(_managed->myWindow);
moveWindow(_managed->myWindow, DEFAULT_UI_OFFSET_X + 960, DEFAULT_UI_OFFSET_Y);
cv::moveWindow(_managed->myWindow, DEFAULT_UI_OFFSET_X + 960, DEFAULT_UI_OFFSET_Y);
DEBUG_LOG("DisplayOutputNode on thread " << localThread->get_id() << " is done creating its opengl UI");
#endif
inited = true;
}

Binary file not shown.

@ -4,7 +4,7 @@
//#define DBGMODE
#define DBGCOMM
//#define OGLWIN
#define OGLWIN
#define GFXCORE 0
#define DISPLAYCORE 1
#define CAMCORE 2
@ -16,6 +16,12 @@
#define FPS_LIMIT_PSEYE 60 //increments of 15, valid values: 0-15-30-60
#define DEFAULT_UI_WINDOW_AMOUNT 1 // 2 windows, one for each eye
#define DEFAULT_UI_OFFSET_X 1080 // 1080
#define DEFAULT_UI_OFFSET_Y 0
#define DEFAULT_UI_SIZE_X 1920 // psvr is 960x1080 per eye
#define DEFAULT_UI_SIZE_Y 1080
#define QU(x) #x
#define QUH(x) QU(x)

Loading…
Cancel
Save