diff --git a/panda/src/dxgsg8/wdxGraphicsPipe8.cxx b/panda/src/dxgsg8/wdxGraphicsPipe8.cxx index 3e0707cb05..6412bf1572 100644 --- a/panda/src/dxgsg8/wdxGraphicsPipe8.cxx +++ b/panda/src/dxgsg8/wdxGraphicsPipe8.cxx @@ -157,7 +157,7 @@ make_output(const string &name, if ((gsg != 0)&& (gsg->is_valid())&& (!gsg->needs_reset())&& - (gsg->get_supports_render_texture())) { + (DCAST(DXGraphicsStateGuardian8, gsg)->get_supports_render_texture())) { precertify = true; } return new wdxGraphicsBuffer8(engine, this, name, fb_prop, win_prop, diff --git a/panda/src/dxgsg9/wdxGraphicsPipe9.cxx b/panda/src/dxgsg9/wdxGraphicsPipe9.cxx index 30231326d7..3c1236658e 100755 --- a/panda/src/dxgsg9/wdxGraphicsPipe9.cxx +++ b/panda/src/dxgsg9/wdxGraphicsPipe9.cxx @@ -153,7 +153,7 @@ make_output(const string &name, if ((gsg != 0)&& (gsg->is_valid())&& (!gsg->needs_reset())&& - (gsg->get_supports_render_texture())) { + (DCAST(DXGraphicsStateGuardian9, gsg)->get_supports_render_texture())) { precertify = true; } return new wdxGraphicsBuffer9(engine, this, name, fb_prop, win_prop,