   mouse event (SDL) with OpenGL causing massive slowdown?
  I honestly don't get what could be happening, so I was hoping the error might be something commong to SDL that someone might know of.I've got an OpenGL app running on a *very* old system (which is running CentOS linux), software rendering somewhere in the order of only 2400 quads (forming a multicolored square). The demo is very simple, with a 2d view, courtesy of Ortho2d. With the SDL I've been able to trap keyboard events, allowing me to move said object around, grow and reduce the object by various factors, all with reasonable speed. I just added the ability to trap mouse clicks, such that when you click, the mouse's x and y coords are translated to a location on the structure, and it echoes these (via cout) to the terminal from which I ran the demo.Now, I've been couting debug data to the terminal without event, so I don't believe that's the problem. And this demo has been running quite well until the mouse came into play.First click, the position gets couted to the screen. Very very often (but not every time, say 19 times out of 20) the demo very nearly stops responding after that first click. I say very nearly because it's like some inconsistant delay of five to fifty seconds before *any* sort of response will come out of the demo, be it a move, a grow, a shrink, or another click.I poll for events with SDL_PollEvent(), and switch on event.type, which is how I've been capturing keypresses, and also how I capture quit requests and video resize events. Now I am also switching for SDL_MOUSEBUTTONUP. When it triggers, I call a very small handing routine, passing it (event.button.x, event.button.y) as ints. The function couts the numbers and returns to the switch statement, which breaks like any other control path.// The relavant piece of the control loop  if (SDL_PollEvent(&event) && isOperational)    { switch (event.type){case SDL_ACTIVEEVENT:// Something's happened to the focus; if focus is lost or we're iconified,// we shouldn't draw the screenif (event.active.gain == 0)isActive = false;elseisActive = true;break;case SDL_VIDEORESIZE:// Handle a resize eventsurface = SDL_SetVideoMode(event.resize.w, event.resize.h, SCREEN_BPP, videoFlags);if (!surface){cout << "Broke on resize:" << SDL_GetError() << "\n";isOperational = false;isActive = false;return;}ResizeWindow(event.resize.w, event.resize.h);break;case SDL_KEYDOWN:// Keypress detectedSDLHandleKeyPress(&event.key.keysym);break;//case SDL_MOUSEBUTTONUP:case SDL_MOUSEBUTTONDOWN:if (target_maze != NULL)SDLHandleMouseClick(event.button.x, event.button.y);break;case SDL_QUIT:// Quit requestisActive = false;isOperational = false;cout << "Roboeyes: Terminate request received; shutting down." << endl;break;default:break;} // end switch()    } // end if (event)...// And the said functionbool cRoboeyes::SDLHandleMouseClick(int x, int y){static int position_reports;position_reports++;int nf2_cellsize = cell_size / nf2_griddim;int fixed_x;if (adjust_x <= 0)fixed_x = (x + adjust_x) / nf2_cellsize;elsefixed_x = (x - adjust_x) / nf2_cellsize;int fixed_y;if (adjust_y <= 0)fixed_y = (WINDOW_HEIGHT - (y + adjust_y)) / nf2_griddim;elsefixed_y = (WINDOW_HEIGHT - (y - adjust_y)) / nf2_griddim;cout << "Roboeyes: MOUSE REPORT (" << position_reports << ") NF2 POSITION ";cout << "(" << fixed_x << ", " << fixed_y << ")";cout << " [mouse cursor at ";cout << "(" << x << ", " << y << ")]";cout << endl;return true;}Any thoughts at all would be helpful; thank you.   
  I think I found the answer...hereI wasn't checking for event.button.state == SDL_RELEASED, and now that I am doing so, it's working at a much more reasonable speed. Still a little slowdown, but more in the order of three to five seconds as opposed to fifty.(These may seem like astronomical numbers to you...and they are, but consider that the hardware I'm constrained to show this demo on is circa 2001 at best.)Thanks to all who thought to reply and I hope this helps someone out <3   