| 49 | // Pbuffer constructor |
| 50 | |
| 51 | VirtualDrawable::OGLDrawable::OGLDrawable(Display *dpy_, int width_, |
| 52 | int height_, VGLFBConfig config_) : cleared(false), stereo(false), |
| 53 | glxDraw(0), dpy(dpy_), edpy(EGL_NO_DISPLAY), width(width_), height(height_), |
| 54 | depth(0), config(config_), glFormat(0), pm(0), win(0), isPixmap(false) |
| 55 | { |
| 56 | if(!config_ || width_ < 1 || height_ < 1) THROW("Invalid argument"); |
| 57 | |
| 58 | int pbattribs[] = { GLX_PBUFFER_WIDTH, width, GLX_PBUFFER_HEIGHT, height, |
| 59 | GLX_PRESERVED_CONTENTS, True, None }; |
| 60 | glxDraw = backend::createPbuffer(dpy, config, pbattribs); |
| 61 | if(!glxDraw) THROW("Could not create Pbuffer"); |
| 62 | |
| 63 | setVisAttribs(); |
| 64 | } |
| 65 | |
| 66 | |
| 67 | // EGL Pbuffer constructor |
nothing calls this directly
no test coverage detected