Home | History | Annotate | Download | only in eglut

Lines Matching refs:win

77 _eglutDestroyWindow(struct eglut_window *win)
80 eglDestroySurface(_eglut->dpy, win->surface);
82 _eglutNativeFiniWindow(win);
84 eglDestroyContext(_eglut->dpy, win->context);
131 struct eglut_window *win;
135 win = calloc(1, sizeof(*win));
136 if (!win)
139 win->config = _eglutChooseConfig();
161 win->context = eglCreateContext(_eglut->dpy,
162 win->config, EGL_NO_CONTEXT, context_attribs);
163 if (!win->context)
166 _eglutNativeInitWindow(win, title, x, y, w, h);
169 win->surface = eglCreateWindowSurface(_eglut->dpy,
170 win->config, win->native.u.window, NULL);
173 win->surface = eglCreatePixmapSurface(_eglut->dpy,
174 win->config, win->native.u.pixmap, NULL);
177 win->surface = win->native.u.surface;
182 if (win->surface == EGL_NO_SURFACE)
185 return win;
264 struct eglut_window *win = _eglut->current;
266 if (!win)
269 if (win->reshape_cb)
270 win->reshape_cb(win->native.width, win->native.height);
283 eglutDestroyWindow(int win)
287 if (window->index != win)
310 struct eglut_window *win;
312 win = _eglutCreateWindow(title, 0, 0,
315 win->index = _eglut->num_windows++;
316 win->reshape_cb = NULL;
317 win->display_cb = NULL;
318 win->keyboard_cb = _eglutDefaultKeyboard;
319 win->special_cb = NULL;
321 if (!eglMakeCurrent(_eglut->dpy, win->surface, win->surface, win->context))
323 _eglut->current = win;
325 return win->index;
331 struct eglut_window *win = _eglut->current;
332 return win->native.width;
338 struct eglut_window *win = _eglut->current;
339 return win->native.height;
345 struct eglut_window *win = _eglut->current;
346 win->display_cb = func;
353 struct eglut_window *win = _eglut->current;
354 win->reshape_cb = func;
360 struct eglut_window *win = _eglut->current;
361 win->keyboard_cb = func;
367 struct eglut_window *win = _eglut->current;
368 win->special_cb = func;