~ubuntu-branches/ubuntu/karmic/fltk1.1/karmic

« back to all changes in this revision

Viewing changes to src/Fl_Gl_Window.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-05-22 13:57:06 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050522135706-mchag24yf42lu7bu
Tags: 1.1.6-5
* Revert previous change, which seems to have been ineffective for some
  reason, in favor of commenting out the problematic Makefile rule
  altogether.  (Closes: #310151.)
* debian/control: Go back to specifying the URL as part of the
  description rather than via a non-standard field that doesn't seem to
  have caught on.  (Closes: #310240.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.20 2004/04/11 04:38:57 easysw Exp $"
 
2
// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.22 2004/09/09 21:34:46 matthiaswm Exp $"
3
3
//
4
4
// OpenGL window code for the Fast Light Tool Kit (FLTK).
5
5
//
106
106
      hide();
107
107
      show();
108
108
    }
109
 
#elif defined(__APPLE__)
 
109
#elif defined(__APPLE_QD__)
 
110
    redraw();
 
111
#elif defined(__APPLE_QUARTZ__)
 
112
    // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
110
113
    redraw();
111
114
#else
112
115
    // under X, if the visual changes we must make a new X window (yuck!):
189
192
#  else
190
193
  SwapBuffers(Fl_X::i(this)->private_dc);
191
194
#  endif
192
 
#elif defined(__APPLE__)
 
195
#elif defined(__APPLE_QD__)
 
196
  aglSwapBuffers((AGLContext)context_);
 
197
#elif defined(__APPLE_QUARTZ__)
 
198
  // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
193
199
  aglSwapBuffers((AGLContext)context_);
194
200
#else
195
201
  glXSwapBuffers(fl_display, fl_xid(this));
204
210
void Fl_Gl_Window::flush() {
205
211
  uchar save_valid = valid_;
206
212
 
207
 
#ifdef __APPLE__
 
213
#ifdef __APPLE_QD__
 
214
  //: clear previous clipping in this shared port
 
215
  GrafPtr port = GetWindowPort( fl_xid(this) );
 
216
  Rect rect; SetRect( &rect, 0, 0, 0x7fff, 0x7fff );
 
217
  GrafPtr old; GetPort( &old );
 
218
  SetPort( port );
 
219
  ClipRect( &rect );
 
220
  SetPort( old );
 
221
#elif defined(__APPLE_QUARTZ__)
 
222
  // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
208
223
  //: clear previous clipping in this shared port
209
224
  GrafPtr port = GetWindowPort( fl_xid(this) );
210
225
  Rect rect; SetRect( &rect, 0, 0, 0x7fff, 0x7fff );
251
266
    glDrawBuffer(GL_BACK);
252
267
 
253
268
    if (!SWAP_TYPE) {
254
 
#ifdef __APPLE__
 
269
#ifdef __APPLE_QD__
 
270
      SWAP_TYPE = COPY;
 
271
#elif defined __APPLE_QUARTZ__
 
272
      // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
255
273
      SWAP_TYPE = COPY;
256
274
#else
257
275
      SWAP_TYPE = UNDEFINED;
338
356
//  printf("Fl_Gl_Window::resize(X=%d, Y=%d, W=%d, H=%d)\n", X, Y, W, H);
339
357
  if (W != w() || H != h()) {
340
358
    valid(0);
341
 
#ifdef __APPLE__
 
359
#ifdef __APPLE_QD__
 
360
    GLint xywh[4];
 
361
 
 
362
    if (window()) {
 
363
      // MRS: This isn't quite right, but the parent window won't have its W and H updated yet...
 
364
      xywh[0] = x();
 
365
      xywh[1] = window()->h() - y() - h();
 
366
    } else {
 
367
      xywh[0] = 0;
 
368
      xywh[1] = 0;
 
369
    }
 
370
 
 
371
    xywh[2] = W;
 
372
    xywh[3] = H;
 
373
    aglSetInteger(context_, AGL_BUFFER_RECT, xywh);
 
374
//    printf("resize: xywh=[%d %d %d %d]\n", xywh[0], xywh[1], xywh[2], xywh[3]);
 
375
 
 
376
    aglUpdateContext(context_);
 
377
#elif defined(__APPLE_QUARTZ__)
342
378
    GLint xywh[4];
343
379
 
344
380
    if (window()) {
409
445
#endif
410
446
 
411
447
//
412
 
// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.20 2004/04/11 04:38:57 easysw Exp $".
 
448
// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.22 2004/09/09 21:34:46 matthiaswm Exp $".
413
449
//