External MFD: Crash on Repaint

whitewatcher

New member
Joined
Jun 2, 2008
Messages
23
Reaction score
0
Points
0
I want to create a Network MFD for streaming MFD output over the network (so that I can use a SBC in my simpit for MFD handling).

So I've created an external MFD (very similar to the ExMFD.dll plugin):

Code:
...

MFDSPEC spec = {{0,0,100,100},6,6,10,10};
mymfd = new ExternMFD( spec );
oapiRegisterExternMFD( mymfd, spec );
// Get the Surface
SURFHANDLE surf = mymfd->GetDisplaySurface ();

...

oapiUnregisterExternMFD( myfd);

When I do the "GetDisplaySurface", it crashes. Can anybody here tell me why?
I would appreciate every guess ....
 

whitewatcher

New member
Joined
Jun 2, 2008
Messages
23
Reaction score
0
Points
0
Well now, .... I have not found a good solution yet.

Seems that orbiter only allows access to the surfaces during special phases of a frame cycle.
I've created a minimum extMFD-like-dialog (size 1x1 pixel) and registered it to the orbiter api. When the dialog receives a redraw message, it's obviously the best time to capture the image.
 
Top