There is no need for g_View. Check CViewRender::GetViewSetup and
CViewRender::GetPlayerViewSetup


Kind regards,
*Saul Rennison*


On 12 October 2011 19:02, <igor...@inbox.ru> wrote:

> Another workaround, now with "stealing" CViewSetup.
> That's not a proper fix, but at least it works for now.
> So if somebody have some fresh ideas - share them please :p
> Note: don't use this workaround with previous one.
>
> ----------
>
> 1. Add CViewSetup g_View; before "void CViewRender::SetUpView()".
>
> 2. Add g_View = m_View; at the end of CViewRender::SetUpView().
>
> 3. Before "C_VGuiScreen::DrawModel" add
> #include "view_shared.h"
> #include "iviewrender.h"
> extern CViewSetup g_View;
>
> 4. Replace code between "ComputePanelToWorld();" and "return 1;" with this:
>
>        CMatRenderContextPtr pRenderContext( materials );
>        pRenderContext->MatrixMode( MATERIAL_PROJECTION );
>        pRenderContext->PushMatrix();
>        CViewSetup viewModelSetup( g_View );
>        viewModelSetup.zNear = g_View.zNearViewmodel;
>        viewModelSetup.zFar = g_View.zFarViewmodel;
>        viewModelSetup.fov = g_View.fovViewmodel;
>        render->Push3DView( viewModelSetup, 0, NULL, view->GetFrustum() );
>         pRenderContext->DepthRange( 0.0f, 0.1f );
>
>         g_pMatSystemSurface->DrawPanelIn3DSpace( pPanel->GetVPanel(),
> m_PanelToWorld,
>                m_nPixelWidth, m_nPixelHeight, m_flWidth, m_flHeight );
>
>        // Finally, a pass to set the z buffer...
>        DrawScreenOverlay();
>
>        pRenderContext->DepthRange( 0.0, 1.0 );
>         render->PopView( view->GetFrustum() );
>        pRenderContext->MatrixMode( MATERIAL_PROJECTION );
>        pRenderContext->PopMatrix();
>
> ----------
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to