Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / memblock mesh help

Author
Message
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 2nd Oct 2005 04:26
Hey, I spent a while trying to port the matrix in a memblock code from the codebase to c++ for darksdk because it seemed that after writing a few extra functions for it it would be perfect.

I ported it over and it compiles grand and none of the functions cause an error, but trying to make a mesh from the resulting memblock blew up darksdk quite well.

I took a deeper look at his creation function (rather than the staring into space i've-been-doing-this-for-hours look i was using when porting the code) and I realised that it was no mesh format that I knew, didnt even write an FVF in the header. I figured that was why it was blowing up so i started working on a function to convert his memblock data to a standard FVF 338 format and make a mesh from it.

I've had several different versions of that function now and they all blow up when i try and make a mesh from it - unhandled exception, access violation. The line of the stack it halts on is: 0043DAD7 rep movs dword ptr [edi],dword ptr [esi]
which is just under: ?MakeLocalMeshFromPureMeshData@@YA_NPAUsMesh@@KKPAMKK@Z:

Anyway, i'll post my converting function and also my port of his function to make the original memblock so you can see the format he uses and how im trying to convert it. If anyone can find the error that makes it blow when converting to a mesh i would be very appreiciative

If its still there when whoever looks at this you can see both functions in syntax highlighted glory here: http://pastebin.com/380163 but i dunno how long before it times out and disapears.

If its gone, my function:



and his (ported):



im stumped, and annoyed :/

Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 2nd Oct 2005 06:55
unbeliviable, as you can see if you look at the MakeMeshFromMemblock command i was passing it the unaltered memblock! never my new data! GRAH! stupid stupid dave.

Anyway it doesnt crash now but its still not right, the triangles are seperated out and dont connect properly. Juding by how to reacts to calculate normals and randomise height functions im pretty sure the original data is calculated properly so its my conversion messing up.

God knows if any of the 20 or so variations on my converted that i went through trying to fix this actually worked. back to square one >.>;

if anyone can see the proble, do jump on in

Login to post a reply

Server time is: 2024-04-23 22:08:47
Your offset time is: 2024-04-23 22:08:47