Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17063

3D rendering flickering due to Direct2D/DirectWrite rendering

$
0
0

Hi,

I try to display text as HUD with my 3D engine.

The problem is that the screen is flickering and the 3D performances are low.

Can you help me ? ( I am also using Win32 for the window )

This is some code :

while (D3D11Rendering::exitThread == false)
{

		D3D11Rendering::getInstance()->GBuffer();

		D3D11Rendering::getInstance()->downsamplingPass();

		D3D11Rendering::getInstance()->glowEffect.extractingColorPass();

		D3D11Rendering::getInstance()->glowEffect.horizontalBlur();

		D3D11Rendering::getInstance()->glowEffect.verticalBlur();

		D3D11Rendering::getInstance()->LightingPass();

		D3D11Rendering::getInstance()->glowEffect.blendGlowAndScene();

		D3D11Rendering::getInstance()->text2D.renders2D();

		D3D11Rendering::getInstance()->updateRendering();
}
void Text2D::renders2D()
{
    renderTarget2D->BeginDraw();

    renderTarget2D->Clear(D2D1::ColorF(D2D1::ColorF::Black));

    drawText();

    renderTarget2D->EndDraw();

}
void Text2D::drawText()
{
    D2D1_RECT_F layoutRect = D2D1::RectF(D3D11Rendering::width-150.0f …

Viewing all articles
Browse latest Browse all 17063

Trending Articles