Explorar o código

Merge branch 'release/1.9.x'

rdb %!s(int64=10) %!d(string=hai) anos
pai
achega
f0df4b3b77

+ 4 - 0
panda/src/glstuff/glGraphicsBuffer_src.cxx

@@ -381,6 +381,10 @@ rebuild_bitplanes() {
       // buffer was requested.
       // buffer was requested.
       _use_depth_stencil = true;
       _use_depth_stencil = true;
     }
     }
+  } else if (attach[RTP_depth_stencil] != NULL && attach[RTP_depth] == NULL) {
+    // The depth stencil slot was assigned a texture, but we don't support it.
+    // Downgrade to a regular depth texture.
+    swap(attach[RTP_depth], attach[RTP_depth_stencil]);
   }
   }
 
 
   // Knowing this, we can already be a tiny bit more accurate about the
   // Knowing this, we can already be a tiny bit more accurate about the

+ 3 - 0
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -1129,6 +1129,9 @@ reset() {
 #else
 #else
   _supports_depth_texture = (is_at_least_gl_version(1, 4) ||
   _supports_depth_texture = (is_at_least_gl_version(1, 4) ||
                              has_extension("GL_ARB_depth_texture"));
                              has_extension("GL_ARB_depth_texture"));
+  _supports_depth_stencil = (is_at_least_gl_version(3, 0) ||
+                             has_extension("GL_ARB_framebuffer_object") ||
+                             has_extension("GL_EXT_packed_depth_stencil"));
 #endif
 #endif
 
 
 #ifdef OPENGLES_2
 #ifdef OPENGLES_2

+ 4 - 2
panda/src/gobj/shader.cxx

@@ -413,8 +413,10 @@ cp_dependency(ShaderMatInput inp) {
   if (inp == SMO_attr_fog || inp == SMO_attr_fogcolor) {
   if (inp == SMO_attr_fog || inp == SMO_attr_fogcolor) {
     dep |= SSD_fog;
     dep |= SSD_fog;
   }
   }
-  if ((inp == SMO_model_to_view)||
-      (inp == SMO_view_to_model)) {
+  if ((inp == SMO_model_to_view) ||
+      (inp == SMO_view_to_model) ||
+      (inp == SMO_model_to_apiview) ||
+      (inp == SMO_apiview_to_model)) {
     dep |= SSD_transform;
     dep |= SSD_transform;
   }
   }
   if ((inp == SMO_texpad_x) ||
   if ((inp == SMO_texpad_x) ||