| 258 | |
| 259 | |
| 260 | int VirtualDrawable::init(int width, int height, VGLFBConfig config_) |
| 261 | { |
| 262 | if(!config_ || width < 1 || height < 1) THROW("Invalid argument"); |
| 263 | |
| 264 | if(edpy != EGL_NO_DISPLAY) |
| 265 | THROW("VirtualDrawable::init() method not supported with EGL/X11"); |
| 266 | |
| 267 | CriticalSection::SafeLock l(mutex); |
| 268 | if(oglDraw && oglDraw->getWidth() == width && oglDraw->getHeight() == height |
| 269 | && FBCID(oglDraw->getFBConfig()) == FBCID(config_)) |
| 270 | return 0; |
| 271 | oglDraw = new OGLDrawable(dpy, width, height, config_); |
| 272 | if(config && FBCID(config_) != FBCID(config) && ctx) |
| 273 | { |
| 274 | backend::destroyContext(dpy, ctx); ctx = 0; |
| 275 | } |
| 276 | config = config_; |
| 277 | return 1; |
| 278 | } |
| 279 | |
| 280 | |
| 281 | void VirtualDrawable::setDirect(Bool direct_) |
nothing calls this directly
no test coverage detected