Lines Matching defs:wt
113 MakeNewTexture(struct winthread *wt)
225 resize(struct winthread *wt, int w, int h)
227 wt->NewSize = GL_TRUE;
228 wt->WinWidth = w;
229 wt->WinHeight = h;
231 SetEvent(wt->hEventRedraw);
239 draw_loop(struct winthread *wt)
249 SendMessage(wt->Win, WM_CLOSE, 0, 0);
258 events[0] = wt->hEventRedraw;
267 SendMessage(wt->Win, WM_CLOSE, 0, 0);
288 wglMakeCurrent(wt->hDC, wt->Context);
290 if (!wt->Initialized) {
291 printf("wglthreads: %d: GL_RENDERER = %s\n", wt->Index,
293 if (Texture /*&& wt->Index == 0*/) {
294 MakeNewTexture(wt);
296 wt->Initialized = GL_TRUE;
304 if (wt->NewSize) {
305 GLfloat w = (float) wt->WinWidth / (float) wt->WinHeight;
306 glViewport(0, 0, wt->WinWidth, wt->WinHeight);
313 wt->NewSize = GL_FALSE;
316 if (wt->MakeNewTexture) {
317 MakeNewTexture(wt);
318 wt->MakeNewTexture = GL_FALSE;
324 glRotatef(wt->Angle, 0, 1, 0);
325 glRotatef(wt->Angle, 1, 0, 0);
333 SwapBuffers(wt->hDC);
338 wt->Angle += 1.0;
344 keypress(WPARAM keySym, struct winthread *wt)
350 /*printf("exit draw_loop %d\n", wt->Index);*/
355 wt->MakeNewTexture = GL_TRUE;
383 struct winthread *wt = (struct winthread *)(INT_PTR)GetWindowLongPtr(hWnd, GWLP_USERDATA);
387 keypress(wParam, wt);
393 resize(wt, r.right, r.bottom);
410 create_window(struct winthread *wt, HGLRC shareCtx)
414 int xpos = (wt->Index % 8) * (width + 10);
415 int ypos = (wt->Index / 8) * (width + 20);
441 (LPVOID) wt);
446 SetWindowLongPtr(win, GWLP_USERDATA, (LONG_PTR)wt);
479 wt->Win = win;
480 wt->hDC = hdc;
481 wt->Context = ctx;
482 wt->Angle = 0.0;
483 wt->WinWidth = width;
484 wt->WinHeight = height;
485 wt->NewSize = GL_TRUE;
495 struct winthread *wt = (struct winthread *) p;
499 if(Texture && wt->Index > 0) {
500 WaitForSingleObject(WinThreads[wt->Index - 1].hEventInitialised, INFINITE);
506 share = (Texture && wt->Index > 0) ? WinThreads[0].Context : 0;
507 create_window(wt, share);
508 SetEvent(wt->hEventInitialised);
511 if(wt->Index < NumWinThreads - 1)
514 draw_loop(wt);