Page 1 of 1

CEGUI + D3D11

Posted: Mon Feb 22, 2010 12:23
by e3d_alive
first, hello to everyone
i'v started working with cegui and so far it's good
i'v attached it to my shared d3d10 surface renderier and it looks good

here's my question: is anyone developing it for RendererModule_d3d11[Direct3D11/Windows][so i can attach it with native device]
if nobody does, i'm gonna do it, i just don't want to waste time if that already exists

Re: CEGUI + D3D11

Posted: Mon Feb 22, 2010 18:33
by CrazyEddie
Hi,

As far as I'm aware nobody else is working on this and it's definite that nobody is currently working on it in an 'official' capacity.

HTH and good luck :)

CE.

Re: CEGUI + D3D11

Posted: Mon Feb 22, 2010 18:52
by e3d_alive
ok then i'm gonna do it ))
and tx for reply

Re: CEGUI + D3D11

Posted: Wed Feb 24, 2010 11:02
by e3d_alive
i'v succesfully(it's renders without glitches) ported CEGUI render to d3d11
Image
but i'm encoutering crash on delete

in Direct3D10Renderer::~Direct3D10Renderer()[i'v update it to dx11]
here delete d_defaultRoot;

code for render_root creaton have't changed:

Code: Select all

 d_defaultTarget = new Direct3D10ViewportTarget(*this);
 d_defaultRoot = new RenderingRoot(*d_defaultTarget);


i'v checked and defaultRoot is a valid pointer, the crash seems to appear inside it
here's the log[so CE woud't kill me]: http://pastebin.com/9YkvnScD

for now, i'm open to any ideas why[i'v comented all release in my code, crash still appear]
i think it can apear because of some stack damage(invalid function declaration)
or some other problem, but the code is very similar to d3d10
i'm open to any suggestions why

if i won't solve it i post code for tests
p.s. Windows 7 x64 / Visual Studio 2010/ Compiled as debug_DLL/ Renderer used as source[all dll definitions from him removed]

Re: CEGUI + D3D11

Posted: Wed Feb 24, 2010 11:48
by CrazyEddie
I watched your video the other day - very nice ;)

With regards to the issue, without any other info it sounds like a double-deletion issue of some kind. What's the exact crash message you get and any chance of a callstack (with symbols!)?

CE.

Re: CEGUI + D3D11

Posted: Wed Feb 24, 2010 14:25
by e3d_alive
while i'm seeking libs to completly rebuild source and linked that version, so i can c what function actually crashes
i manage to found that crash goes to _ASSERTE(_CrtIsValidHeapPointer(pUserData)); in operator delete[which means deleting something alredy deleted]
in something deeply internal in destructor RenderingRoot or in any of it's parents
i also linked it with release_with symbols[it's started crashing here CEGUI::System::create(*d_renderer); with heap damage error]
[i guess i'v messed up some zero memory or some ptr]

stack helped me to track it down to something internal[first i was thinking just Direct3D10Renderer crashes]

Re: CEGUI + D3D11

Posted: Wed Feb 24, 2010 19:04
by CrazyEddie
Seeking libs? If you mean for CEGUI, we provide precompiled dependencies for MSVC++ users to build CEGUI from source (linked on this page: viewtopic.php?f=6&t=4443 you'll want the 0.7.x-r1 version for 0.7.1 or v0-7 branch).

With regards to the assert issue(s), this can also be caused by freeing memory allocated on one heap on a different heap - this usually occurs if the various modules (the .exe and .dlls) are built with different c/c++ runitme settings (the various /MD /MDd /MT /MTd options), it's really, really important that all those match - we provide multiple versions of the dependency libs, so it's usually possible to build a config that corresponds to the way most apps get built.

CE.

Re: CEGUI + D3D11

Posted: Wed Feb 24, 2010 20:51
by e3d_alive
"this can also be caused by freeing memory allocated on one heap on a different heap" this can't be :D[but that led me to another idea]
because new and delete call for root goes from central application, everything else is in dll
unless in source, someone is allocation some class directly[i really doubt it]
my best guess is a function stack damage(my function is bigger that actually uses)
i'm gonna redo it tomorrow, hopefully i'm right[or recompile everything as dll, if i'm not :( ]
tx for lib link[i'm gonna test it with that also]

Re: CEGUI + D3D11

Posted: Wed Feb 24, 2010 21:25
by e3d_alive
i finally fixed it
fixed memory leaks and d3d memory leaks
it works[no crashes]
here's the download link http://www.megaupload.com/?d=E9K8JN5T

still in beta stage, read the readme

Re: CEGUI + D3D11

Posted: Thu Feb 25, 2010 09:48
by CrazyEddie
Cool. I haven't looked at it yet, but it's good that you fixe those issues :)

CE.

Re: CEGUI + D3D11

Posted: Tue Oct 30, 2012 10:57
by shenhui
Hello everyone,

I have tried D3D11Renderer in CEGUI 0.7.5, seems the following code m_pD3DRender = &CEGUI::Direct3D11Renderer::bootstrapSystem(m_pD3DDev, m_pD3DContext); must be called after m_pD3DContext->RSSetViewports( 1, &vp ); is called.

Is there a way that we can bypass this limitation ?

Any advice will be much appreciated.