| 1131 | } |
| 1132 | |
| 1133 | bool Tr2EffectStateManager::SetRenderTarget( unsigned int index, const Tr2TextureAL& rt, bool updateViewport, uint32_t slice ) |
| 1134 | { |
| 1135 | if( FAILED( m_renderContext.SetRenderTarget( rt, index, slice ) ) ) |
| 1136 | { |
| 1137 | CCP_LOGERR( "Failed to set renderTarget to slot %d", index ); |
| 1138 | return false; |
| 1139 | } |
| 1140 | |
| 1141 | if( !index && updateViewport ) |
| 1142 | { |
| 1143 | unsigned width, height; |
| 1144 | if( SUCCEEDED( m_renderContext.GetRenderTargetSize( width, height ) ) ) |
| 1145 | { |
| 1146 | // don't use rt.GetWidth/Height, rt may be nullRT |
| 1147 | UpdateRenderTargetViewport( width, height ); |
| 1148 | } |
| 1149 | } |
| 1150 | |
| 1151 | return true; |
| 1152 | } |
| 1153 | |
| 1154 | bool Tr2EffectStateManager::SetDepthStencilBuffer( const Tr2TextureAL& ds ) |
| 1155 | { |
no test coverage detected