Re: Noesis documentation and few question about 2.1.0 verison (C++)
Posted: 19 Dec 2017, 05:07
Could you try with the latest beta? (b12). We fixed an issue related to the memory manager.
Welcome to our official discussion site. You’ll find topics on features, bugs, development, and general support here
https://www.noesisengine.com/forums/
void MyNoesisINI()
{
auto logHandler = [](const char*, uint32_t, uint32_t level, const char* channel,
const char* message)
{
if (strcmp(channel, "") == 0)
{
// [TRACE] [DEBUG] [INFO] [WARNING] [ERROR]
const char* prefixes[] = { "T", "D", "I", "W", "E" };
const char* prefix = level < NS_COUNTOF(prefixes) ? prefixes[level] : " ";
printf("[NOESIS/%s] %s\n", prefix, message);
}
};
Noesis::GUI::Init(nullptr, logHandler, nullptr);
auto xaml = Noesis::GUI::LoadXaml<Noesis::FrameworkElement>("Main.xaml");
noesis_global_view = Noesis::GUI::CreateView(xaml.GetPtr());
noesis_global_view->SetIsPPAAEnabled(true);
Noesis::Ptr<NoesisApp::RenderContext> device = NoesisApp::FindBestRenderContext(); // Line 109
noesis_global_context->SetVGContext(device->GetDevice()->GetVGContext()); // noesis_global_context is Noesis::RenderDevice
noesis_global_view->GetRenderer()->Init(noesis_global_context.GetPtr());
} NoesisApp.dll!68b2d18c() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for NoesisApp.dll]
> Urho-Noesis_d.exe!MyNoesisINI() Line 109 C++
Urho-Noesis_d.exe!MyApp::Start() Line 474 C++
Urho-Noesis_d.exe!Urho3D::Application::Run() Line 79 C++
Urho-Noesis_d.exe!RunApplication() Line 684 C++
Urho-Noesis_d.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * prevInstance, char * cmdLine, int showCmd) Line 684 C++
[External Code]
> Urho-Noesis_d.exe!MyNoesisINI() Line 109 C++
- device {mPtr=0x00000000 <NULL> } Noesis::Ptr<NoesisApp::RenderContext>
- mPtr 0x00000000 <NULL> NoesisApp::RenderContext *
- Noesis::BaseComponent <struct at NULL> Noesis::BaseComponent
- Noesis::BaseRefCounted <struct at NULL> Noesis::BaseRefCounted
- Noesis::BaseObject <struct at NULL> Noesis::BaseObject
__vfptr <Unable to read memory> void * *
- mRefCount {...} Noesis::Atomic<int>
- Noesis::Atomic32<int> {val=??? } Noesis::Atomic32<int>
val <Unable to read memory>
logHandler void <lambda>(const char * __formal, unsigned int __formal, unsigned int level, const char * channel, const char * message){...} MyNoesisINI::__l2::void <lambda>(const char *, unsigned int, unsigned int, const char *, const char *)
+ xaml {mPtr=0x00000000 <NULL> } Noesis::Ptr<Noesis::FrameworkElement>> ig4icd32.dll!513b7c40() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for ig4icd32.dll]
[External Code] auto xaml = Noesis::GUI::LoadXaml<Noesis::FrameworkElement>("Main.xaml");
noesis_global_view = Noesis::GUI::CreateView(xaml.GetPtr());
noesis_global_view->SetIsPPAAEnabled(true);
noesis_global_device = NoesisApp::GLFactory::CreateDevice();
noesis_global_view->GetRenderer()->Init(noesis_global_device.GetPtr());NoesisApp::Launcher::RegisterAppComponents();That's for registering AppFramework components (Application, Window, RenderContext). You don't need that for integrating with an existing engine. Please, have a lookt at 'IntegrationGLUT' sample. Thanks!Btw. I discover that if I use this:error dissappear from previous post (Line 109). Then other my code in previous post I think is bad.Code: Select allNoesisApp::Launcher::RegisterAppComponents();
You mean Urho as dll ?Wanderer, I highly recommend you to build Urho3D (and remove all Urho3D's default UI) as a library
I now use OpenGL for Urho (I change it because there is some RenderDevice for GL implementation).Also, you said you are using dx9 for Urho3D; in that case you'll need to write your own RenderDevice implementation.
The change is that now instead of setting the three providers (Xaml, Texture and Font) in one shot, you can set them separately. More information about resource providers.And now I discover, xaml files are not loaded. I don't use the XamlProvider because I don't know how to use it (there are some examples but without understand), there was SetResourceProvider (in Noesis 2.0.2) and now it is changed.