D3D9Client (semi-native) + Orbiter test build

Ajaja

Active member
Joined
Apr 20, 2008
Messages
226
Reaction score
93
Points
28
Last edited:

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,687
Reaction score
1,337
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
@n72.75
Check d3dx9_NN.dll files in your C:\Windows\System32 and C:\Windows\SysWOW64 folders.
Do you have all of them (from d3dx9_24.dll to d3dx9_43.dll)?
If not, just install https://www.microsoft.com/en-us/download/details.aspx?id=8109


And what DirectX SDK did you use compiling D3D9Client? I use DXSDK_Jun10.exe ( https://www.microsoft.com/en-us/download/details.aspx?id=6812 ) and it links D3D9Client.dll with d3dx9_43.dll dependency.
Well this is an odd one then. I have all the required libraries, and the sdk and runtimes are the ones you linked. I have absolutely no issue running the regular d3d9 client in 2016 or R90. And the standalone build that @jarmonik posted a few months ago works too.

I'm probably just too much of a cmake noob. I'm letting VS2019 do the work for me.
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,687
Reaction score
1,337
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
Ahh, that could be it. I can and probably should debug my own code independently of the d3d9 branch first, before I get too far off on another tangent. I'll give the release x64 config a try tonight and see if that fixes it. Thanks.
 

patio

Member
Joined
Sep 13, 2011
Messages
41
Reaction score
14
Points
23
hello

I tested this branch and I detected a problem

the legacy 2d panels are not stretched correctly

see issue I just posted on github
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,687
Reaction score
1,337
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
Maybe it's looking for debug libraries/dlls?
I built https://github.com/orbitersim/orbiter/tree/d3d9client for myself, everything works fine, but I changed target to x64-Release.

So tried rebuilding under a release config, and that caused even more issues. The cmake config generation fails with the following error, C++ compiler fails to compile a test-program.

Code:
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
 

supersonic71

Member
Joined
Sep 20, 2021
Messages
59
Reaction score
86
Points
18
Location
Asia Pac
Website
github.com
And what DirectX SDK did you use compiling D3D9Client? I use DXSDK_Jun10.exe
Is this something which you have to manually choose inside Visual Studio 2019? I just installed the SDK.

I'm having the same issue as @n72.75 , Orbiter Server starts but then closes with the error "DirectX runtimes may be missing, see the Doc for more information".
d3dx9_43.dll doesn't appear in the log file, even though the file does exist in the system directory.
 

Ajaja

Active member
Joined
Apr 20, 2008
Messages
226
Reaction score
93
Points
28
Is this something which you have to manually choose inside Visual Studio 2019? I just installed the SDK.
I just installed DirectX SDK too. And I use Visual Studio 2022 not 2019. But the most important thing is that I changed CMAKE_BUILD_TYPE to Release.
 

supersonic71

Member
Joined
Sep 20, 2021
Messages
59
Reaction score
86
Points
18
Location
Asia Pac
Website
github.com
I just installed DirectX SDK too. And I use Visual Studio 2022 not 2019. But the most important thing is that I changed CMAKE_BUILD_TYPE to Release.
Thanks, so after changing to Release, my log file looks like this (d3dx9_43 is loading)
Code:
000000.000: D3D9 DLLs  : C:\WINDOWS\SYSTEM32\d3d9.dll [v 10.0.22000.120]
000000.000:            : C:\WINDOWS\SYSTEM32\d3dx9_43.dll [v 9.29.952.3111]
000000.000: ---------------------------------------------------------------
000000.000: Module D3D9Client.dll ........ [Build 220406, API 220406]
000000.000:
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
000000.000: D3D9: [3DDevice Initialized]

However I still get the same error
1649249827440.png
 

Ajaja

Active member
Joined
Apr 20, 2008
Messages
226
Reaction score
93
Points
28
Try to check Modules\D3D9Client\D3D9ClientLog.html
It might give some clue.
 

supersonic71

Member
Joined
Sep 20, 2021
Messages
59
Reaction score
86
Points
18
Location
Asia Pac
Website
github.com
It might give some clue.
That Modules\D3D9Client folder itself is missing! ?
Just to see what happens, copy pasted Modules\D3D9Client folder from beta to the build, and now Orbiter_NG runs! (almost, some issue with planet textures)
So when building, for some reason that folder isn't getting created

1649255328017.png 1649256282130.png
 
Last edited:

Abloheet

Addon Developer
Addon Developer
Joined
Apr 18, 2009
Messages
212
Reaction score
40
Points
43
Location
Kolkata,West Bengal
Is this version of the client (developed in this branch) the one which is now merged into the OpenOrbiter main branch?
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
Is this version of the client (developed in this branch) the one which is now merged into the OpenOrbiter main branch?
Mostly yes. There are many fixes in the main branch those are not included in this (published) test build.
 

Marg

Active member
Joined
Mar 20, 2008
Messages
482
Reaction score
66
Points
28
I use Space Shuttle Vessel a lot, I have noticed that in 70% when I start pre launch scenario there are no shadows (vessel - vessel, self shadows). When launch happens, shadows appear later at some point above the clouds. Maybe atmosphere rendering causes this? (client R4.16, Mar 22 2021 + Orbiter 28 Aug 2016). Maybe there is newer version of the client?
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,870
Reaction score
2,867
Points
188
Website
github.com
I use Space Shuttle Vessel a lot, I have noticed that in 70% when I start pre launch scenario there are no shadows (vessel - vessel, self shadows). When launch happens, shadows appear later at some point above the clouds. Maybe atmosphere rendering causes this? (client R4.16, Mar 22 2021 + Orbiter 28 Aug 2016). Maybe there is newer version of the client?
I've also noticed the shadows sometimes don't appear... this happens a very low percentage of times, and so I never managed to find anything, not even in logs.

While I'm "complaining", there is also lots of flickering in the payload bay blankets when the local lights are on: one blanket flickers, the next one doesn't, the next does, etc. They are separate meshes, loaded at the same time and use the same material and same texture.


EDIT: these 2 posts should probably be moved to the D3D9 main thread.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
While I'm "complaining", there is also lots of flickering in the payload bay blankets when the local lights are on: one blanket flickers, the next one doesn't, the next does, etc. They are separate meshes, loaded at the same time and use the same material and same texture.
Is this a new problem specific to some version or has it existed a longer time ? The client can render 4 or 8 light source depending on configuration, if more sources are in use then some of them will be disabled which might cause flickering if different lights gets disabled in different frames. Could that be it ?
 
  • Like
Reactions: GLS

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,870
Reaction score
2,867
Points
188
Website
github.com
Is this a new problem specific to some version or has it existed a longer time ? The client can render 4 or 8 light source depending on configuration, if more sources are in use then some of them will be disabled which might cause flickering if different lights gets disabled in different frames. Could that be it ?
I see. That probably is it, as I had 7 lights on, and (stupidly) only 4 in the settings. Bumped it up to 8 and no more flickering! :hailprobe:
 

alektron

New member
Orbiter Contributor
Joined
Dec 15, 2022
Messages
2
Reaction score
0
Points
1
Location
No
Regarding the issues with D3D dll's.
I've been getting myself warmed up with the codebase lately and while I'm starting to get a good grasp of the 'server' side stuff, I now wanted to peek into the rendering side of things. I quickly noticed that I can't get the D3D9 module to load on debug configuration.

After some dependency walker analysis and CMake studying (quite the CMake noob right here) I noticed that the debug build is linking against the d3dx9d.lib (notice the 'd') debug lib. Now this generally links fine, since the debug lib is indeed included in the DirectX SDK. However I can not find any trace of a corresponding debug .dll.
Not in the SDK directory, not in System32/SysWOW64 and also... not really on the internet (always fun to search the internet for dll issues with all the 'just download the dll from us' sites).
The only info I could find is that debug builds of D3D were a pre Win7 thing and are not really used anymore. Which seems to match my findings that this dll is nowhere to be found.

By removing the
Code:
debug d3dx9d.lib
and removing the 'optimized' from
Code:
optimized d3dx9.lib
I got it to work without issues.

Does anyone know more about the current state of D3D debug builds? Is this something that maybe can, or even should, be removed?
This would obviously raise the question, why it works for some people (@jarmonik especially). Maybe some old windows installs?
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,870
Reaction score
2,867
Points
188
Website
github.com
For the debug build to load you need to select a debug feature (can't remember the name, but it's pretty obvious) when you install DirectX. I had the same problem, and that fixed it (it's in some thread here in the forum).
 

alektron

New member
Orbiter Contributor
Joined
Dec 15, 2022
Messages
2
Reaction score
0
Points
1
Location
No
As it turns out I was trying with the End-User runtimes all this time...
Pretty sure I was checking twice that I was getting the SDK but... oh well
 
Top