mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Disable texturing before setting the render context in the cubemap case also.
This commit is contained in:
parent
56250d2c8d
commit
a5159fdba3
@ -158,10 +158,11 @@ 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.
|
||||
dxgsg->disable_texturing();
|
||||
|
||||
// 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 = direct_3d_texture -> GetSurfaceLevel (mipmap_level, &_direct_3d_surface);
|
||||
if (SUCCEEDED (hr)) {
|
||||
@ -286,10 +287,16 @@ select_cube_map(int cube_map_index) {
|
||||
|
||||
direct_3d_cube_texture = dx_texture_context9 -> _d3d_cube_texture;
|
||||
if (direct_3d_cube_texture) {
|
||||
if (_cube_map_index >= 0 && _cube_map_index < 6) {
|
||||
if (_cube_map_index >= 0 && _cube_map_index < 6) {
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user