Ignore:
Timestamp:
Mar 4, 2000, 8:10:18 PM (25 years ago)
Author:
jeroen
Message:

* empty log message *

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:09 jeroen Exp $ */
     1/* $Id: glut_event.c,v 1.3 2000-03-04 19:10:14 jeroen Exp $ */
    22/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1997, 1998. */
    33
     
    100100int __glutWindowDamaged = 0;
    101101
    102 void APIENTRY
     102void GLAPIENTRY
    103103glutIdleFunc(GLUTidleCB idleFunc)
    104104{
     
    106106}
    107107
    108 void APIENTRY
     108void GLAPIENTRY
    109109glutTimerFunc(unsigned int interval, GLUTtimerCB timerFunc, int value)
    110110{
     
    204204
    205205/* CENTRY */
    206 void APIENTRY
     206void GLAPIENTRY
    207207glutPostRedisplay(void)
    208208{
     
    214214   particularly useful when multiple windows need redisplays posted at
    215215   the same times.  See also glutPostWindowOverlayRedisplay. */
    216 void APIENTRY
     216void GLAPIENTRY
    217217glutPostWindowRedisplay(int win)
    218218{
     
    12051205      __glutSetWindow(window);
    12061206
    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);
    12081212      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 #endif
    12281213
    12291214      /* Setting the redisplay bit on the first reshape is
     
    12341219         happens to the window. */
    12351220      workMask |= GLUT_REDISPLAY_WORK;
    1236     }
    1237 
     1221
     1222    }
    12381223
    12391224    /* The code below is more involved than otherwise necessary
     
    12601245        if (__glutMesaSwapHackSupport) {
    12611246          if (window->usedSwapBuffers) {
     1247
    12621248            if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) {
    12631249              SWAP_BUFFERS_WINDOW(window);
     
    12821268      }
    12831269      if (workMask & (GLUT_OVERLAY_REDISPLAY_WORK | GLUT_OVERLAY_REPAIR_WORK)) {
     1270
    12841271        window = __glutWindowList[num];
    12851272        if (window && window->overlay &&
     
    13061293        if (!window->overlay && window->usedSwapBuffers) {
    13071294          if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) {
     1295
    13081296            SWAP_BUFFERS_WINDOW(window);
    13091297            goto skippedDisplayCallback2;
     
    13121300      }
    13131301      /* Render to normal plane (and possibly overlay). */
     1302
    13141303      __glutWindowDamaged = (workMask & (GLUT_OVERLAY_REPAIR_WORK | GLUT_REPAIR_WORK));
    13151304      __glutSetWindow(window);
     
    13271316
    13281317  if (workMask & GLUT_FINISH_WORK) {
     1318
    13291319    /* Finish work makes sure a glFinish gets done to indirect
    13301320       rendering contexts.  Indirect contexts tend to have much
     
    13421332  /* Strip out dummy, finish, and debug work bits. */
    13431333  window->workMask &= ~(GLUT_DUMMY_WORK | GLUT_FINISH_WORK | GLUT_DEBUG_WORK);
     1334
     1335    WriteLog("GLUT32: processWindowWorkList -> will now return!\n");
     1336
    13441337  if (window->workMask) {
    13451338    /* Leave on work list. */
     
    13521345
    13531346/* CENTRY */
    1354 void APIENTRY
     1347void GLAPIENTRY
    13551348glutMainLoop(void)
    13561349{
     1350  WriteLog("GLUT32 MainLoop entered\n");
    13571351#if !defined(_WIN32) && !defined(__WIN32OS2__)
    13581352  if (!__glutDisplay)
     
    13631357      "main loop entered with no windows created.");
    13641358  for (;;) {
     1359    WriteLog("GLUT32 --> LOOP in!\n");
    13651360    if (__glutWindowWorkList) {
    13661361      GLUTwindow *remainder, *work;
     
    13731368          *beforeEnd = __glutWindowWorkList;
    13741369          __glutWindowWorkList = remainder;
    1375         }
     1370       }
    13761371      }
    13771372    }
     
    13821377        waitForSomething();
    13831378      } else {
     1379    WriteLog("Calling processEventsAndTimeouts from #1403\n");
    13841380        processEventsAndTimeouts();
    1385       }
    1386     }
    1387   }
     1381    WriteLog("processEventsAndTimeouts from #1403 returned!\n");
     1382      }
     1383    }
     1384  }
     1385
     1386    WriteLog("MainLoop ended... ???\n");
    13881387}
    13891388/* ENDCENTRY */
Note: See TracChangeset for help on using the changeset viewer.