Problem Making TI vessels compatible with D3D9Client

vchamp

Member
Joined
Mar 24, 2008
Messages
221
Reaction score
6
Points
18
Hi! I'm going to fix errors that prevent TI vessels from working with D3D9Client and need help in finding the reason of the following error in Orbiter.log:
Code:
---------------------------------------------------------------
>>> ERROR: Invalid mesh handle. Returned NULL. (Continuing)
>>> [oapiMeshGroup | .\OrbiterAPI.cpp | 1196]
---------------------------------------------------------------
Orbiter Version 100830
D3D9Client Build [Jul 12 2013]
Exception Code=0xC0000005, Address=0x095B7BE9
EAX=0x00000000 EBX=0x03AD3B50 ECX=0x00000000 EDX=0x0988D9C8  ESI=0x00000000 EDI=0x00000000 EBP=0x09A2BE3C ESP=0x009FF320  EIP=0x095B7BE9
d:\projects\vs\Modules\TotalImmersion\ShuttlePB.dll EntryPoint=0x095BB9D0, Base=0x095B0000, Size=126976
Critical exception in gc->RegisterVisObject(0x988D9C8, 0xBC0FEA8) (PB-01).
VesselClass Name = TotalImmersion\ShuttlePB
!!! Abnormal Program Termination !!!
The problem is likely in using the oapiMeshGroup() function through which I operate the mesh loaded with oapiLoadMeshGlobal().
What changes should I make to fix this? Where to start searching?
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,863
Reaction score
2,127
Points
203
Location
between the planets
Code:
>>> ERROR: Invalid mesh handle. Returned NULL. (Continuing)

I would assume that it is due to the add-on using the default MESHHANDLE. There's another handler class, called DEVMESHHANDLE, that is supposed to be used when working with graphics clients, because the Doctor cannot know how clients will be storing meshes.

I don't know what addon TI stands for, but that's the first thing I'd look for in the code.
Most functionality can be kept by just changing all MESHHANDLE to DEVMESHHADLE, but if you use MeshGroupTransform anywhere, things will get a lot trickier...
 

IronRain

The One and Only (AFAIK)
Administrator
Moderator
News Reporter
Donator
Joined
Oct 11, 2009
Messages
3,484
Reaction score
403
Points
123
Location
Utrecht
Website
www.spaceflightnewsapi.net
Ah, I see... Spacecraft3 is the problem, then. Well, there's not much you can do, since you don't have access to the sourcecode.
Except of course, there's a backwards compatible replacement in development. I think that should work.

But Spacecraft 3 is compatible with DX9. I can't see a reason why Spacecraft3 is the issue here.

The problem is the Shuttlepb.dll that comes with [ame="http://www.orbithangar.com/searchid.php?ID=3844"]Total Immersion - Shuttle PB[/ame]. That DLL needs to be updated with the new meshhandles.
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,906
Reaction score
201
Points
138
Location
Cape
Never mind
 
Last edited:

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,863
Reaction score
2,127
Points
203
Location
between the planets
The problem is the Shuttlepb.dll that comes with Total Immersion - Shuttle PB . That DLL needs to be updated with the new meshhandles.

Ah sorry... I should have looked closer. Most TI vessels seemed to be SC3 based.
 

Mandella

Space Cultist
Donator
Joined
Apr 5, 2008
Messages
368
Reaction score
0
Points
0
Vchamp, since you are looking at the TI series again, could you adjust the scale on your TI Descartes class vessels?

Burch made his Descartes before he understood Orbiter scale, and as such the vessels are about 40 to 50 percent too large, even compared to his later craft which he designed properly. In my own install I have "fixed" the scale, but that breaks when I try to put in your TI Descartes over it.

Obviously, this is not really your problem to fix, but would be appreciated non-the-less.

(To clarify, your addon works perfectly with the stock Descartes, but the stock Descartes is off scale with UMMU, other orbiter craft, stations, and the rest of Burch's work.)
 

vchamp

Member
Joined
Mar 24, 2008
Messages
221
Reaction score
6
Points
18
Most functionality can be kept by just changing all MESHHANDLE to DEVMESHHADLE, but if you use MeshGroupTransform anywhere, things will get a lot trickier...
What can I do with oapiLoadMeshGlobal() calls that return MESHHANDLE? There is no analogous function for DEVMESHHANDLE. The same is with oapiMeshMaterialCount() and oapiMeshMaterial().
 

TachyonDriver

Donator
Donator
Joined
May 14, 2008
Messages
168
Reaction score
0
Points
0
Ah.... vchamp... this might explain why the Tx doesn't work in D3D9 for me: I'd installed the TI virtual cockpit for it!. I'll re-try a new Tx install.

---------- Post added at 09:06 PM ---------- Previous post was at 03:43 PM ----------

Well.. the Tx now appears in D3D9,however, its custom HUD and functions (canard retract & deploy, engine cover, antenna) do not work.

At least not using the Ti VC prevented a CTD.
 
Top