Browse Source

more tinybuffer tweaks

David Rose 17 years ago
parent
commit
58c54ef085

+ 1 - 2
panda/src/tinydisplay/tinyOsxGraphicsPipe.cxx

@@ -239,8 +239,7 @@ make_output(const string &name,
   
   // Second thing to try: a TinyGraphicsBuffer
   if (retry == 1) {
-    if ((!support_render_texture)||
-        ((flags&BF_require_parasite)!=0)||
+    if (((flags&BF_require_parasite)!=0)||
         ((flags&BF_require_window)!=0)) {
       return NULL;
     }

+ 7 - 2
panda/src/tinydisplay/tinyXGraphicsPipe.cxx

@@ -208,6 +208,9 @@ make_output(const string &name,
 
   // First thing to try: a TinyXGraphicsWindow
 
+  // We check _is_valid only in this case.  The pipe will be invalid
+  // if it can't contact the X server, but that shouldn't prevent the
+  // creation of an offscreen buffer.
   if (retry == 0 && _is_valid) {
     if (((flags&BF_require_parasite)!=0)||
         ((flags&BF_refuse_window)!=0)||
@@ -223,9 +226,11 @@ make_output(const string &name,
   }
   
   // Second thing to try: a TinyGraphicsBuffer
+
+  // No need to check _is_valid here.  We can create an offscreen
+  // buffer even if the pipe is not technically valid.
   if (retry == 1) {
-    if ((!support_render_texture)||
-        ((flags&BF_require_parasite)!=0)||
+    if (((flags&BF_require_parasite)!=0)||
         ((flags&BF_require_window)!=0)) {
       return NULL;
     }