# New ReleaseD3D9Client Development

#### Felipi1205

##### Spaceflight enthusiast
I have a problem. When running in the GDI compatibility mode, I see some flahes in the full screen mode. Any solution?

#### n72.75

Tutorial Publisher
Donator
Hi! This is a long shot, but can anybody here check Kulch's ENERGY project? The Energia rocket add-on works fine, but the custom HUD display is missing while I run under RC39. Can anybody check if it could be fixed at the client side? Thanks! :tiphat:

GPS

I haven't seen Kulch around the forum lately, anyone heard from him?

#### Felipi1205

##### Spaceflight enthusiast
I have a problem. When running in the GDI compatibility mode, I see some flahes in the full screen mode. Any solution?
And another bug. When I'm around the Earth, if use use the Time acceleration too much time (10 seconds or less), the texture L11-14 looks like the original texture of the Earth. This is the worst bug!!! And I checked load at pre-start, but nothing changed...

#### jarmonik

Beta Tester
I have a problem. When running in the GDI compatibility mode, I see some flahes in the full screen mode. Any solution?
Never heard of such problem on D3D9 before. I don't know what's going on there.

#### Felipi1205

##### Spaceflight enthusiast

---------- Post added at 01:08 PM ---------- Previous post was at 12:48 PM ----------

And what about the second problem?
When I'm around the Earth, if use use the Time acceleration too much time (10 seconds or less), the texture L11-14 looks like the original texture of the Earth. This is the worst bug!!! And I checked load at pre-start, but nothing changed...
And a third problem! When i'm using a skin in the XR2, if i press F1 to enter in the cabin, the Orbiter crashes and the module of the problem is the D3D9.dll. When i run the same scenario without the client, everything is fine...

#### Ragtag

##### New member
I have a problem. When running in the GDI compatibility mode, I see some flahes in the full screen mode. Any solution?
And another bug. When I'm around the Earth, if use use the Time acceleration too much time (10 seconds or less), the texture L11-14 looks like the original texture of the Earth. This is the worst bug!!! And I checked load at pre-start, but nothing changed...

I get that just running 2010P1 standard in full screen. A flash every 2 seconds or so. It has always been that way for me. On the other hand full screen works really well for me with the D3D9 client.

#### Felipi1205

##### Spaceflight enthusiast
No, the problem is the Download Accelerator. Closing it, everything is fine! :thumbup:
The current probles are the other problems that I talked in my anterior post, the post #1085

#### Felipi1205

##### Spaceflight enthusiast
Hi! The previous problems were solved. Now I can't see the shadows in the Saturn's rings? It's a bug?

Last edited:

#### jarmonik

Beta Tester
Harddrive break down

I have just experienced a harddrive break down that will drive me back into a stone age. I was able to back up some data before I lost the drive complitely. So, the project should be in safe. I have implemented several bug fixes and specular and emission maps.

I should be able to get a new drive in a few days and start installing Windows. Isn't that sweet ? I don't even dare to think about how much data I lost today.:facepalm:
:compbash2:

#### Felipi1205

##### Spaceflight enthusiast
:facepalm: Good Luck!

#### Artlav

##### Aperiodic traveller
Beta Tester
I should be able to get a new drive in a few days and start installing Windows. Isn't that sweet ? I don't even dare to think about how much data I lost today.:
Regular backups save the day...
Are you sure nothing can be saved by data recovery people?

If it just makes sounds like that:
http://www.rumaxclub.ru/etc/hdddeath.mp3
And refuses to open, then there may be hope.

#### Cras

##### Spring of Life!
Donator
Sorry to hear this. Was in a similar position about a year ago.
Those data recovery people are expensive. But they are good. I thought I lost a drive, but they were able to recover every bit of data on the thing.

#### Face

Beta Tester
I have just experienced a harddrive break down that will drive me back into a stone age.

That's always a disastrous event. I hope you'll be able to restore as much as possible.

I hate to say this now (as I can understand how bad you may feel in such a situation), but this in one of the reasons why I always use some kind of version control right from start of a project. And always commit after a logical step.

If you have a copy off in the cloud additionaly, a HD failure is not so scary anymore. That's also one of the reasons why I mirrored your ZIP archives on Bitbucket. If you need something from there, just drop me a note...

regards,
Face

#### Ripley

##### Tutorial translator
Donator
...I don't even dare to think about how much data I lost today...
Noooo!! Didn't you keep a backup??

#### jarmonik

Beta Tester
Regular backups save the day...
Are you sure nothing can be saved by data recovery people?

Yes, I belive they can. My best quess is that some of the drive's heads are lose or something like that. I don't see a way to salvage the data without opening the drive. I quess we are talking about 800-1600EUR. I'll think about it but I haven't lost any source codes for the latest builds or any other critical data.

Mostly:
- Lot of photos
- Lot of installation files for SDKs and other things. (can be re-downloaded from the net of course)
- Saved games
- Some documents
- A few circuit board designs (have them on paper)

---------- Post added at 15:51 ---------- Previous post was at 15:47 ----------

Noooo!! Didn't you keep a backup??
Of course, I had backups but the latest one is more than 2 months old and not everything is packed up.

---------- Post added at 15:59 ---------- Previous post was at 15:51 ----------

That's also one of the reasons why I mirrored your ZIP archives on Bitbucket. If you need something from there, just drop me a note...
Thanks, about that. I may have lost the source codes for some older releases of the client. If I need them I let you know.

Last edited:

#### alagreca

##### New member
Archive

I have just experienced a harddrive break down that will drive me back into a stone age. I was able to back up some data before I lost the drive complitely. So, the project should be in safe. I have implemented several bug fixes and specular and emission maps.

I should be able to get a new drive in a few days and start installing Windows. Isn't that sweet ? I don't even dare to think about how much data I lost today.:facepalm:
:compbash2:
I don't know if it would help, but I have most of what you have posted on this forum archived. Let me know if you need any of that, although I know it's not the same as source code. Cheers

#### Donamy

Donator
Beta Tester
Is there a way to get Fly-by-wire to work with D3D9 ?

#### jarmonik

Beta Tester
Is there a way to get Fly-by-wire to work with D3D9 ?
I don't have a proper hardware nor a working computer right now to test it. What's wrong with it ? And why is a graphics client effecting into a flight controls ? Have you talked to Redburne about it ?

I should get my computer up and running again during the weekend and I'll give it a try then.

#### Donamy

Donator
Beta Tester
When I start Orbiter NG there is no Fly-By-wire to choose from the extras tab in the launchpad.

#### kuddel

##### Donator
Donator
Hi jarmonik,

I wanted to contibute a little bit to this GREAT client and decided to implement a small feature that is still missing: ShowGrapplePoints

But I have no idea how to draw simple meshes/vertice-groups (in this case: the arrows).
I've had no problem in getting all the needed information for the rendering (position-vector, direction-vector and rotation-vector) but I have no idea how to let the arrows render.

Here's my code that uses the vObject::RenderSpot method to indicate at least where they should be
PHP:
void vVessel::RenderGrapplePoints (LPDIRECT3DDEVICE9 dev)
{
if (!oapiGetShowGrapplePoints()) return; // nothing to do

DWORD i;
ATTACHMENTHANDLE hAtt;
VECTOR3 pos, dir, rot;
static VECTOR3 colRed = {1,0,0},
colBlue = {0,0,1};
static int shape = 2; // [0...2]
static float size = 1.0;

// Flash calculations
static double lastTime = 0;
static bool isOn = true;
double simt = oapiGetSimTime();
if (simt-lastTime > 0.5) // Flashing period (twice per second)
{
isOn = !isOn;
lastTime = simt;
}

if (!isOn) return; // nothing to do

// attachment points to parent
for (i = 0; i < vessel->AttachmentCount(true); ++i)
{
hAtt = vessel->GetAttachmentHandle(true, i);
vessel->GetAttachmentParams(hAtt, pos, dir, rot);
const char *id = vessel->GetAttachmentId (hAtt);

// TODO: Here I would like to render one arrow instead
RenderSpot(dev, &pos, (float)size, colRed, false, shape);
}

// attachment points to children
for (i = 0; i < vessel->AttachmentCount(false); ++i)
{
hAtt = vessel->GetAttachmentHandle(false, i);
vessel->GetAttachmentParams(hAtt, pos, dir, rot);
const char *id = vessel->GetAttachmentId (hAtt);

// TODO: Here I would like to render one arrow instead
RenderSpot(dev, &pos, (float)size, colBlue, false, shape);
}
}
The method is called from Scene::Render in the same manner as vVessel::RenderBeacons is called. Like this:
PHP:
    ...
// should we render grapple points?
//
for (pv=vobjFirst; pv; pv=pv->next) {
if (!pv->vobj->IsActive()) continue;
pv->vobj->RenderGrapplePoints(pDevice);
}
...
But from here on I am not experiencd enough in DirectX...
In a first shot I created two Vertex definitions for the arrow(s)...
PHP:
VERTEX_XYZC GrapplePoint::arrow_blue[] = {
{ 0.0, 0.0, 0.0, D3DCOLOR_XRGB(0, 0, 255)},
{-1.0, 1.0, 0.0, D3DCOLOR_XRGB(0, 0, 255)},
{ 1.0, 1.0, 0.0, D3DCOLOR_XRGB(0, 0, 255)},

{ 1.0, 1.0, 0.0, D3DCOLOR_XRGB(0, 0, 255)}, // degenerate triangle
{-0.5, 1.0, 0.0, D3DCOLOR_XRGB(0, 0, 255)}, // degenerate triangle
// Body
{-0.5, 1.0, 0.0, D3DCOLOR_XRGB(0, 0, 255)},
{-0.5, 2.0, 0.0, D3DCOLOR_XRGB(0, 0, 255)},
{ 0.5, 2.0, 0.0, D3DCOLOR_XRGB(0, 0, 255)},
{ 0.5, 1.0, 0.0, D3DCOLOR_XRGB(0, 0, 255)}
};

VERTEX_XYZC GrapplePoint::arrow_red[] = {
{ 0.0, 0.0, 0.0, D3DCOLOR_XRGB(255, 0, 0)},
{-1.0, 1.0, 0.0, D3DCOLOR_XRGB(255, 0, 0)},
{ 1.0, 1.0, 0.0, D3DCOLOR_XRGB(255, 0, 0)},

{ 1.0, 1.0, 0.0, D3DCOLOR_XRGB(255, 0, 0)}, // degenerate triangle
{-0.5, 1.0, 0.0, D3DCOLOR_XRGB(255, 0, 0)}, // degenerate triangle
// Body
{-0.5, 1.0, 0.0, D3DCOLOR_XRGB(255, 0, 0)},
{-0.5, 2.0, 0.0, D3DCOLOR_XRGB(255, 0, 0)},
{ 0.5, 2.0, 0.0, D3DCOLOR_XRGB(255, 0, 0)},
{ 0.5, 1.0, 0.0, D3DCOLOR_XRGB(255, 0, 0)}
};
Can you give me a hint on how to render the Meshes?
Am I on the right track?
Or should I have used some other technique?

Regards,
Kuddel

P.S.: Please don't mind the many statics, I'll move them to members and initialize them at construction once I found out how to make this work

Last edited: