• 1
  • 3
  • 4
  • 5
  • 6
  • 7
  • 10
 
darthmaule2
Posts: 58
Joined: 23 Oct 2014, 19:54

Re: noesisGUI v1.2 BETA 5

13 Nov 2014, 00:13

Please, give me a few days and I will publish the DX11 integration sample in github.
That would be very fantastic!
 
User avatar
jsantos
Site Admin
Topic Author
Posts: 2468
Joined: 20 Jan 2012, 17:18
Contact:

Re: noesisGUI v1.2 BETA 5

17 Nov 2014, 19:58

Hi,

I am just preparing the sample we are going to publish in github. In fact, we are going to use the same sample you are using (Tutorial 5). There are a few changes in the sample that will need a new beta from NoesisGUI. But meanwhile I think that I found the cause of your problem.

What time are you passing to the Update function? Because if you are using 0.0, then that will explain why your combobox doesn't get expanded. It uses an animation to expand itself, but if you pass 0.0 to the time, the animation is stuck at the first frame. So, you need something like this:
//--------------------------------------------------------------------------------------
// Render a frame
//--------------------------------------------------------------------------------------
void Render()
{
    // Update our time
    static float t = 0.0f;
    if( g_driverType == D3D_DRIVER_TYPE_REFERENCE )
    {
        t += ( float )XM_PI * 0.0125f;
    }
    else
    {
        static ULONGLONG timeStart = 0;
        ULONGLONG timeCur = GetTickCount64();
        if( timeStart == 0 )
            timeStart = timeCur;
        t = ( timeCur - timeStart ) / 1000.0f;
    }

#ifdef NOESIS_GUI
    NsGetKernel()->Tick();
    xamlRenderer->Update(t);
#endif
}
I hope this fix your problem.
 
darthmaule2
Posts: 58
Joined: 23 Oct 2014, 19:54

Re: noesisGUI v1.2 BETA 5

17 Nov 2014, 22:09

I was passing 0 but only because when I pass t then nothing at all shows up. So, I think have other issues.
 
User avatar
jsantos
Site Admin
Topic Author
Posts: 2468
Joined: 20 Jan 2012, 17:18
Contact:

Re: noesisGUI v1.2 BETA 5

18 Nov 2014, 00:44

Yes, that is because the render of offscreens is changing the device state. It must be restored. I am doing this in your sample:
#ifdef NOESIS_GUI
    NsGetKernel()->Tick();
    xamlRenderer->Update(t);

    const RenderCommands& commands = xamlRenderer->WaitForUpdate();
    xamlRenderer->Render(commands.offscreenCommands.GetPtr());

    g_pImmediateContext->OMSetRenderTargets( 1, &g_pRenderTargetView, g_pDepthStencilView );
    g_pImmediateContext->IASetInputLayout( g_pVertexLayout );
    UINT stride = sizeof( SimpleVertex );
    UINT offset = 0;
    g_pImmediateContext->IASetVertexBuffers( 0, 1, &g_pVertexBuffer, &stride, &offset );
    g_pImmediateContext->IASetIndexBuffer( g_pIndexBuffer, DXGI_FORMAT_R16_UINT, 0 );
    g_pImmediateContext->IASetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST );

    g_pImmediateContext->OMSetDepthStencilState(0, 0);
    g_pImmediateContext->RSSetState(0);
    g_pImmediateContext->OMSetBlendState(0, 0, 0xffffffff);
#endif
 
darthmaule2
Posts: 58
Joined: 23 Oct 2014, 19:54

Re: noesisGUI v1.2 BETA 5

18 Nov 2014, 12:15

I was thinking I had to do that but didn't know how... thanks. That fixed it.
 
User avatar
jsantos
Site Admin
Topic Author
Posts: 2468
Joined: 20 Jan 2012, 17:18
Contact:

Re: noesisGUI v1.2 BETA 6

01 Dec 2014, 15:34

Beta6 released!

In this version, among a lot more things, we have updated the integration tutorial. Samples corresponding to that tutorial can also be downloaded from our github repository:

https://github.com/Noesis/Tutorials/tre ... ntegration
 
darthmaule2
Posts: 58
Joined: 23 Oct 2014, 19:54

Re: noesisGUI v1.2 BETA 6

10 Dec 2014, 16:49

After upgrading to BETA 6, I'm getting this error when trying to build NoesisStyle.xaml:

./Themes/NoesisStyle.xaml
Parsing Setter.Value (@6380,2).
Unable to convert '/Themes;component/Fonts/#Roboto' to a valid value

I've tried a bunch of different fonts but I can't seem to get the resource builder to handle any value for FontFamily. Any ideas?

Thanks.
 
User avatar
sfernandez
Site Admin
Posts: 1524
Joined: 22 Dec 2011, 19:20

Re: noesisGUI v1.2 BETA 6

10 Dec 2014, 18:16

Is it possible you haven't updated that file (NoesisGUI/Themes/NoesisStyle.xaml)?
Because we changed references to fonts from "/Themes;component/Fonts/#Roboto" to "Fonts/#Roboto" in the last version.

Since Beta 6, using the "Themes;component/..." URI format is only valid if the referenced assembly project file (Themes.csproj) can be found.
 
darthmaule2
Posts: 58
Joined: 23 Oct 2014, 19:54

Re: noesisGUI v1.2 BETA 6

10 Dec 2014, 20:27

That was it, thanks.
 
darthmaule2
Posts: 58
Joined: 23 Oct 2014, 19:54

Re: noesisGUI v1.2 BETA 6

17 Dec 2014, 14:23

Is there a way to read compiled PNG files directly? The only way I can see to do that is to create resources in a xaml file, like this:
<Image x:Key="image1" Source="/Themes/Images/icon_MDD_blue1.png"/>
<Image x:Key="image2" Source="/Themes/Images/icon_MDD_blue2.png"/>

... then load that xaml file
softButtonControl = Noesis::GUI::LoadXaml<FrameworkElement>("SoftButtonControl.xaml");

... then find the images by name
Gui::Image* img = softButtonControl->FindName<Gui::Image>("image1");
Gui::Image* img = softButtonControl->FindName<Gui::Image>("image2");

... then pass that back into my custom control so I can bind to them

I don't think I'm doing this right :)

I really just want to dynamically load PNG files that I've built with the resource builder and then bind to them from my xaml.
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7
  • 10

Who is online

Users browsing this forum: No registered users and 1 guest