浏览代码

Update render to texture support for DX9

aignacio_sf 20 年之前
父节点
当前提交
068099e597
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      panda/src/dxgsg9/wdxGraphicsPipe9.cxx

+ 6 - 1
panda/src/dxgsg9/wdxGraphicsPipe9.cxx

@@ -107,7 +107,12 @@ PT(GraphicsBuffer) wdxGraphicsPipe9::
 make_buffer(GraphicsStateGuardian *gsg, const string &name,
 make_buffer(GraphicsStateGuardian *gsg, const string &name,
             int x_size, int y_size) {
             int x_size, int y_size) {
 
 
-  return new wdxGraphicsBuffer9(this, gsg, name, x_size, y_size);
+  if (support_render_texture && gsg->get_supports_render_texture ( )) {
+    return new wdxGraphicsBuffer9(this, gsg, name, x_size, y_size);
+  }
+  else {
+    return NULL;
+  }
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////