Not rendering combox drop downs.
I have integrated the Noesis renderer into a DirectX 11 based application. The UI seems to render fine, but the combo box drop down doesn't render.
It does work though. Clicking on the expand button obscures a button hover and clicking where the drop down would be selects an item.
I have a stencil buffer setup.
What could possibly cause this?
It does work though. Clicking on the expand button obscures a button hover and clicking where the drop down would be selects an item.
I have a stencil buffer setup.
What could possibly cause this?
Re: Not rendering combox drop downs.
This could be related to an incorrect offscreen setup as explained in this post.
Please, check that and let us know.
Please, check that and let us know.
Re: Not rendering combox drop downs.
I'm not having any luck with the solutions mentioned in the article. Maybe it would help understand the problem if I understood the difference between rendering the UI and rendering the drop down. My initial thought was the depth buffer, but the UI seems to render overlapping parts without issue.
I've simplified my rendering code down to:
I've simplified my rendering code down to:
Code: Select all
if (m_pView != nullptr)
{
m_pView->Update(_fTotalTime);
IRenderer* pRenderer = m_pView->GetRenderer();
if (pRenderer != NULL)
{
pRenderer->UpdateRenderTree();
if (true == pRenderer->NeedsOffscreen())
{
pRenderer->RenderOffscreen();
}
}
}
if (m_pContext != nullptr && m_pRenderTargetView != nullptr && (false == m_bEnableStencilBuffer || m_pStencilView != nullptr))
{
if (true == _bClear)
{
m_pContext->ClearRenderTargetView(m_pRenderTargetView.Get(), m_clearColor);
if (true == m_bEnableStencilBuffer)
{
m_pContext->ClearDepthStencilView(m_pStencilView.Get(), D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.0f, 0);
}
}
m_pContext->OMSetRenderTargets(1, m_pRenderTargetView.GetAddressOf(), true == m_bEnableStencilBuffer ? m_pStencilView.Get() : NULL);
m_pContext->RSSetViewports(1, &m_viewport);
}
if (m_pView != nullptr)
{
IRenderer* pRenderer = m_pView->GetRenderer();
if (pRenderer != NULL)
{
pRenderer->Render();
}
}
if (m_pSwapChain != nullptr)
{
m_pSwapChain->Present(1, 0);
}
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Not rendering combox drop downs.
Could you do a couple of tests to narrow what could be the source of the problem?
First render the following xaml to see if there is any issue with the offscreen phase:
Then try this xaml to see if there is any problem with the stencil buffer:
Are both rendered the same in your integration compared to our XamlPlayer?
First render the following xaml to see if there is any issue with the offscreen phase:
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Rectangle Width="400" Height="100" Fill="Blue"/>
<Border Width="300" Height="300" Background="Silver" Padding="50" Opacity="0.5">
<Rectangle Fill="Red"/>
</Border>
</Grid>Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Border Width="300" Height="300" Background="Silver">
<Rectangle Width="400" Height="100" Fill="Blue"/>
</Border>
</Grid>Re: Not rendering combox drop downs.
Here are the screens. They both match the XAML player in my integration.
- Attachments
-
- Screen2.png (3.43 KiB) Viewed 1450 times
-
- Screen1.png (3.55 KiB) Viewed 1450 times
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Not rendering combox drop downs.
Could you please try one more test:
This should fade in the border after 2 seconds.
If you are not seeing that animation in your integration, then it means you are not passing the time to the View's Update method in total seconds.
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.Resources>
<Storyboard x:Key="anim" BeginTime="0:0:1">
<DoubleAnimation To="1" Storyboard.TargetName="bd" Storyboard.TargetProperty="Opacity"/>
</Storyboard>
</Grid.Resources>
<Grid.Triggers>
<EventTrigger RoutedEvent="Grid.Loaded">
<BeginStoryboard Storyboard="{StaticResource anim}"/>
</EventTrigger>
</Grid.Triggers>
<Border x:Name="bd" Background="Silver" Width="300" Height="300" Opacity="0">
<Rectangle Fill="Red" Margin="50"/>
</Border>
</Grid>If you are not seeing that animation in your integration, then it means you are not passing the time to the View's Update method in total seconds.
Re: Not rendering combox drop downs.
That was it.. thank you.
It turns out my timer routine wasn't returning total time correctly.
It turns out my timer routine wasn't returning total time correctly.
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Not rendering combox drop downs.
Glad to hear you fixed it. Marking this as solved then.
Who is online
Users browsing this forum: No registered users and 8 guests