本文整理汇总了C++中TextRenderer::OnRender方法的典型用法代码示例。如果您正苦于以下问题:C++ TextRenderer::OnRender方法的具体用法?C++ TextRenderer::OnRender怎么用?C++ TextRenderer::OnRender使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextRenderer
的用法示例。
在下文中一共展示了TextRenderer::OnRender方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ResizeScreenSizedBuffers
//--------------------------------------------------------------------------------------
// Callback function that renders the frame. This function sets up the rendering
// matrices and renders the scene and UI.
//--------------------------------------------------------------------------------------
void CALLBACK OnD3D11FrameRender(ID3D11Device* pd3dDevice, ID3D11DeviceContext* pd3dImmediateContext,
double fTime, float fElapsedTime, void* pUserContext)
{
// If the settings dialog is being shown, then render it instead of rendering the app's scene
if (g_SettingsDlg.IsActive())
{
g_SettingsDlg.OnRender(fElapsedTime);
return;
}
// Reallocate the render targets and depth buffer if the MSAA mode has been changed in the GUI.
if (g_RenderTargetsDirty)
{
g_RenderTargetsDirty = false;
ResizeScreenSizedBuffers(pd3dDevice);
}
SceneMesh *pMesh = g_Scenes[g_CurrentSceneId].pMesh;
g_AOParams.UseDeinterleavedTexturing = g_UseDeinterleavedTexturing;
g_AOParams.RandomizeSamples = g_RandomizeSamples;
g_AOParams.Blur.Enable = g_BlurAO;
ID3D11RenderTargetView* pBackBufferRTV = DXUTGetD3D11RenderTargetView(); // does not addref
if (pMesh)
{
RenderAOFromMesh(pd3dDevice,
pd3dImmediateContext,
pBackBufferRTV,
pMesh);
}
//--------------------------------------------------------------------------------------
// Render the GUI
//--------------------------------------------------------------------------------------
if (g_DrawUI)
{
g_HUD.OnRender(fElapsedTime);
g_TextRenderer.OnRender(fElapsedTime);
}
}