| 719 | } |
| 720 | |
| 721 | void Tr2DebugRenderer::DrawText( TriDebugFont font, const Vector3& pos, const Color& color, const char* msg, ... ) |
| 722 | { |
| 723 | va_list args; |
| 724 | va_start( args, msg ); |
| 725 | |
| 726 | Tr2Rect rect; |
| 727 | USE_MAIN_THREAD_RENDER_CONTEXT(); |
| 728 | Tr2Viewport vp; |
| 729 | renderContext.GetViewport( vp ); |
| 730 | |
| 731 | Vector3 screenPos = Tr2Renderer::ProjectWorldToScreen( pos, vp ); |
| 732 | |
| 733 | if( ( screenPos.z > 0.0f ) && ( screenPos.z < 1.0f ) ) |
| 734 | { |
| 735 | rect.top = (int32_t)screenPos.y; |
| 736 | rect.left = (int32_t)screenPos.x; |
| 737 | rect.bottom = rect.top + 512; |
| 738 | rect.right = rect.left + 1024; |
| 739 | |
| 740 | GetDebugTextRenderer().Vprintf( font, rect, TRI_DFS_LEFT, Vector4( color.r, color.g, color.b, color.a ), msg, args ); |
| 741 | } |
| 742 | va_end( args ); |
| 743 | } |
| 744 | |
| 745 | void Tr2DebugRenderer::Pick( EvePendingPickingReadback& readback, bool synchronize, Tr2RenderContext& renderContext ) |
| 746 | { |
no test coverage detected