cdoty
Topic Author
Posts: 15
Joined: 30 Nov 2017, 13:34

Not rendering combox drop downs.

01 Mar 2022, 00:45

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?
 
User avatar
jsantos
Site Admin
Posts: 4822
Joined: 20 Jan 2012, 17:18
Contact:

Re: Not rendering combox drop downs.

01 Mar 2022, 14:22

This could be related to an incorrect offscreen setup as explained in this post.

Please, check that and let us know.
 
cdoty
Topic Author
Posts: 15
Joined: 30 Nov 2017, 13:34

Re: Not rendering combox drop downs.

01 Mar 2022, 23:46

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:
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);
}
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Not rendering combox drop downs.

02 Mar 2022, 10:01

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:
<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>
Then try this xaml to see if there is any problem with the stencil buffer:
<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>
Are both rendered the same in your integration compared to our XamlPlayer?
 
cdoty
Topic Author
Posts: 15
Joined: 30 Nov 2017, 13:34

Re: Not rendering combox drop downs.

03 Mar 2022, 23:24

Here are the screens. They both match the XAML player in my integration.
Attachments
Screen2.png
Screen2.png (3.43 KiB) Viewed 1450 times
Screen1.png
Screen1.png (3.55 KiB) Viewed 1450 times
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Not rendering combox drop downs.

04 Mar 2022, 00:36

Could you please try one more test:
<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>
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.
 
cdoty
Topic Author
Posts: 15
Joined: 30 Nov 2017, 13:34

Re: Not rendering combox drop downs.

04 Mar 2022, 14:24

That was it.. thank you.
It turns out my timer routine wasn't returning total time correctly.
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Not rendering combox drop downs.

04 Mar 2022, 15:28

Glad to hear you fixed it. Marking this as solved then.

Who is online

Users browsing this forum: No registered users and 8 guests