Noesis v1.2 RC5 x86 - SetTheme Crashes
Greetings,
I was looking for a UI solution for our old game engine using D3D9, and decided to develop a sample project merely creates a window and creates D3D9 device on it then try to render Noesis Xaml files. As I learned from a thread version 2.0 lacks D3D9 implemetation in NoesisApp; so I find this thread for older version supporting D3D9 and tried to implement it to my sample project and render a sample Xaml file and result is this:

As seen above my custom project's rendering is bit different from Noesis xaml player. My first thougt was it cant find style or font resources so I tried to manually set style for xaml and managed to compile this lines of code but it crashes when I finally try to run SetTheme() :
I found similar problem in this thread (please look at post#35) right after that entry, Jsantos stated that "updated the x86_64 distributable" and original poster says "it works now". So I have suspected you may fix the problem on x64 redist but somehow forgot to fix same bug for x86 redist files.
I was looking for a UI solution for our old game engine using D3D9, and decided to develop a sample project merely creates a window and creates D3D9 device on it then try to render Noesis Xaml files. As I learned from a thread version 2.0 lacks D3D9 implemetation in NoesisApp; so I find this thread for older version supporting D3D9 and tried to implement it to my sample project and render a sample Xaml file and result is this:

As seen above my custom project's rendering is bit different from Noesis xaml player. My first thougt was it cant find style or font resources so I tried to manually set style for xaml and managed to compile this lines of code but it crashes when I finally try to run SetTheme() :
Code: Select all
Ptr<ResourceDictionary> xamlTheme = Noesis::GUI::LoadXaml<ResourceDictionary>("WindowsStyle.xaml");
ResourceDictionary *resDic;
resDic = (ResourceDictionary *)xamlTheme.GetPtr();
const Ptr<IUISystem>& uiSystem = NsGetSystem<IUISystem>();
uiSystem->SetTheme(resDic);
Last edited by WIURGN on 27 Mar 2018, 15:10, edited 1 time in total.
Re: Noesis v1.2 RC5 x86 - SetTheme Crashes
I realized that when I build my resources with "Resource.BuildTool.exe" code doesnt crash but SetTheme() doesnt change anything. Maybe I have to use it with different object or class to affect style of UI or any object on scene. Not sure.
But it still feels wrong having a crash when you try to change style of UI inspite of ability to LoadXaml() unprocessed xaml successfully with no problem.
Btw I processed all sample data with Resource.BuildTool.exe and I am experimenting with diffirent xaml files to see my sample project's abilities/flaws via comparing my renderer vs good old xaml_player v1.2.6f5. There are several issues I am having rightnow.
*Seems like my renderer fails to play any animation related effects eg. opening combobox drop downs, animated buttons etc.
*My fonts looks different compared to standard xaml player. Also seems like it is always same font for all xaml files.
*Since I want to see different styles on my renderer, I tried to load styles.xaml and realized that soem buttons doesnt respond to mouse events while some can.
(Buttons with green ticks capture mouse events)

*UI elements (buttons, windows etc.) seems like having different color theme.
*Reversed bars has shorter fillings.

Since I dont have broad knowladge about rendering and DirectX APIs, I would be appreciated if someone explain what I may missing here.
Also It would be super helpful if I get my hands on to xaml player v1.2.6f5 source project
I can learn alot from something like that!
But it still feels wrong having a crash when you try to change style of UI inspite of ability to LoadXaml() unprocessed xaml successfully with no problem.
Btw I processed all sample data with Resource.BuildTool.exe and I am experimenting with diffirent xaml files to see my sample project's abilities/flaws via comparing my renderer vs good old xaml_player v1.2.6f5. There are several issues I am having rightnow.
*Seems like my renderer fails to play any animation related effects eg. opening combobox drop downs, animated buttons etc.
*My fonts looks different compared to standard xaml player. Also seems like it is always same font for all xaml files.
*Since I want to see different styles on my renderer, I tried to load styles.xaml and realized that soem buttons doesnt respond to mouse events while some can.
(Buttons with green ticks capture mouse events)

*UI elements (buttons, windows etc.) seems like having different color theme.
*Reversed bars has shorter fillings.

Since I dont have broad knowladge about rendering and DirectX APIs, I would be appreciated if someone explain what I may missing here.
Also It would be super helpful if I get my hands on to xaml player v1.2.6f5 source project

Re: Noesis v1.2 RC5 x86 - SetTheme Crashes
iirc "SetTheme" method is unfortunately not working on this build, was giving memory access violation error with x86 dll, which means i think it should be handled on source code.
Also i remember, provided x86 DLL was not working, was always complaining like "resource xaml not found" even if the resource is there. So we used the DLL that resides in the Player exe folder. (the one player is using) because it was working
No "resource not found" error and was rendering properly. BUT still, "SetTheme" was giving access violation error with this DLL too :/
Also i remember, provided x86 DLL was not working, was always complaining like "resource xaml not found" even if the resource is there. So we used the DLL that resides in the Player exe folder. (the one player is using) because it was working

Re: Noesis v1.2 RC5 x86 - SetTheme Crashes
Can't you use the latest version of NoesisGUI and just create a D3D9 renderer for your engine? Unfortunately, you are using a very old version of Noesis and we don't have time to support it. You even have the source code of the player in the latest C++ SDK.
Re: Noesis v1.2 RC5 x86 - SetTheme Crashes
Yeah, I considered implementing D3D9 to Noesis 2.0 for our game engine. In fact, I already downloaded and peeked to NoesisApp and XamlPlayer projects and tried to understand whats going on around "RenderDevice" interface. As you mention in this thread "impementation should be straightforward starting from the D3D11" so I copied D3D11 files and made same file structure in NoesisApp project, rolled up my sleeves for converting D3D11 codes to D3D9 then I realized it is not going to be easy task for me considering that I dont have previous D3D development experince. So tired older version to take a quick look to noesis and on our game engine.Can't you use the latest version of NoesisGUI and just create a D3D9 renderer for your engine? Unfortunately, you are using a very old version of Noesis and we don't have time to support it. You even have the source code of the player in the latest C++ SDK.
You may ask "why so rush? Stay calm and It will be ok."

I know this detail may be irrelevant and probably nobody cares. But it is the answer for why I tried an older version of Noesis.
If I ever achive to implement D3D9 to Noesis 2.0 I would love to share it with others as well.
Re: Noesis v1.2 RC5 x86 - SetTheme Crashes
It seems you are not an Indie studio right? Do you plan to acquire a Pro license of NoesisGUI? Because in that case, we could negotiate the D3D9 implementation, we could write it for you.
Re: Noesis v1.2 RC5 x86 - SetTheme Crashes
Yes, We actually planing to pay for a middleware solution but before throwing cash around, we want to see how things roll in our enviroment and experience UI development pipeline to see if it is "efficent" and "able" enough to meet our needs.
Re: Noesis v1.2 RC5 x86 - SetTheme Crashes
This is a problem with the offscreen rendering in your integration. You need to make sure you render this way:*Seems like my renderer fails to play any animation related effects eg. opening combobox drop downs, animated buttons etc.
1. Render offscreen noesis (this will render to internal textures)
2. Set main framebuffer and viewport (this is very important because previous state changed them)
3. Clear color buffer and stencil
4. Render your 3D scene
5. Render onscreen noesis
This is because you are using a different theme. Not sure, why that it crashing, it is a very old version... when you are you doing the LoadTheme() call? It must be done after initialization and after setting the providers.*My fonts looks different compared to standard xaml player. Also seems like it is always same font for all xaml files.
Same problem as 1 (offscreens)*Since I want to see different styles on my renderer, I tried to load styles.xaml and realized that soem buttons doesnt respond to mouse events while some can.
The same as 2., you are using a different theme.*UI elements (buttons, windows etc.) seems like having different color theme.
*Reversed bars has shorter fillings.
The version you are using is really old, many things improved since then. For evaluation purposes, could you avoid changing the theme?
Re: Noesis v1.2 RC5 x86 - SetTheme Crashes
Thank you for your detailed response.
Finally found out why SetTheme crashes in my project! Problem is I was calling function after xaml load. When I call SetTheme between AddResourceProvider and LoadXaml it worked.
Also I've changed my project to D3D SDK project "shadow volume" and implemented D3D9 integration sample codes as shown in 1.2 offline documentation. After that all animation problems solved as well. Thats probably I was not properly handling D3D states or buffers just as you mentioned on your post. Since your integration documentation based on "shadow volume" project codes fit perfectly.
Finally found out why SetTheme crashes in my project! Problem is I was calling function after xaml load. When I call SetTheme between AddResourceProvider and LoadXaml it worked.
Also I've changed my project to D3D SDK project "shadow volume" and implemented D3D9 integration sample codes as shown in 1.2 offline documentation. After that all animation problems solved as well. Thats probably I was not properly handling D3D states or buffers just as you mentioned on your post. Since your integration documentation based on "shadow volume" project codes fit perfectly.
Re: Noesis v1.2 RC5 x86 - SetTheme Crashes
Cool! Glad to know everything is working fine. Please, for the evaluation purposes, remember that the version you are using is much worse the that current one.
Who is online
Users browsing this forum: No registered users and 1 guest