Author Topic: The DX8.1 Engine Upgrade  (Read 21824 times)

0 Members and 1 Guest are viewing this topic.

Offline phreak

  • Gun Phreak
  • 211
  • -1
Copyright (C) Volition, Inc. 1999.  All rights reserved.
All source code herein is the property of Volition, Inc. You may not sell
or otherwise commercially exploit the source or things you created based on the source.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Quote
Originally posted by Sesquipedalian
*Pulls HLP standard issue flamethrower from under seat.  Starts fingering it idly, yet menacingly.*


*lunges at Sesq, pulling the trigger and dousing Hades in a consuming inferno*

None of that FS3 stuff, y'hear? NONE!!

:p ;) j/k
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline RandomTiger

  • Senior Member
  • 211
Um... no, lets not do that. For so many different reasons.
« Last Edit: August 04, 2002, 04:52:58 pm by 848 »

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
lets talk about DX8\9, m'key ;)
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Solatar

  • 211
I think FS3 is as gone as you guys do. But *shoosh!!* The Noobies don't know that....*sniff* *sniff*. I thought I got it all out. Yeouch!!! I'm on fire!!! Whoa. Shouldn't have eaten all those jalepenos yesterday. They sure burn twice...

 
I swear to god I am gonna start coding forum specific insults into the game when it see's those pilot names.

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
He, beware of such drastic measures, some innocent ppl may use does nicks also
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline RandomTiger

  • Senior Member
  • 211
Anyway.... What state is the directX update in? Who is currently invloved in it?

Can it eventually be split into sections so different coders can go off and do bits at a time? Obviously this would take great orginisation but otherwise it could take forever.

To be honest Im a bit overwelmed by the task of upgrading the fs2_open D3D so I've been playing around with upgrading the Ship Viewer as a way of getting into this and learning some stuff.

Writing D3D8 code from scratch is one thing but a conversion like this is totally different.

Any thoughts?

 

Offline Anaz

  • 210
I can assure you that DX8.1 does have direct draw, but it is not supported in any of the help files(:mad: ).
Arrr. I'm a pirate.

AotD, DatDB, TVWP, LM. Ph34r.

You WILL go to warpstorm...

 

Offline RandomTiger

  • Senior Member
  • 211
"Complete integration of DirectDraw and Direct3D
Microsoft DirectDraw® and Microsoft Direct3D® are merged into a single DirectX Graphics component. The API has been extensively updated to make it even easier to use and to support the latest graphics hardware. "

 
I'm aware of the enormity of the task of the upgrade - hence why I'm not trying to dive right in but am instead messing around with DX8 so I can get a better understanding of it. Yes, essentially I'm learning it as I go, but this is a good way for me to do it.

Additionally - anyone can work on the update if they know what they're doing - all the files (that SHOULD be needed as far as I know) are in the graphics folder under DirectX8. If you want to take a crack at it feel free.

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
OpenGL would be nicer, and even more enormous.
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline RandomTiger

  • Senior Member
  • 211
Why would it be nicer?
Shouldnt we hold off until the new version of OGL is released (whenever that is)

 

Offline Fry_Day

  • 28
Just a little note - not only the basic graphics interface would have to be ported, but the transformations are done by custom code right now, and not the graphics API, which is slower if you have a T&L card at your disposal, so that needs to be changed too

 

Offline Anaz

  • 210
Quote
Originally posted by RandomTiger
"Complete integration of DirectDraw and Direct3D
Microsoft DirectDraw® and Microsoft Direct3D® are merged into a single DirectX Graphics component. The API has been extensively updated to make it even easier to use and to support the latest graphics hardware. "


its not easier to use when you can't find help about it...

hell, I even did the little index search on the SDK help, and it wouldn't find any mention of Blt...

*sigh*

I'll stop ranting now...
Arrr. I'm a pirate.

AotD, DatDB, TVWP, LM. Ph34r.

You WILL go to warpstorm...

 

Offline RandomTiger

  • Senior Member
  • 211
You perhaps should look into untransformed, unlit objects.

 

Offline YodaSean

  • 27
  • i am so special
    • http://www.geocities.com/radioactiveyeti
Quote
Originally posted by Analazon
I can assure you that DX8.1 does have direct draw, but it is not supported in any of the help files(:mad: ).


No, I'm pretty sure it doesn't.  I think you either create a surface and draw the 2D image onto it, or use the DirectX sprite object to draw 2D.

 
Alternately you end up using the old DirectX libraries which are still included for backwards compatability.

 

Offline rambler

  • 22
DX8 requires all drawing to occur onto D3DSurface8 objects. You can load images from disk, file, or other surfaces onto your surface. You can also directly access the bits on the surface yourself but you must be careful to examine the bpp, pitch, etc. of that surface.

Once you have the image you want to display in a surface, you can display it by using a billboard or directly copying to the front or back buffer. There is no longer a "blt" function per se, but the same functionality is present in other APIs (ie Preset() blits from front or back buffer, UpdateTexture() blits to and from texture surfaces, and CopyRect() blits to and from surfaces.

For a HUD you can CopyRect() your HUD images directly to the back buffer prior to page flipping to achieve a simiar effect as in DX7 with direct draw. Or, you can display the HUD as a billboard with z=0 (or whatever).

 

Offline daveb

  • WHEE!!
  • 25
Quote
For a HUD you can CopyRect() your HUD images directly to the back buffer prior to page flipping to achieve a simiar effect as in DX7 with direct draw. Or, you can display the HUD as a billboard with z=0 (or whatever).


You don't want to be doing that. Drawing any significant # of pixels onscreen should always be done through textured primitives. There's simply no need to use DirectDraw in FS2, even (especially) with DX8.

The real benefit of DX8 will come with T&L. These days, with GF2+ class cards, and the ease-of-use of DX8, T&L has finally become a viable (smart, even!) option. Even with the limited messing around I've done with it here and there, its clear that a real T&L implementation is going to blow away the current software based T&L that the current FS2 code does (FS2 just uses D3D as a rasterizer and nothing more, which is pretty old fashioned).

Seems to me the smartest thing to do is take every POF, and turn them into giant triangle stripified objects, broken down by subobject and texture. The NVidia tri-stripper does a decent job of stripping polygon soup objects. Although its real benefit is being able to spit out one giant triangle strip for any arbitrary set of input polygons. Hence, a single call to DrawIndexedPrimitive() accomplishes a _lot_ of work, and offloads it all to the video card (I refuse to use the term GPU).

What the heck, I have code for this at home. I may just give it a shot.