CEGUI + D3D11

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
e3d_alive
Just popping in
Just popping in
Posts: 6
Joined: Mon Feb 22, 2010 12:20

CEGUI + D3D11

Postby e3d_alive » Mon Feb 22, 2010 12:23

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI + D3D11

Postby CrazyEddie » Mon Feb 22, 2010 18:33

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.

User avatar
e3d_alive
Just popping in
Just popping in
Posts: 6
Joined: Mon Feb 22, 2010 12:20

Re: CEGUI + D3D11

Postby e3d_alive » Mon Feb 22, 2010 18:52

ok then i'm gonna do it ))
and tx for reply

User avatar
e3d_alive
Just popping in
Just popping in
Posts: 6
Joined: Mon Feb 22, 2010 12:20

Re: CEGUI + D3D11

Postby e3d_alive » Wed Feb 24, 2010 11:02

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]

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI + D3D11

Postby CrazyEddie » Wed Feb 24, 2010 11:48

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.

User avatar
e3d_alive
Just popping in
Just popping in
Posts: 6
Joined: Mon Feb 22, 2010 12:20

Re: CEGUI + D3D11

Postby e3d_alive » Wed Feb 24, 2010 14:25

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]

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI + D3D11

Postby CrazyEddie » Wed Feb 24, 2010 19:04

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.

User avatar
e3d_alive
Just popping in
Just popping in
Posts: 6
Joined: Mon Feb 22, 2010 12:20

Re: CEGUI + D3D11

Postby e3d_alive » Wed Feb 24, 2010 20:51

"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]

User avatar
e3d_alive
Just popping in
Just popping in
Posts: 6
Joined: Mon Feb 22, 2010 12:20

Re: CEGUI + D3D11

Postby e3d_alive » Wed Feb 24, 2010 21:25

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI + D3D11

Postby CrazyEddie » Thu Feb 25, 2010 09:48

Cool. I haven't looked at it yet, but it's good that you fixe those issues :)

CE.

shenhui
Just popping in
Just popping in
Posts: 10
Joined: Thu Feb 17, 2011 06:36

Re: CEGUI + D3D11

Postby shenhui » Tue Oct 30, 2012 10:57

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 20 guests