Disable texturing before setting the render context in the cubemap case also.

This commit is contained in:
aignacio_sf 2006-01-05 18:33:51 +00:00
parent 56250d2c8d
commit a5159fdba3

View File

@ -158,6 +158,7 @@ DBG_S dxgsg9_cat.error ( ) << "wdxGraphicsBuffer9::begin_render_texture\n"; DBG_
direct_3d_texture = dx_texture_context9 -> _d3d_2d_texture;
if (direct_3d_texture) {
// Make sure texturing is fully disabled (and all of our
// textures are therefore unbound in the GSG) before we try
// to render to this texture.
@ -290,6 +291,12 @@ select_cube_map(int cube_map_index) {
hr = direct_3d_cube_texture -> GetCubeMapSurface (
(D3DCUBEMAP_FACES) _cube_map_index, mipmap_level, &_direct_3d_surface);
if (SUCCEEDED (hr)) {
// Make sure texturing is fully disabled (and all of our
// textures are therefore unbound in the GSG) before we try
// to render to this texture.
dxgsg->disable_texturing();
hr = dxgsg -> _d3d_device -> SetRenderTarget (render_target_index, _direct_3d_surface);
if (SUCCEEDED (hr)) {
if (this -> _new_z_stencil_surface) {