| 277 | // ----------------------------------------------------------------------- |
| 278 | |
| 279 | void Window::PrivateData::initPre(const uint width, const uint height, const bool resizable) |
| 280 | { |
| 281 | appData->windows.push_back(self); |
| 282 | appData->idleCallbacks.push_back(this); |
| 283 | memset(graphicsContext, 0, sizeof(graphicsContext)); |
| 284 | |
| 285 | if (view == nullptr) |
| 286 | { |
| 287 | d_stderr2("Failed to create Pugl view, everything will fail!"); |
| 288 | return; |
| 289 | } |
| 290 | |
| 291 | puglSetMatchingBackendForCurrentBuild(view); |
| 292 | puglSetHandle(view, this); |
| 293 | |
| 294 | puglSetViewHint(view, PUGL_RESIZABLE, resizable ? PUGL_TRUE : PUGL_FALSE); |
| 295 | puglSetViewHint(view, PUGL_IGNORE_KEY_REPEAT, PUGL_FALSE); |
| 296 | #if defined(DGL_USE_RGBA) && DGL_USE_RGBA |
| 297 | puglSetViewHint(view, PUGL_DEPTH_BITS, 24); |
| 298 | #else |
| 299 | puglSetViewHint(view, PUGL_DEPTH_BITS, 16); |
| 300 | #endif |
| 301 | puglSetViewHint(view, PUGL_STENCIL_BITS, 8); |
| 302 | |
| 303 | // PUGL_SAMPLES ?? |
| 304 | puglSetEventFunc(view, puglEventCallback); |
| 305 | |
| 306 | // setting size triggers system-level calls, do it last |
| 307 | puglSetSizeAndDefault(view, width, height); |
| 308 | } |
| 309 | |
| 310 | bool Window::PrivateData::initPost() |
| 311 | { |
nothing calls this directly
no test coverage detected