| 980 | |
| 981 | |
| 982 | void Tr2EffectStateManager::ReleaseDeviceResources( TriStorage s ) |
| 983 | { |
| 984 | USE_MAIN_THREAD_RENDER_CONTEXT(); |
| 985 | |
| 986 | if( ( s & TRISTORAGE_ALL ) == TRISTORAGE_ALL ) |
| 987 | { |
| 988 | if( renderContext.IsValid() ) |
| 989 | { |
| 990 | for( uint32_t i = 0; i < VERTEX_STREAM_MAX_COUNT; ++i ) |
| 991 | { |
| 992 | m_renderContext.SetStreamSource( i, Tr2BufferAL(), 0, 0 ); |
| 993 | } |
| 994 | m_renderContext.SetIndices( Tr2BufferAL() ); |
| 995 | } |
| 996 | m_currentValues.Reset(); |
| 997 | |
| 998 | for( auto it = s_shaders.begin(); it != s_shaders.end(); ++it ) |
| 999 | { |
| 1000 | delete *it; |
| 1001 | } |
| 1002 | s_shaders.clear(); |
| 1003 | for( auto it = s_shaderPrograms.begin(); it != s_shaderPrograms.end(); ++it ) |
| 1004 | { |
| 1005 | delete it->first; |
| 1006 | } |
| 1007 | s_shaderPrograms.clear(); |
| 1008 | for( auto it = s_shaderLibraries.begin(); it != s_shaderLibraries.end(); ++it ) |
| 1009 | { |
| 1010 | //delete[]( *it )->bytecode; |
| 1011 | delete *it; |
| 1012 | } |
| 1013 | s_shaderLibraries.clear(); |
| 1014 | |
| 1015 | s_renderStateSetups.erase( s_renderStateSetups.begin() + RM_COUNT, s_renderStateSetups.end() ); |
| 1016 | m_renderStates.clear(); |
| 1017 | |
| 1018 | for( uint32_t i = 0; i != CBUFFER_COUNT; ++i ) |
| 1019 | { |
| 1020 | m_perObjectConstantBuffers[i] = Tr2ConstantBufferAL(); |
| 1021 | } |
| 1022 | } |
| 1023 | } |
| 1024 | |
| 1025 | |
| 1026 | bool Tr2EffectStateManager::PushDepthStencilBuffer() |
nothing calls this directly
no test coverage detected