GLXWorkstation.st
changeset 3468 b7e913629327
parent 3214 359316f51b9f
child 3743 12d5921402b3
equal deleted inserted replaced
3467:66a720085cd7 3468:b7e913629327
   548 #if !defined(OPENGL)
   548 #if !defined(OPENGL)
   549     __catchExit(1);
   549     __catchExit(1);
   550 #endif
   550 #endif
   551 
   551 
   552     if (setjmp(errorReturn)) {
   552     if (setjmp(errorReturn)) {
   553 	printf("hard error in GL - return\n");
   553 	fprintf(stderr, "hard error in GL - return\n");
   554 #ifdef HAS_SIGACTION
   554 #ifdef HAS_SIGACTION
   555 	sigaction(SIGSEGV, &oldSig, 0);
   555 	sigaction(SIGSEGV, &oldSig, 0);
   556 #else
   556 #else
   557 	signal(SIGSEGV, oldSig);
   557 	signal(SIGSEGV, oldSig);
   558 #endif
   558 #endif
   562 	return 0;
   562 	return 0;
   563     }
   563     }
   564     __CONT__
   564     __CONT__
   565 
   565 
   566     if (w <= 0) {
   566     if (w <= 0) {
   567 	printf("GL: bad width: %d\n", w);
   567 	fprintf(stderr, "GL: bad width: %d\n", w);
   568 	w = 1;
   568 	w = 1;
   569     }
   569     }
   570     if (h <= 0) {
   570     if (h <= 0) {
   571 	printf("GL: bad height: %d\n", h);
   571 	fprintf(stderr, "GL: bad height: %d\n", h);
   572 	h = 1;
   572 	h = 1;
   573     }
   573     }
   574 
   574 
   575 #if !defined(OPENGL)
   575 #if !defined(OPENGL)
   576 # ifdef VGL
   576 # ifdef VGL
   582       case GLXcolorIndexDoubleBuffer:
   582       case GLXcolorIndexDoubleBuffer:
   583 	break;
   583 	break;
   584 
   584 
   585       case GLXrgbSingleBuffer:
   585       case GLXrgbSingleBuffer:
   586       case GLXrgbDoubleBuffer:
   586       case GLXrgbDoubleBuffer:
   587 	printf("Sorry, VGL can't support %s type of windows\n", typeToName[type]);
   587 	fprintf(stderr, "Sorry, VGL can't support %s type of windows\n", typeToName[type]);
   588 	__catchExit(0);
   588 	__catchExit(0);
   589 	return 0;
   589 	return 0;
   590     }
   590     }
   591 
   591 
   592     scr = DefaultScreen(dpy);
   592     scr = DefaultScreen(dpy);
   616 #  else
   616 #  else
   617     signal(SIGSEGV, oldSig);
   617     signal(SIGSEGV, oldSig);
   618 #  endif
   618 #  endif
   619 
   619 
   620     if (i < 0) {
   620     if (i < 0) {
   621 	printf("GLXlink returned %d\n", i);
   621 	fprintf(stderr, "GLXlink returned %d\n", i);
   622 	__catchExit(0);
   622 	__catchExit(0);
   623 	return 0;
   623 	return 0;
   624     }
   624     }
   625 
   625 
   626 # else /* not VGL */
   626 # else /* not VGL */
   656      * then we can call GXLgetconfig()
   656      * then we can call GXLgetconfig()
   657      */
   657      */
   658     XGetWindowAttributes(dpy, parent, &pwa);
   658     XGetWindowAttributes(dpy, parent, &pwa);
   659     retconfig = GLXgetconfig(dpy, XScreenNumberOfScreen(pwa.screen), params);
   659     retconfig = GLXgetconfig(dpy, XScreenNumberOfScreen(pwa.screen), params);
   660     if (retconfig == 0) {
   660     if (retconfig == 0) {
   661 	printf("Sorry, can't support %s type of windows\n", typeToName[type]);
   661 	fprintf(stderr, "Sorry, can't support %s type of windows\n", typeToName[type]);
   662 	__catchExit(0);
   662 	__catchExit(0);
   663 	return 0;
   663 	return 0;
   664     }
   664     }
   665 
   665 
   666     /*
   666     /*
   730 #  else
   730 #  else
   731     signal(SIGSEGV, oldSig);
   731     signal(SIGSEGV, oldSig);
   732 #  endif
   732 #  endif
   733 
   733 
   734     if (i < 0) {
   734     if (i < 0) {
   735 	printf("GLXlink returned %d\n", i);
   735 	fprintf(stderr, "GLXlink returned %d\n", i);
   736 	__catchExit(0);
   736 	__catchExit(0);
   737 	return 0;
   737 	return 0;
   738     }
   738     }
   739 
   739 
   740     /*
   740     /*
   753 			     borderWidth, DisplayPlanes(dpy, scr), 
   753 			     borderWidth, DisplayPlanes(dpy, scr), 
   754 			     InputOutput, &visual,
   754 			     InputOutput, &visual,
   755 			     CWBorderPixel, &cwa);
   755 			     CWBorderPixel, &cwa);
   756 
   756 
   757     vis = XGetVisualInfo(dpy, VisualScreenMask|VisualIDMask, &visual, &nret);
   757     vis = XGetVisualInfo(dpy, VisualScreenMask|VisualIDMask, &visual, &nret);
   758 printf("vis is %x\n", vis);
   758     fprintf(stderr, "vis is %x\n", vis);
   759 #endif /* GLX || VGL */
   759 #endif /* GLX || VGL */
   760 
   760 
   761     return win;
   761     return win;
   762 }
   762 }
   763 
   763 
  8798 ! !
  8798 ! !
  8799 
  8799 
  8800 !GLXWorkstation class methodsFor:'documentation'!
  8800 !GLXWorkstation class methodsFor:'documentation'!
  8801 
  8801 
  8802 version
  8802 version
  8803     ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.77 2000-07-02 12:55:42 cg Exp $'
  8803     ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.78 2001-08-21 09:27:53 cg Exp $'
  8804 ! !
  8804 ! !