53 : SoWinExaminerViewer(parent, (char *)NULL, false), viewerType(type), simu(_simu)
54#elif defined(VISP_HAVE_SOQT)
56 : SoQtExaminerViewer(parent, (char *)NULL, false), viewerType(type), simu(_simu)
57#elif defined(VISP_HAVE_SOXT)
59 : SoXtExaminerViewer(parent, (char *)NULL, false), viewerType(type), simu(_simu)
65 this->setClearBeforeRender(FALSE, TRUE);
76 const SbViewportRegion
vp = this->getViewportRegion();
77 SbVec2s origin =
vp.getViewportOriginPixels();
78 SbVec2s size =
vp.getViewportSizePixels();
79 glViewport(origin[0], origin[1], size[0], size[1]);
81 const SbColor col = this->getBackgroundColor();
82 glClearColor(col[0], col[1], col[2], 0.0f);
83 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
87 if (simu->image_background != NULL) {
88 glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
90 glDrawPixels((GLsizei)simu->getInternalWidth(), (GLsizei)simu->getInternalHeight(), (GLenum)GL_LUMINANCE,
91 GL_UNSIGNED_BYTE, simu->image_background);
93 glDrawPixels((GLsizei)simu->getInternalWidth(), (GLsizei)simu->getInternalHeight(), (GLenum)GL_RGB,
94 GL_UNSIGNED_BYTE, simu->image_background);
96 glEnable(GL_DEPTH_TEST);
97 glClear(GL_DEPTH_BUFFER_BIT);
101#if defined(VISP_HAVE_SOWIN)
102 SoWinExaminerViewer::actualRedraw();
103#elif defined(VISP_HAVE_SOQT)
104 SoQtExaminerViewer::actualRedraw();
105#elif defined(VISP_HAVE_SOXT)
106 SoXtExaminerViewer::actualRedraw();
111 glReadPixels(0, 0, (GLsizei)simu->getInternalWidth(), (GLsizei)simu->getInternalHeight(), (GLenum)GL_RGB,
112 GL_UNSIGNED_BYTE, simu->bufferView);
136#if defined(VISP_HAVE_SOWIN)
137 HWND parent = getParentWidget();
139 RECT rcClient, rcWindow;
141 GetClientRect(parent, &rcClient);
142 GetWindowRect(parent, &rcWindow);
143 ptDiff.x = (rcWindow.right - rcWindow.left) - rcClient.right;
144 ptDiff.y = (rcWindow.bottom - rcWindow.top) - rcClient.bottom;
145 MoveWindow(parent, rcWindow.left, rcWindow.top, x + ptDiff.x, y + ptDiff.y, TRUE);
147 DWORD dwStyle = GetWindowLong(parent, GWL_STYLE);
148 dwStyle &= ~(WS_SIZEBOX);
149 SetWindowLong(parent, GWL_STYLE, dwStyle);
151#elif defined(VISP_HAVE_SOQT)
153 QWidget *parent = getParentWidget();
154 parent->setFixedSize(x, y);