MCPcopy Create free account
hub / github.com/carbonengine/trinity / SetRenderTarget

Method SetRenderTarget

trinity/Shader/Tr2EffectStateManager.cpp:1133–1152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131}
1132
1133bool 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
1154bool Tr2EffectStateManager::SetDepthStencilBuffer( const Tr2TextureAL& ds )
1155{

Callers 10

ExecuteMethod · 0.45
ClearOnFailureMethod · 0.45
StartLayerMethod · 0.45
RenderShadowsMethod · 0.45
ExecuteMethod · 0.45
RenderTaaMethod · 0.45
BeginRenderPassFunction · 0.45
ExecuteMethod · 0.45
RenderDepthPassMethod · 0.45
RenderPlanetsMethod · 0.45

Calls 1

GetRenderTargetSizeMethod · 0.45

Tested by

no test coverage detected