Set my own xamlprovider
HI I'm integrating it to O3DE, I set my own xamlprovider, it works well when . it will call "loadxaml" in my own provider.
For this situation, it didn't call my override function, how to load xaml so that it can call my provider?THX
Code: Select all
Noesis::GUI::LoadApplicationResources("Theme/NoesisTheme.DarkBlue.xaml");
For this situation
Code: Select all
Noesis::Ptr<Noesis::Grid> xaml = Noesis::GUI::LoadXaml<Noesis::Grid>("Test.xaml");
Re: Set my own xamlprovider
Noesis::GUI::LoadXaml should invoke your LoadXaml implementation if the provider is correctly installed.
All our examples use custom XamlProviders, could you please have a look at them?
All our examples use custom XamlProviders, could you please have a look at them?
Re: Set my own xamlprovider
thx, in fact I have tried your local provider, such as LocalXamlProvider and LocalTextureProvider, It works well for the pure xaml,
but for the xaml reference a .jpg, the texture seems didn't get a proper result, Eg, i want to show an image, no matter what image I use,
the render always as below, in fact, the texture width and height is right, seems the LocalTextureProvider can read the .jpg, but the result is not right
do I have to set my own provider?
but for the xaml reference a .jpg, the texture seems didn't get a proper result, Eg, i want to show an image, no matter what image I use,
the render always as below, in fact, the texture width and height is right, seems the LocalTextureProvider can read the .jpg, but the result is not right
do I have to set my own provider?
Re: Set my own xamlprovider
You always need a Texture provider for loading images. This seems to be a problem with the integration or with the renderer implementation. I recommend using RenderDoc for this kind of errors. Also comparing with any of our examples using images, like DataBinding or Inventory.
Re: Set my own xamlprovider
thx, I have fixed this using renderdoc, now everything works well except the glphys.
Here is a simple test I use renderdoc and find that the input texture is below, not like a sdf texture, and the texturesize is 0 (batch.vertexUniforms[1]), I use SetGlyphCacheWidth to set it 1024, so I think texturesize should be 1024. Here is my config, I didn't implement FNoesisFontProvider(implemented xamlprovider and textureprovider), I think it can use default font, corret me if I'm wrong, anything else I miss?
Here is a simple test I use renderdoc and find that the input texture is below, not like a sdf texture, and the texturesize is 0 (batch.vertexUniforms[1]), I use SetGlyphCacheWidth to set it 1024, so I think texturesize should be 1024. Here is my config, I didn't implement FNoesisFontProvider(implemented xamlprovider and textureprovider), I think it can use default font, corret me if I'm wrong, anything else I miss?
Code: Select all
NoesisXamlProvider = *new FNoesisXamlProvider();
NoesisTextureProvider = *new FNoesisTextureProvider();
//NoesisFontProvider = *new FNoesisFontProvider();
// Resource Providers
Noesis::GUI::SetXamlProvider(NoesisXamlProvider);
//Noesis::GUI::SetFontProvider(NoesisFontProvider);
Noesis::GUI::SetTextureProvider(NoesisTextureProvider);
// Set fall back fonts and default font properties
const char* fonts[] = { "Fonts/#PT Root UI", "Arial", "Segoe UI Emoji" };
Noesis::GUI::SetFontFallbacks(fonts, 3);
Noesis::GUI::SetFontDefaultProperties(15.0f, Noesis::FontWeight_Normal, Noesis::FontStretch_Normal, Noesis::FontStyle_Normal);
// Set application resources
Noesis::GUI::LoadApplicationResources("Theme/NoesisTheme.DarkBlue.xaml");
Re: Set my own xamlprovider
For debugging this kind of issues I recommend testing against our implementation (D3D11 for example). Just take a minimal XAML, open it with XamlPlayer and take a RenderDoc capture. Now, use the same XAML in your implementation, take another RenderDoc capture and compare both.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 13 guests