Changeset 2996 for trunk/src/opengl/glut/glut_event.c
- Timestamp:
- Mar 4, 2000, 8:10:18 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/glut/glut_event.c
r2689 r2996 1 /* $Id: glut_event.c,v 1. 2 2000-02-09 08:46:09jeroen Exp $ */1 /* $Id: glut_event.c,v 1.3 2000-03-04 19:10:14 jeroen Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1997, 1998. */ 3 3 … … 100 100 int __glutWindowDamaged = 0; 101 101 102 void APIENTRY102 void GLAPIENTRY 103 103 glutIdleFunc(GLUTidleCB idleFunc) 104 104 { … … 106 106 } 107 107 108 void APIENTRY108 void GLAPIENTRY 109 109 glutTimerFunc(unsigned int interval, GLUTtimerCB timerFunc, int value) 110 110 { … … 204 204 205 205 /* CENTRY */ 206 void APIENTRY206 void GLAPIENTRY 207 207 glutPostRedisplay(void) 208 208 { … … 214 214 particularly useful when multiple windows need redisplays posted at 215 215 the same times. See also glutPostWindowOverlayRedisplay. */ 216 void APIENTRY216 void GLAPIENTRY 217 217 glutPostWindowRedisplay(int win) 218 218 { … … 1205 1205 __glutSetWindow(window); 1206 1206 1207 window->reshape(window->width, window->height); 1207 /* JvdH: DO NOT REMPVE THE EXPLICIT TYPECAST TO THIS GLAPIENTRY */ 1208 /* FUNCTION, OR THE COMPILER WILL NUKE THE STACK WHEN OPTIMIZING! */ 1209 /* VACPP obviously has a bug, and will adjust the ESP after the */ 1210 /* call, but the callee has already done so!!!! */ 1211 ((GLUTreshapeCB)(window->reshape))(window->width, window->height); 1208 1212 window->forceReshape = False; 1209 1210 #ifdef __WIN32OS2__1211 /* JvdH - 03/02/2000 */1212 /* FIXME: This is a rather stupid hack... */1213 /* The client area appears transparent... */1214 /* By twice swapping the ZORDER the client area is repainted... */1215 /* I'd like a better fix, but for now this seems to work */1216 SetWindowPos(window->win,1217 HWND_BOTTOM,1218 0,0,1219 0,0,1220 SWP_NOMOVE | SWP_NOSIZE);1221 1222 SetWindowPos(window->win,1223 HWND_TOP,1224 0,0,1225 0,0,1226 SWP_NOMOVE | SWP_NOSIZE);1227 #endif1228 1213 1229 1214 /* Setting the redisplay bit on the first reshape is … … 1234 1219 happens to the window. */ 1235 1220 workMask |= GLUT_REDISPLAY_WORK; 1236 } 1237 1221 1222 } 1238 1223 1239 1224 /* The code below is more involved than otherwise necessary … … 1260 1245 if (__glutMesaSwapHackSupport) { 1261 1246 if (window->usedSwapBuffers) { 1247 1262 1248 if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) { 1263 1249 SWAP_BUFFERS_WINDOW(window); … … 1282 1268 } 1283 1269 if (workMask & (GLUT_OVERLAY_REDISPLAY_WORK | GLUT_OVERLAY_REPAIR_WORK)) { 1270 1284 1271 window = __glutWindowList[num]; 1285 1272 if (window && window->overlay && … … 1306 1293 if (!window->overlay && window->usedSwapBuffers) { 1307 1294 if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) { 1295 1308 1296 SWAP_BUFFERS_WINDOW(window); 1309 1297 goto skippedDisplayCallback2; … … 1312 1300 } 1313 1301 /* Render to normal plane (and possibly overlay). */ 1302 1314 1303 __glutWindowDamaged = (workMask & (GLUT_OVERLAY_REPAIR_WORK | GLUT_REPAIR_WORK)); 1315 1304 __glutSetWindow(window); … … 1327 1316 1328 1317 if (workMask & GLUT_FINISH_WORK) { 1318 1329 1319 /* Finish work makes sure a glFinish gets done to indirect 1330 1320 rendering contexts. Indirect contexts tend to have much … … 1342 1332 /* Strip out dummy, finish, and debug work bits. */ 1343 1333 window->workMask &= ~(GLUT_DUMMY_WORK | GLUT_FINISH_WORK | GLUT_DEBUG_WORK); 1334 1335 WriteLog("GLUT32: processWindowWorkList -> will now return!\n"); 1336 1344 1337 if (window->workMask) { 1345 1338 /* Leave on work list. */ … … 1352 1345 1353 1346 /* CENTRY */ 1354 void APIENTRY1347 void GLAPIENTRY 1355 1348 glutMainLoop(void) 1356 1349 { 1350 WriteLog("GLUT32 MainLoop entered\n"); 1357 1351 #if !defined(_WIN32) && !defined(__WIN32OS2__) 1358 1352 if (!__glutDisplay) … … 1363 1357 "main loop entered with no windows created."); 1364 1358 for (;;) { 1359 WriteLog("GLUT32 --> LOOP in!\n"); 1365 1360 if (__glutWindowWorkList) { 1366 1361 GLUTwindow *remainder, *work; … … 1373 1368 *beforeEnd = __glutWindowWorkList; 1374 1369 __glutWindowWorkList = remainder; 1375 1370 } 1376 1371 } 1377 1372 } … … 1382 1377 waitForSomething(); 1383 1378 } else { 1379 WriteLog("Calling processEventsAndTimeouts from #1403\n"); 1384 1380 processEventsAndTimeouts(); 1385 } 1386 } 1387 } 1381 WriteLog("processEventsAndTimeouts from #1403 returned!\n"); 1382 } 1383 } 1384 } 1385 1386 WriteLog("MainLoop ended... ???\n"); 1388 1387 } 1389 1388 /* ENDCENTRY */
Note:
See TracChangeset
for help on using the changeset viewer.