MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / OGLDrawable

Method OGLDrawable

server/VirtualDrawable.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49// Pbuffer constructor
50
51VirtualDrawable::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

Callers

nothing calls this directly

Calls 2

createPbufferFunction · 0.85
create_windowFunction · 0.70

Tested by

no test coverage detected