optimiz3 / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Broken callback handling for UVAtlas #837

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am getting an exception when trying to use a callback method for a watchdog 
timer to UVAtlas:

ArgumentException: Complaining about the pinned object being non 
blittable/primitive

SlimDX code: GCHandle handle = GCHandle::Alloc( callback, GCHandleType::Pinned 
);

IIRC Marhsal.GetFunctionPointerForDelegate() should be able to handle such 
cases.

Original issue reported on code.google.com by dbl...@fastmail.fm on 10 Oct 2011 at 5:55

GoogleCodeExporter commented 8 years ago
http://msdn.microsoft.com/en-us/library/367eeye0(v=vs.80).aspx Looks like the 
recommended way to do things.

Original comment by dbl...@fastmail.fm on 10 Oct 2011 at 5:59

GoogleCodeExporter commented 8 years ago
Never mind, I guess what is needed is just to remove the GCHandleType::Pinned 
part? At least thats what gcroot<> does.

Original comment by dbl...@fastmail.fm on 10 Oct 2011 at 6:09

GoogleCodeExporter commented 8 years ago
Yep, seems to work for me. Partition() will also need modifying.

Original comment by dbl...@fastmail.fm on 10 Oct 2011 at 6:20

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r2149.

Original comment by Mike.Popoloski on 15 Nov 2011 at 7:24

GoogleCodeExporter commented 8 years ago
Fix doesnt work see new issue 849(not sure how to mark as un-fixed...:-)

Original comment by dbl...@fastmail.fm on 20 Nov 2011 at 1:49