New Release D3D9Client Development

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
I've tried your battlestar and as far as I can tell it doesn't work in Orbiter 2010 at all.
News to me as I was just using it in 2010P1. Today around 6am eastern time to be exact. I was shooting missiles at it from my latest project.

---------- Post added at 09:19 PM ---------- Previous post was at 09:13 PM ----------

What I find strange is that some of my more complex projects like the Manifest and Atlantis City work fine and some of my simpler stuff like the Stinger CTDs with the D3D9Client. The newer Firefly shuttles work but the Firefly doesn't and the core Firefly DLL is basically a direct clone of the shuttle DLL.

---------- Post added at 09:44 PM ---------- Previous post was at 09:19 PM ----------

This section of code is causing the CTD with the Stinger.
Code:
void QJStinger::clbkVisualCreated (VISHANDLE vis, int refcount)
{
     char filepath[256];
     MESHHANDLE vm = GetDevMesh(vis,0);
     strcpy(filepath,"JTM\\QJStinger\\");
     strcat(filepath,topTexture);
     oapiSetTexture(vm,8 ,oapiLoadTexture(filepath));
     strcpy(filepath,"JTM\\QJStinger\\");
     strcat(filepath,botTexture);
     oapiSetTexture(vm,9 ,oapiLoadTexture(filepath));
}

If I comment out the oapiSetTexture() functions it works fine.

---------- Post added at 10:02 PM ---------- Previous post was at 09:44 PM ----------

Firefly and Skid now working. The Skid problem is the same as the Stinger with the oapiSetTexture() function which I suspect is the issue with the battle star and any other add-on I allow the changing of a texture like a nameplate.

The Firefly was just sloppy programming on my part with the handling of some GDI resources.

I must say that my ships look very nice in the D3D9Client. :cheers:
But..... None of my HUD text shows up. I don't know if it's my coding or the current state of the graphics client.
 
Last edited:

Chub777

New member
Joined
Dec 2, 2009
Messages
663
Reaction score
1
Points
0
Location
LEO


I am not exactly sure what's wrong but some of the DirectX modules won't found from your computer (most likely D3DCompiler_42.dll). Reinstall the DirectX runtimes.


Just wondering, where am I supposed to install the files? I installed it in C:/Users/(My Username), so maybe that's causing the CTD.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,670
Reaction score
800
Points
128
Just wondering, where am I supposed to install the files? I installed it in C:/Users/(My Username), so maybe that's causing the CTD.
Did you execute the Setup.exe after extracting the files in your folder. It would have been better to extract the files in an empty folder so that you can delete it after the setup is completed.

---------- Post added at 06:23 ---------- Previous post was at 05:25 ----------

This section of code is causing the CTD with the Stinger.
Code:
void QJStinger::clbkVisualCreated (VISHANDLE vis, int refcount)
{
     char filepath[256];
     MESHHANDLE vm = GetDevMesh(vis,0);
     strcpy(filepath,"JTM\\QJStinger\\");
     strcat(filepath,topTexture);
     oapiSetTexture(vm,8 ,oapiLoadTexture(filepath));
     strcpy(filepath,"JTM\\QJStinger\\");
     strcat(filepath,botTexture);
     oapiSetTexture(vm,9 ,oapiLoadTexture(filepath));
}
There is something odd going on with that code. I can't find anything wrong from the code. After tracing the problem from the client's side, it looks like the Orbiter doesn't reroute the GetDevMesh() call to a graphics client. GraphicsClient::clbkGetMesh(VISHANDLE vis, UINT idx) is never called.:shrug:

Is the GetDevMesh() not supposed to be called with-in clbkVisualCreated() ?

---------- Post added at 07:07 ---------- Previous post was at 06:23 ----------

Is the GetDevMesh() not supposed to be called with-in clbkVisualCreated() ?

It's used in the stock deltaglider in the same way and seems to be working fine. However, the DG is using DEVMESHHANDLE instead of MESHHANDLE.
 

Chub777

New member
Joined
Dec 2, 2009
Messages
663
Reaction score
1
Points
0
Location
LEO
Did you execute the Setup.exe after extracting the files in your folder. It would have been better to extract the files in an empty folder so that you can delete it after the setup is completed.


I didn't know that you had to run another .exe. D3D9 now works, thanks!
 

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
It's used in the stock deltaglider in the same way and seems to be working fine. However, the DG is using DEVMESHHANDLE instead of MESHHANDLE.

Changing MESHHANDLE to DEVMESHHANDLE did the trick.
 

n122vu

Addon Developer
Addon Developer
Donator
Joined
Nov 1, 2007
Messages
3,196
Reaction score
52
Points
73
Location
KDCY
But..... None of my HUD text shows up. I don't know if it's my coding or the current state of the graphics client.

Try turning on GDI compatibility mode if it isn't already. If HUD text is visible with it on, then you are using the old method to draw the HUD text. If you want it to work without compatibility turned on (for best framerate performance) you'll need to use the new sketchpad interface in the O2010 API to draw the HUD text.

If you want an example of what I did in the EAS Cortez I'd be happy to PM you, or share here for others to see. I simply modified the UMMU HUD messages (that show in the vessel HUD, not the UMMU themselves) to use sketchpad.
 

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
Try turning on GDI compatibility mode if it isn't already. If HUD text is visible with it on, then you are using the old method to draw the HUD text.
I've been using the same method I used why back maybe before even 2006 so I suspect that may be the reason. I'll have to check into this sketchpad interface.
 

n122vu

Addon Developer
Addon Developer
Donator
Joined
Nov 1, 2007
Messages
3,196
Reaction score
52
Points
73
Location
KDCY
Actually, you'll need to change to a VESSEL3 class in order to do so. Once using VESSEL3, all I did was change the clbkDrawHUD declaration to this:

Code:
bool clbkDrawHUD (int mode, const HUDPAINTSPEC *hps, oapi::Sketchpad *skp);
in my header file.

Then this in the .cpp:
Code:
bool <YOUR_VESSEL_NAME>::clbkDrawHUD(int mode, const HUDPAINTSPEC *hps, oapi::Sketchpad *skp)
{
	// draw the default HUD
	VESSEL3::clbkDrawHUD (mode, hps, skp);

	// UMmu display messages
	if(dHudMessageDelay>0)
	{
		skp->Text(5,hps->H/60*15,cUmmuHudDisplay,strlen(cUmmuHudDisplay));
	//	dHudMessageDelay-=oapiGetSimStep();
	//	if(dHudMessageDelay<0)
	//		dHudMessageDelay=0;
	}
    return true; 
}

Note the change from TextOut (old way) to skp->Text (new way).

Hope this helps.
 

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
Hope this helps.
Yup :cheers:
I was just playing around with it and don't see a problem with converting to Sketchpad other than my stuff will not work in 2006 which is important for some of the people that use my add-ons. What I may have to do is just pull the plug on 2006 for newer projects and tell people they will just have to use dual installs if they want to run my newer stuff and their older stuff.
 

Richy

VTOL craft Pilot
Joined
Nov 11, 2009
Messages
322
Reaction score
1
Points
0
Location
ZG
Website
www.richmans-maps.ch.vu
I also got the same error, when loading a scenario with Dan Steph's Deltaglider IV on a clean installed Orbiter 2010P1 and Win7.
It doesn't seem to be a common problem, or is it?
Exception Code=0xC0000005, Address=0x00412958
EAX=0x0365A398 EBX=0x0BCF0024 ECX=0x00000000 EDX=0x00000400 ESI=0x00000000 EDI=0x00000000 EBP=0x0BEDF468 ESP=0x009FF424 EIP=0x00412958
C:\Games\Orbiter\modules\server\orbiter.exe EntryPoint=0x004ACFAC, Base=0x00400000, Size=2097152
Critical exception in gc->RegisterVisObject(0x9EAF578, 0x10AA7C58) (GL-02). Continuing execution....
VesselClass Name = DeltaGliderIV
!!! Abnormal Program Termination !!!
Is it may be the case, that I'm missing DLLs? For Dx9 for example, or are these functions included in Dx11?
 

Cras

Spring of Life!
Donator
Joined
Apr 13, 2011
Messages
2,215
Reaction score
0
Points
36
Location
Los Angeles
Website
www.youtube.com
The DG-IV does not work with graphics clients. Any of them it seems. I have no idea why myself. The DG-IV does do things its own certain way, which may be why.
 

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
This may have been covered but I noticed that spot and point lights are off. The range value doesn't seem to be taken into effect and maybe other values as well. I can post code and pictures if needed.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,670
Reaction score
800
Points
128
This may have been covered but I noticed that spot and point lights are off. The range value doesn't seem to be taken into effect and maybe other values as well. I can post code and pictures if needed.
Yes, I can confirm that the range value doesn't have effect. I will fix it in the next release. I am not very happy in the current implementation of local lights, so, I may need to find a better way to do it and rework it. Normal maps are cousing some problems with local lights, so, does the problem disappear if you disable normal maps. I am not aware of any other problems with the local light sources.
 

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
Normal maps are cousing some problems with local lights, so, does the problem disappear if you disable normal maps.
No but if I throw a normal map into the mix it gets really funky with lots of light pretty much everywhere but that could be a problem with my normal map and not the client. I did a pretty sloppy quickie for the normal map.
Here are a couple of screen caps of what's going on. The first in standard Orbiter and the second in the client.
DXC1.jpg

DXC2.jpg



I should add that I'm running this in the release version of 2010P1 which may be the issue. I didn't realize that the clients only worked with the BETA versions of Orbiter. Sorry, I thought the BETA thing was if you were compiling code.
 
Last edited:

blixel

Donator
Donator
Joined
Jun 29, 2010
Messages
647
Reaction score
0
Points
16
Note also that clicking the button on the opposite side of the MFD (opposite of the Power On/Off button) causes Orbiter to crash. At least it does on mine. Are you able to reproduce that as well?

I'm having this problem again with RC39.

Choose any Atlantis scenario, bring up the VC and click any brightness button on any MFD. (The button that is opposite the Power On/Off button.) It causes an immediate crash.

Can anyone else reproduce this?
 

Jarod

Member
Joined
Dec 13, 2011
Messages
169
Reaction score
0
Points
16
Just checking, do we agree that d3d9client works with orbiter100830 but not orbiter111105 (vanilla) ?
CTD when D3D9 module is selected in the launchpad.
Code:
**** Orbiter.log
Build Nov  5 2011 [v.111105]
Timer precision: 4.46219e-007 sec
Found 0 joystick(s)
Module AtlantisConfig.dll .... [Build 111105, API 111105]
Module AtmConfig.dll ......... [Build 111105, API 111105]
Module DGConfigurator.dll .... [Build 111105, API 111105]
Module D3D9Client.dll ........ [Build 111210, API 101016]
Exception Code=0xC0000005, Address=0x0332650A
EAX=0x00000000 EBX=0x00000000 ECX=0x0339B690 EDX=0x0000000A ESI=0x036CC370 EDI=0x036CC370 EBP=0x00A2EC84 ESP=0x00A2EC44 EIP=0x0332650A
C:\Orphans\Jeux\orbiter3\Modules\Plugin\D3D9Client.dll EntryPoint=0x03359ECD, Base=0x03320000, Size=1249280
Exception in clbkDestroyRenderWindow()
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Just checking, do we agree that d3d9client works with orbiter100830 but not orbiter111105 (vanilla) ?
CTD when D3D9 module is selected in the launchpad.
A graphics client built for Orbiter 100830 won't work with Orbiter 111105, because Orbiter graphics API has changed in Orbiter 110824.

For D3D9Client RC38 there were 2 builds: one for Orbiter 2010-P1 and another for Orbiter beta, but I can't see an RC39 build for the beta release this time. You can't use the same build of graphics client with it as with Orbiter 100830.
 

steveyb

New member
Joined
Jan 3, 2012
Messages
3
Reaction score
0
Points
0
Client Installation??

Hi gents, a little off topic, but I really require idiot proof instructions as to the exact process of installing the client, so as to allow my triplehead2go set up to function (3x1280x1024 screens,total res. of 3840x1024.) I"m no developer, and
most of your threads here might aswell well be written in swahili, :lol: I am running the current version of orbitor 2010 and wish to know exactly where one places each part of the client files, ie: Modules, Textures, D3D9Client.......are these the only files I need, is there no exe. ......is this the current and correct file = D3D9ClientRC39.zip. (10-01-2010)...........so many questions :thumbup:

thanks steve
 

Astronut25

New member
Joined
Nov 17, 2009
Messages
102
Reaction score
0
Points
0
Location
Out there
RE: Client Installation??

...instructions as to the exact process of installing the client ... are these the only files I need, is there no exe...

all you need to do is open the file and dump everything into the Orbiter folder. to run the client, run Orbiter_ng.exe and go to the Modules tab and enable D3D9Client under Graphics engines, then you're ready to load a scenario.

...triplehead2go set up to function (3x1280x1024 screens,total res. of 3840x1024.)...

I don't know anything about multiple monitor support, but I think I saw something earlier about it.

...current and correct file = D3D9ClientRC39.zip. (10-01-2010)...

Usually, the file on the first page of this thread is the current version. as of this moment though, I believe RC39 is the current one.

Also, dont forget to create a Symbolic Link (or equivalent) of the Config folder and insert it into the Modules/server, this can solve many issues, like SC3 and Multistage addons. you could just copy the whole Config folder, but that would take up more space than a Symbolic Link.
 
Top