| 1191 | } |
| 1192 | |
| 1193 | void Tr2EffectStateManager::UpdateRenderTargetViewport( unsigned width, unsigned height ) |
| 1194 | { |
| 1195 | CCP_ASSERT( width > 0 ); |
| 1196 | CCP_ASSERT( height > 0 ); |
| 1197 | |
| 1198 | // Keep record of the render target's width and height. This is used when |
| 1199 | // checking whether the viewport extends beyond the render target or not. |
| 1200 | m_renderTargetWidth = width; |
| 1201 | m_renderTargetHeight = height; |
| 1202 | |
| 1203 | // Reset the viewport |
| 1204 | m_viewportOnDevice.m_x = 0; |
| 1205 | m_viewportOnDevice.m_y = 0; |
| 1206 | m_viewportOnDevice.m_height = (float)height; |
| 1207 | m_viewportOnDevice.m_width = (float)width; |
| 1208 | m_viewport.height = height; |
| 1209 | m_viewport.width = width; |
| 1210 | m_viewport.x = 0; |
| 1211 | m_viewport.y = 0; |
| 1212 | m_viewport.minZ = m_viewportOnDevice.m_minZ = 0.0f; |
| 1213 | m_viewport.maxZ = m_viewportOnDevice.m_maxZ = 1.0f; |
| 1214 | |
| 1215 | m_viewportSizeVar = Vector4( m_viewportOnDevice.m_width, m_viewportOnDevice.m_height, (float)m_renderTargetWidth, (float)m_renderTargetHeight ); |
| 1216 | |
| 1217 | // Reset the projection adjustment |
| 1218 | //m_viewport2projectionAdjustment = IdentityMatrix(); |
| 1219 | } |
| 1220 | |
| 1221 | void Tr2EffectStateManager::SetupViewport() |
| 1222 | { |
no test coverage detected