Has anyone out there SUCCESSFULLY RENDERED a mesh loaded via either of these functions? D3DXLoadMesh works fine, but parseloaded meshes just won't render for me !!?! The code is almost identical, I'm getting pissed off with it !!! I'm crashing and burning inside D3DX8.dll , and the code that falls over refers to the data segment register DS, which would be fine if I was using static variables in the application data segment... When I use dynamically allocated memory, SOMETIMES I get access violation exceptions, and SOMETIMES NOT !!! I'm calling GlobalAlloc on an NT (xp) machine, and here I was thinking that Global meant GLOBAL :(

How can I ensure that the memory I allocate is accessible by D3D?
Do I have to code a goddamn exception handler to fix this?
Why doesn't global mean global?
If I was to (gasp) convert ALL of my linkedlist code to use Heap objects, is the application stack increased on the fly, or am I meant to specify a large stack value? (I'm under the impression that a process heap is kept in high stack memory for that process)
Is this a solution or not? Should I be creating my OWN heap?
Someone HELP before I break something :(
I've spent 8 months now dicking around with these issues, I want answers :alright:
Posted on 2003-05-14 01:39:42 by Homer
All the standard memory allocation stuff on win32 allocates from your heap. On NT, both GlobalAlloc and LocalAlloc ends up calling HeapAlloc. The local/global functions are leftovers from win16, and their names are misleading.

When you're calling DX, you're calling code that (just as any other DLL) is now in your process space. Thus, it can access any heap memory (etc) that you have - no need to worry about local/global. There isn't really any "truely global" memory on win32.

My guess is there's some subtle screwup somewhere in your code. Perhaps too little memory is being allocated, perhaps the stack has become unaligned, perhaps some wrong parameters are being passed, perhaps registers are trashed - countless fun possibilities.

Perhaps somebody can help if you attach your program, along with the crash information from windows (registers, stack dump, error type).
Posted on 2003-05-14 02:19:47 by f0dder
Ok, you asked for it :grin:
Posted on 2003-05-15 23:21:13 by Homer
...filesize restriction :(
Here's the rest..

The hierarchy loader seems to be working fine: if you disable the call in the Render function to draw meshes, it'll load them without error. The textures are definitely being loaded, you can see their names appearing in the appropriate control. I had this code rending objects loaded using the object instancer button, so I know that the texture loader and media functions are good.. I've replaced the Render code since then, as I've been trying to get the Hierarchy version working because I want to import meshes in frame hierarchies with intact animations. Please help me figure what's wrong - the mesh loader code is just a modified version of the (working) D3DX meshloader (which collapses all meshes and doesn't do animations or anything that could be considered interesting)
Posted on 2003-05-15 23:22:01 by Homer
Afternoon, EvilHomer2k.


Where's dinput8.inc?

Posted on 2003-05-16 01:06:39 by Scronty
Scronty, I posted it in another thread some time back..
here it is again :)
Posted on 2003-05-16 02:07:50 by Homer