161 |
|
/* map the window */ |
162 |
|
XMapWindow(ourdisplay, gwind); |
163 |
|
dev_input(); /* sets size and view angles */ |
164 |
– |
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); |
164 |
|
/* allocate our leaf pile */ |
165 |
|
if (!qtAllocLeaves(2 * DisplayWidth(ourdisplay,ourscreen) * |
166 |
|
DisplayHeight(ourdisplay,ourscreen) / |
283 |
|
else |
284 |
|
apexh = 1. - ip[2]/(curzmax*DEPTHFACT); |
285 |
|
} |
286 |
< |
/* find closest cone match */ |
286 |
> |
rad *= 1.25; /* find conservative cone match */ |
287 |
|
for (ci = 0; ci < MAXCONE-1; ci++) |
288 |
|
if (cone[ci].rad >= rad) |
289 |
|
break; |
626 |
|
resizewindow(ersz) /* resize window */ |
627 |
|
register XConfigureEvent *ersz; |
628 |
|
{ |
629 |
+ |
glViewport(0, 0, ersz->width, ersz->height); |
630 |
+ |
|
631 |
|
if (ersz->width == odev.hres && ersz->height == odev.vres) |
632 |
|
return; |
633 |
|
|
636 |
|
|
637 |
|
odev.v.horiz = 2.*180./PI * atan(0.5/VIEWDIST*pwidth*odev.hres); |
638 |
|
odev.v.vert = 2.*180./PI * atan(0.5/VIEWDIST*pheight*odev.vres); |
638 |
– |
|
639 |
– |
glViewport(0, 0, odev.hres, odev.vres); |
639 |
|
|
640 |
|
inpresflags |= DFL(DC_SETVIEW); |
641 |
|
} |