diff --git a/src/runtime/fwindow.r b/src/runtime/fwindow.r index 451a5ff73..54a11c7ca 100644 --- a/src/runtime/fwindow.r +++ b/src/runtime/fwindow.r @@ -526,20 +526,19 @@ function{0,1} CopyArea(argv[argc]) /* w,w2,x,y,width,height,x2,y2 */ */ #ifdef Graphics3D - if (w->context->rendermode == UGL3D) { - if (argc>warg && is:record(argv[warg])) { - /* set a boolean flag, use a texture */ - dest_is_texture=1; - /* Get the Window from Texture record */ - w2 = BlkD(BlkD(argv[warg],Record)->fields[3],File)->fd.wb; - /* Pull out the texture handler */ - dest_texhandle = IntVal(BlkD(argv[warg],Record)->fields[2]); - /* get the context from the window binding */ - warg++; + if (argc>warg && is:record(argv[warg])) { + /* set a boolean flag, use a texture */ + dest_is_texture=1; + /* Get the Window from Texture record */ + w2 = BlkD(BlkD(argv[warg],Record)->fields[3],File)->fd.wb; + /* Pull out the texture handler */ + dest_texhandle = IntVal(BlkD(argv[warg],Record)->fields[2]); + /* get the context from the window binding */ + warg++; } if (argc-warg<4) /* should have at least 4 int values */ - runerr(146); + runerr(146); /* * This is the: "w2 is a destination texture" case. @@ -580,7 +579,6 @@ function{0,1} CopyArea(argv[argc]) /* w,w2,x,y,width,height,x2,y2 */ } ReturnWindow; } - } #endif /* Graphics3D */ /* diff --git a/src/runtime/ropengl.ri b/src/runtime/ropengl.ri index 81aab4088..15453c17d 100644 --- a/src/runtime/ropengl.ri +++ b/src/runtime/ropengl.ri @@ -3238,7 +3238,7 @@ int setselectionmode(wbp w, char* s) #endif /* MSWindows */ #define TEXUPDATE(win, wc, texhand, tex, wd, ht) \ - if (wc->buffermode) { \ + if (wc->buffermode == UGL_BUFFERED) { \ wc->curtexture = texhand; \ MakeCurrent(wc->display->stex[texhand].w); \ glBindTexture(GL_TEXTURE_2D, wc->display->stex[texhand].texName); \