Directx9/Directx7

Advanced game related topics
Krix
User
User
Posts: 73
Joined: Fri Mar 11, 2005 6:24 pm
Location: Toronto

Directx9/Directx7

Post by Krix »

Hello there,

Fred wrote:
"On a side note, a DX9 subsystem for the game commands is in the work and should be available for the 4.20 release of Purebasic."

Please correct me if I'm wrong but does it mean that all sprite commands will (or already) use DX9? Would it be possible to keep DirectX7/Directdraw support? Some developer may want the lowest system requirement possible and would like to use DX7/DDraw instead of DX9 for simple sprites wich as far as I know runs better on certain gfx chipsets such as intel or older nvidia/Ati. So let's say I could initialize DX7 or DX9 depending on my needs and target platforms. I really really liked the old Sprite commands (not sprite3D) backward compatibility. I did some 2D "game" tests that was running in 640x480 30-50fps 16 bit color on a Trident 4Mbyte DX accelerator and a PII 366Mhz laptop with PB v3.94.

My question is that is it possible to leave the old sprite engine as an option in purebasic?

Does it make sense?

Thanks,
Krix
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

You can use almost any engine in PureBasic. I think the B3D Engine still uses DX7. There are a great many more out there! 8)
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

@Krix
its a subsystem, which means you can switch from dx7 to dx9 and vice versa.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Krix
User
User
Posts: 73
Joined: Fri Mar 11, 2005 6:24 pm
Location: Toronto

Post by Krix »

I know I can use "external" engines and I can code directx from PB. I specifically ment the built in sprite commands. Hopefully in the near future PB will be even more popular among game developers. Think about somebody who wants to write a simple side-scroller, or match 3 kinda game or other simple 2D games for a casual market and use the internal game tools. For them backward compatibility will be more important than dx9 features. Wouldn't it be nice if one could initialize the desired dx version in the begining of the code and just use all the built in sprite commands for his/her game? And also as a feature list would say "Internal game tools use directx9 or for backward compatibility directx7 switchable."

Does it make more sense?
:)

Krix
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Krix wrote:I know I can use "external" engines and I can code directx from PB. I specifically ment the built in sprite commands. Hopefully in the near future PB will be even more popular among game developers. Think about somebody who wants to write a simple side-scroller, or match 3 kinda game or other simple 2D games for a casual market and use the internal game tools. For them backward compatibility will be more important than dx9 features. Wouldn't it be nice if one could initialize the desired dx version in the begining of the code and just use all the built in sprite commands for his/her game? And also as a feature list would say "Internal game tools use directx9 or for backward compatibility directx7 switchable."

Does it make more sense?
:)

Krix
You already can using subsystems as already mentioned, it's a compiler switch. Subsystems replace internal procedures, so you can switch to opengl for instance using a subsystem, but using the same sprite commands.
I love Purebasic.
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Subsystems have to be chosen prior to compilation though (if that didn't
change in some of the latest releases).
They're not really useful if you want to swtich the system at runtime - which
is what Krix wants (if I got you right).
Good programmers don't comment their code. It was hard to write, should be hard to read.
Krix
User
User
Posts: 73
Joined: Fri Mar 11, 2005 6:24 pm
Location: Toronto

Ohhh...

Post by Krix »

Ohhh...

Actually nco2k and Heathen are right. I didn't know you can replace the sprite system that way. All I wanted was to be able to choose a dx version I would use with the built in sprite commands before compilation. I guess I'll do some research about how to do it. Any hint about where should I look?

Thanks,
Krix
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: Ohhh...

Post by traumatic »

Compiler -> Compiler Options -> Library Subsystem

The subsystem for DX9 is called DirectX9
Good programmers don't comment their code. It was hard to write, should be hard to read.
Krix
User
User
Posts: 73
Joined: Fri Mar 11, 2005 6:24 pm
Location: Toronto

Post by Krix »

Thanks Trau!

:)
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Traumatic is right, you can't change the subsystem at runtime, and if you need to support old hardware and new hardware, just supply 2 versions of your executable.
User avatar
IceSoft
Addict
Addict
Posts: 1699
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Ohhh...

Post by IceSoft »

traumatic wrote:Compiler -> Compiler Options -> Library Subsystem

The subsystem for DX9 is called DirectX9
Thats wrong.

DX9 = Author Stefan Mönius
DirectX9 = PureBasic

If you want the S.M. implementation of DirectX9 enter DX9 on the Subsystem textbox.
If you want the DirectX9 PB implementation enter DirectX9 on the Subsystem textbox.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: Ohhh...

Post by traumatic »

:roll:


(and btw, his name is Möbius, not Mönius...)
Good programmers don't comment their code. It was hard to write, should be hard to read.
Violet
Enthusiast
Enthusiast
Posts: 106
Joined: Sun Dec 23, 2007 6:30 pm

Post by Violet »

But DirectX 9 would be better for Vista, or not? Because the PureBasic Screens in Vista extremely lagg because of the emulation of the not any longer supported DirectX 7. :roll:
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Post by Foz »

Previously any new version of DirectX had all the API's of all the previous versions of DirectX. So if you installed 9c, you could run any game even if it was coded for DirectX 5.

Vista includes DirectX 9Ex, which will include DirectX 7 api's and that uses the hardware. The Aero interface for example is a DirectX 9Ex application.

However, if you upgraded from XP or manually installed the XP Graphic Drivers, then there is a chance that it could be running in DirectX 9 emulated mode, which is somewhat slower. How you tell the difference I don't know.
Violet
Enthusiast
Enthusiast
Posts: 106
Joined: Sun Dec 23, 2007 6:30 pm

Post by Violet »

I mean, when I open a windowed screen on Vista, it is much slower rendering. You see it.

I installed Vista on the way like it would be a new computer (no upgrade) and I installed the graphics driver from nvidia manually.
Post Reply