ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rhd_ogl.c
(Generate patch)

Comparing ray/src/hd/rhd_ogl.c (file contents):
Revision 3.4 by gwlarson, Mon Dec 21 15:10:13 1998 UTC vs.
Revision 3.5 by gwlarson, Mon Dec 21 15:31:49 1998 UTC

# Line 162 | Line 162 | char  *id;
162   #endif
163                                          /* open display server */
164          ourdisplay = XOpenDisplay(NULL);
165 <        if (ourdisplay == NULL)
166 <                error(USER, "cannot open X-windows; DISPLAY variable set?\n");
165 >        CHECK(ourdisplay==NULL, USER,
166 >                        "cannot open X-windows; DISPLAY variable set?");
167   #ifdef STEREO
168          switch (XSGIQueryStereoMode(ourdisplay, ourroot)) {
169          case STEREO_TOP:
# Line 171 | Line 171 | char  *id;
171                  break;
172          case STEREO_OFF:
173                  error(USER,
174 <        "wrong video mode: run \"/usr/gfx/setmon -n STR_TOP\" first");
174 >                "wrong video mode: run \"/usr/gfx/setmon -n STR_TOP\" first");
175          case X_STEREO_UNSUPPORTED:
176                  error(USER, "stereo mode not supported on this screen");
177          default:
# Line 180 | Line 180 | char  *id;
180   #endif
181                                          /* find a usable visual */
182          ourvinf = glXChooseVisual(ourdisplay, ourscreen, atlBest);
183 <        if (ourvinf == NULL)
184 <                error(USER, "no suitable visuals available");
183 >        CHECK(ourvinf==NULL, USER, "no suitable visuals available");
184                                          /* get a context */
185          gctx = glXCreateContext(ourdisplay, ourvinf, NULL, GL_TRUE);
186                                          /* set gamma and tone mapping */
# Line 213 | Line 212 | char  *id;
212   #endif
213                  BORWIDTH, ourvinf->depth, InputOutput, ourvinf->visual,
214                  CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &ourwinattr);
215 <        if (gwind == 0)
217 <                error(SYSTEM, "cannot create window\n");
215 >        CHECK(gwind==0, SYSTEM, "cannot create window");
216          XStoreName(ourdisplay, gwind, id);
217                                          /* set window manager hints */
218          ourxwmhints.flags = InputHint|IconPixmapHint;
# Line 510 | Line 508 | xferdepth()                    /* load and clear depth buffer */
508   #endif
509                  depthbuffer = (GLfloat *)malloc(
510                                  odev.hres*odev.vres*sizeof(GLfloat));
511 <                if (depthbuffer == NULL)
514 <                        error(SYSTEM, "out of memory in xferdepth");
511 >                CHECK(depthbuffer==NULL, SYSTEM, "out of memory in xferdepth");
512          }
513                                  /* allocate alpha buffer for portals */
514          if (gmPortals)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines