New Release D3D9Client Development

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,635
Reaction score
155
Points
63
Have you linked with Orbitersdk\lib\gcAPI.lib ?
Apart from that, there are mainly 3 reasons why SetupCustomCamera would return NULL:
  1. hSurf is NULL (I don't think this is the case here)
  2. Config->CustomCamMode==0 (I don't think this is the case here, as you've checked that)
  3. hSurf is not a 3DRenderTarget (Also, I don't think this is the case here)
 

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,191
Reaction score
191
Points
63
Website
users.kymp.net
I'll write a better reply when I got more time available pretty soon. But have you called gcInitialize() ? Also, the gcSetupCustomCamera() is a part of an old API but of course it's still supported.

To use a new API you can write: (does not require any link libraries)
Code:
gcCore *pCore = gcGetCoreInterface();  // Defined in gcConst.h
if (pCore) {
    pCore->SetupCustomCamera(....);
}
else {
     // Running DX7
}
 

igel

Addon Developer
Joined
Mar 28, 2008
Messages
210
Reaction score
58
Points
28
Website
www.pin-plus.ca
But have you called gcInitialize() ?
No, I did not (know I have to call it) :) Will try later today, or, more likely, tomorrow. All other suggested things - checked them out, all look OK (lib is linked, CustomCamMode=1, etc.)

Second version of API - did not even see it before, also have to check it out...
 

igel

Addon Developer
Joined
Mar 28, 2008
Messages
210
Reaction score
58
Points
28
Website
www.pin-plus.ca
I'll write a better reply when I got more time available pretty soon. But have you called gcInitialize() ? Also, the gcSetupCustomCamera() is a part of an old API but of course it's still supported.

To use a new API you can write: (does not require any link libraries)
Code:
gcCore *pCore = gcGetCoreInterface();  // Defined in gcConst.h
if (pCore) {
    pCore->SetupCustomCamera(....);
}
else {
     // Running DX7
}
Two big thanks!
a) it was missing gcInitialize() indeed;
b) second interface is indeed cleaner.

Now, I hope for the answer to the second question, about the expected lifecycle of the internal mirrors in 2016 client.
 

igel

Addon Developer
Joined
Mar 28, 2008
Messages
210
Reaction score
58
Points
28
Website
www.pin-plus.ca
Now, I have a third question - about the vessel's Size value.

In Orbiter 2010, you can approach vessel pretty much indefinitely, regardless of what Size is set for it. In Orbiter 2016, Size is the hard limit - you cannot get your view any closer to the vessel than that. What's worse, the speed of view movement (with mouse wheel) is not linear when you are close to the Size limit, so when you start close, it takes forever to distantiate.

Is there a way to get to previous 2010 behaviour for that in 2016? I've checked and checked, experimented with Size and ClipRadius but did not find any client option or configuration or API.
 
Top