Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Visualization Project
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter Visualization Project Orbiter external graphics development.

Reply
 
Thread Tools
Old 10-08-2010, 10:24 PM   #16
jarmonik
Beta Tester

Default

Looks like the D3D7Client is incomplete. Functions GetVCHUDSurface() and GetVCMFDSurface() are used in a Vessel code but they are not defined in anywhere. How is this supposed to work anyway ? I just can't figure out the MFD update mechanism.

---------- Post added at 01:24 ---------- Previous post was at 00:17 ----------

This is the code:
Code:
if (bVC) {
        sHUD = gc->GetVCHUDSurface (&hudspec);
        for (mfd = 0; mfd < MAXMFD; mfd++)
            sMFD[mfd] = gc->GetVCMFDSurface(mfd, &mfdspec[mfd]);
}
jarmonik is offline   Reply With Quote
Old 10-08-2010, 11:02 PM   #17
Poscik
Addon Developer
 
Poscik's Avatar
Default

Those functions bodies, sHUD and sMFD are (I think) in *.lib file, so they don't have to be defined in code. And about mfd mechanism: I think it's only obtaining handles of all MFDs. All the update work is made by Orbiter.exe. When trying to update MFD, exe refers to sMFD to check if there is any MFD, and then applies Update() to selected MFD. But I don't have a clue why GetVCHUDSurface is used there. I wonder it's for updating MFDs even in VC mode.

Last edited by Poscik; 10-08-2010 at 11:06 PM.
Poscik is offline   Reply With Quote
Thanked by:
Old 10-09-2010, 08:49 AM   #18
jarmonik
Beta Tester

Default

Yes, you are right. Those functions comes from the base class implementation oapi::GraphicsClient. I should have noticed that, I was obviously too tired when working with that code. The HUD surface has nothing to do with the MFDs. The client is just getring the pointer into the surfaces in the same place.
jarmonik is offline   Reply With Quote
Old 10-10-2010, 12:51 AM   #19
Poscik
Addon Developer
 
Poscik's Avatar
Default

Today I'll complete whole C++ stuff, so I can start helping you. The best way to learn DirectX is practice.
Poscik is offline   Reply With Quote
Old 10-10-2010, 12:55 AM   #20
Xyon
Puts the Fun in Dysfunctional
 
Xyon's Avatar


Default

Based on that principle I will watch with interest, but I will be of little practical assistance with the project. I wish I could actually contribute, but who knows, maybe I can do something useful later on (though it is unlikely).
Xyon is offline   Reply With Quote
Old 10-10-2010, 11:12 AM   #21
Poscik
Addon Developer
 
Poscik's Avatar
Default

I think we have to create new project on sourceforge, because we don't have rights to commit any updates right now. What do you think about VS2010? It won't be a problem for me to convert VS2008 project to VS2010, but it might be a problem in the other way.
Poscik is offline   Reply With Quote
Old 10-10-2010, 03:13 PM   #22
jarmonik
Beta Tester

Default

I am using VS2008. If you have VS2010 then you should be able to use the project files of VS2008 without any problem. I suppose the project page isn't a major consern at this point of development. At first I need to get the basics up and running properly. I made the first successful build without errors yesterday and I have spend the last 9 hours trying to find why the Orbiter will stop responding while loading the Phobos.dll, the Orbiter is probably stuck in a loop. Something in the D3D9Client is causing the Orbiter to fail. No errors, nothing in a trace logs. The D3D7Client compiles and runs fine.
jarmonik is offline   Reply With Quote
Old 10-10-2010, 03:48 PM   #23
Poscik
Addon Developer
 
Poscik's Avatar
Default

I think we should write D3D9Client from zero. We can of course look at the old code to see "how it's made". But there is no sense to fix all errors.
Poscik is offline   Reply With Quote
Old 10-11-2010, 01:41 PM   #24
jarmonik
Beta Tester

Default

I am still stucked in a failing Phobos.dll, could someone give this a try and see what happens. This is in a very early state of development, so, if it will pass the phobos.dll it will very likely crash soon after that. Place the dll in a Modules/plugin/ folder. The D3D9Client will create a log file called D3DClientLog.html there is also some output in the Orbiter.log

If the Phobos.dll is removed then the orbiter will get stuck in a Satsat.dll during initialization.

When I build the D3D7Client from a source codes it will run properly. The biggest difference is that most features are disabled from D3D9 but that shouldn't cause the initialization of the other modules to fail like that.

EDIT: There will be no progress with this project until this issue is solved.

Last edited by jarmonik; 10-30-2010 at 07:43 PM.
jarmonik is offline   Reply With Quote
Old 10-11-2010, 02:42 PM   #25
jarmonik
Beta Tester

Default

If you want to install the project. Extract the package into the /Orbitersdk/ folder. In that case the project will be able to located includes and libraries. Also the DLLs will go in a proper placed when build. The same applied to GDIClient and D3D7Client.
jarmonik is offline   Reply With Quote
Old 10-11-2010, 04:46 PM   #26
Poscik
Addon Developer
 
Poscik's Avatar
Default

I compiled client from sources, and made few changes in log (txt instead of html). But it isn't important right now. I even can't load simple scenario with one Delta Glider. It's freezing at:
Code:
(Mon Oct 11 18:16:09 2010)(0xAA0)D3D9Client::clbkLoadTexture(LCC_DRS.dds,0x8)<br>
(Mon Oct 11 18:16:09 2010)(0xAA0)D3D9Client: LCC_DRS.dds<br>
(Mon Oct 11 18:16:09 2010)(0xAA0)Texture LCC_DRS.dds found
Buffer or memory overload? But phobos loaded very well for me.

---------- Post added at 04:46 PM ---------- Previous post was at 04:18 PM ----------

Okay, now no matter what I said post earlier
Code:
(Mon Oct 11 18:46:17 2010)(0x838)D3D9Client::clbkLoadTexture(LCC_DRS.dds,0x8)
(Mon Oct 11 18:46:17 2010)(0x838)D3D9Client: LCC_DRS.dds
(Mon Oct 11 18:46:17 2010)(0x838)Texture LCC_DRS.dds found
(Mon Oct 11 18:46:17 2010)(0x838)D3D9Client: ASSIGNING TEXTURE OK
And now I see - it's freezing on Phobos.dll.

Maybe there is the reason (look at the Build and API dates)
Code:
Module Moon.dll .............. [Build 100830, API 100830]
ELP82: Precision 1e-005, Terms 116/829
Module Mars.dll .............. [Build 100830, API 100830]
Module MarsAtm2006.dll ....... [Build 100830, API 100830]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
Module Phobos.dll ............ [Build ******, API 060425]

Last edited by Poscik; 10-11-2010 at 04:53 PM.
Poscik is offline   Reply With Quote
Old 10-11-2010, 05:15 PM   #27
jarmonik
Beta Tester

Default

Yes, that's the point where it's freezing from the client's point of view. If you look at the Orbiter.log it will show that the Orbiter will continue loading other modules after loading the texture LCC_DRS.dds. What's the last line in your Orbiter.log ?

Memory overload is probably the best guess but I have already spend two days trying to find it and I have found nothing. It's not always the Phobos.dll it has stopped in the Saturn.dll atleast once.

I have also implemented the trace log in the D3D7Client and it will do exactly the same things in a same order. The next texture in a line is the ISS_DC.dds but the Orbiter will never call the clbkLoadTexture() because it's stuck in a loop before that. The assemply code of the loop is shown in a debugger but there is no way to tell why it got in that condition. This isn't the best start for a D3D9Client development.

---------- Post added at 20:05 ---------- Previous post was at 19:56 ----------

Quote:
Originally Posted by Poscik View Post
 Maybe there is the reason (look at the Build and API dates)
Code:
Module Moon.dll .............. [Build 100830, API 100830]
ELP82: Precision 1e-005, Terms 116/829
Module Mars.dll .............. [Build 100830, API 100830]
Module MarsAtm2006.dll ....... [Build 100830, API 100830]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
Module Phobos.dll ............ [Build ******, API 060425]
The D3D7Client is working fine and the inline graphics engine. It's an ephemeris module it shouldn't have anything to do with the graphics client.

---------- Post added at 20:15 ---------- Previous post was at 20:05 ----------

The launch pad item stuff in a constructor should be a problem. I implemented it in a hope that it could sovle the problem with the Phobos.
jarmonik is offline   Reply With Quote
Old 10-11-2010, 05:18 PM   #28
Poscik
Addon Developer
 
Poscik's Avatar
Default

Maybe we should try to rewrite D3D7Client files for DX9. I think that's the best option. And another "bug" in D3D9: I replaced solar system to SolM, and when simulation begins, loading screen don't want to disappear. Simulation works "in background". I just pressed Ctrl+Q, and Orbiter turned off very well.
Poscik is offline   Reply With Quote
Old 10-11-2010, 05:29 PM   #29
Xyon
Puts the Fun in Dysfunctional
 
Xyon's Avatar


Default

I think part of the issue could be that the client as yet does not provide any video options tab (Like D3D7 and OGLA clients do, the "Video" button appears when you activate the module), so what settings does it fire up with?

Edit: Hmm, or maybe it's because I got this:
Code:
Error loading module Modules\Plugin\D3D9Client.dll (code 14001)
Xyon is offline   Reply With Quote
Old 10-11-2010, 05:53 PM   #30
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Xyon View Post
 I think part of the issue could be that the client as yet does not provide any video options tab (Like D3D7 and OGLA clients do, the "Video" button appears when you activate the module), so what settings does it fire up with?
The Video tab is currently disabled via bool clbkUseLaunchpadVideoTab() callback function. The video tab will configure the video options located in VIDEODATA structure. There is nothing that should effect in loading of other modules. Video tab is currently disabled because the DX9 device ennumeration is different from the DX7.

Quote:
Originally Posted by Xyon View Post
 Edit: Hmm, or maybe it's because I got this:
Code:
Error loading module Modules\Plugin\D3D9Client.dll (code 14001)
That is something new. I haven't seen anything like it before.
jarmonik is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Visualization Project

Tags
d3d9client, graphicsclient


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 12:14 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2012, Orbiter-Forum.com. All rights reserved.