| 159 | // Called from XOpenDisplay(), unless a GLX function is called first |
| 160 | |
| 161 | void init(void) |
| 162 | { |
| 163 | static int init = 0; |
| 164 | |
| 165 | if(init) return; |
| 166 | GlobalCriticalSection::SafeLock l(globalMutex); |
| 167 | if(init) return; |
| 168 | init = 1; |
| 169 | |
| 170 | fconfig_reloadenv(); |
| 171 | if(strlen(fconfig.log) > 0) vglout.logTo(fconfig.log); |
| 172 | |
| 173 | if(fconfig.verbose) |
| 174 | vglout.println("[VGL] %s v%s %d-bit (Build %s)", __APPNAME, __VERSION, |
| 175 | (int)sizeof(size_t) * 8, __BUILD); |
| 176 | |
| 177 | if(getenv("VGL_DEBUG")) |
| 178 | { |
| 179 | vglout.print("[VGL] Attach debugger to process %d ...\n", getpid()); |
| 180 | fgetc(stdin); |
| 181 | } |
| 182 | if(fconfig.trapx11) XSetErrorHandler(xhandler); |
| 183 | } |
| 184 | |
| 185 | |
| 186 | Display *init3D(void) |
no test coverage detected