|
|
@@ -354,11 +354,15 @@ rebuild_bitplanes() {
|
|
|
_color_backing_store = NULL;
|
|
|
}
|
|
|
if (!_color_backing_store) {
|
|
|
- hr = _dxgsg -> _d3d_device ->
|
|
|
- CreateOffscreenPlainSurface(bitplane_x, bitplane_y, _saved_color_desc.Format,
|
|
|
- D3DPOOL_DEFAULT, &_color_backing_store, NULL);
|
|
|
+ hr = _dxgsg->_d3d_device->CreateRenderTarget(bitplane_x, bitplane_y,
|
|
|
+ _saved_color_desc.Format,
|
|
|
+ _saved_color_desc.MultiSampleType,
|
|
|
+ _saved_color_desc.MultiSampleQuality,
|
|
|
+ FALSE,
|
|
|
+ &_color_backing_store,
|
|
|
+ NULL);
|
|
|
if (!SUCCEEDED(hr)) {
|
|
|
- dxgsg9_cat.error ( ) << "CreateImageSurface " << D3DERRORSTRING(hr) FL;
|
|
|
+ dxgsg9_cat.error ( ) << "CreateRenderTarget " << D3DERRORSTRING(hr) FL;
|
|
|
}
|
|
|
}
|
|
|
color_surf = _color_backing_store;
|
|
|
@@ -456,13 +460,13 @@ rebuild_bitplanes() {
|
|
|
if (depth_ctx) {
|
|
|
if (!depth_ctx->create_texture(*_dxgsg->_screen)) {
|
|
|
dxgsg9_cat.error()
|
|
|
- << "Unable to re-create texture " << *color_ctx->get_texture() << endl;
|
|
|
+ << "Unable to re-create texture " << *depth_ctx->get_texture() << endl;
|
|
|
return false;
|
|
|
}
|
|
|
if (depth_tex->get_texture_type() == Texture::TT_2d_texture) {
|
|
|
depth_d3d_tex = depth_ctx->_d3d_2d_texture;
|
|
|
nassertr(depth_d3d_tex != 0, false);
|
|
|
- hr = color_d3d_tex -> GetSurfaceLevel(0, &depth_surf);
|
|
|
+ hr = depth_d3d_tex -> GetSurfaceLevel(0, &depth_surf);
|
|
|
if (!SUCCEEDED(hr)) {
|
|
|
dxgsg9_cat.error ( ) << "GetSurfaceLevel " << D3DERRORSTRING(hr) FL;
|
|
|
}
|