New ReleaseD3D9Client Development

kuddel

Donator
Donator
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

Beta Tester
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
}

n72.75

Tutorial Publisher
Donator
This something I'm might be interested in using eventually for NASSP optics, but I have no idea how to do the implementation.

igel

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...

Felix24

Member
To keep the sun glint from disappearing completely at full smoothness, try this at line 285 of Metalness.fx:

float fD = GGX_NDF(dHN, lerp(0.01f, 1.0f, fRgh3));

igel

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.