InitDX9() ?

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
ReneMiner
New User
New User
Posts: 3
Joined: Sat Aug 04, 2007 7:19 pm
Location: Germany

InitDX9() ?

Post by ReneMiner »

Is there any chance in the near future that a command like
InitDX9() will become part of PureBasic?

I'm from germany and I bought the "3D-Game-Developer"-Edition of PureBasic. The box said, it would be possible to handle DirectX9 very easy- but in fact - I would have to write a DirectX9-Subsystem for myself first. But I'm not that good in progamming - If I would be able to write it myself (in C/C++) I wouldnt have bought some Basic language.

Some other user on the german board told me that possibly some software is currently beeing created that will allow PureBasic-Users to acces all "native" DirectX9-Functions through PureBasic,
I'm especially interested in functions like loading and using .dds-Texture-Files and rendering them onto primitives (TriangleLists or TriangleStrips) in 3d-space (which are built-in DX9-Functions)
I have no use in an enhanced, to DX9-Updated Sprite3D-Engine nor in Ogre- which is in my opinion not as flexible as a spare-time-programmer would need, indeed its a burden (same I'd say about Terrain = also useless)


So my question:
Is there something planned to access and use DX9-Functions for real basic-users which don't know any other programming languages?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

The DirectX api can be used from PureBasic (but then you could also simply use C). The native Sprite & Screen commands of PureBasic uses DirectX 7, but DirectX 9 support is planned.
ReneMiner
New User
New User
Posts: 3
Joined: Sat Aug 04, 2007 7:19 pm
Location: Germany

Post by ReneMiner »

Yes, I've found some Code-Example of Stefan Moebius which shows how to Initialize DX9 and how to render primitives.

( http://www.purearea.net/pb/CodeArchiv/G ... &Window.pb )

but I've got two Probs with it:

1. I cannot load any texture nor set any texture to be rendered on the triangles becaus I dont know ho to set up the right structure for a Direct3DTexture

2. the example always leads the pb-compiler to crash when I end the program
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

*raises hand*

I would second this request, and also remind the need for 64bit API-command arguments.

...it would be a really BIG step forward fpr PB to handle DX9 via native API-calls...

cross-platform-compatibility is wonderful, no question,
but for all the game-developers working on Windows,
native DX9-support would be almost the grail...

...almost... ;)
oh... and have a nice day.
SunSatION
User
User
Posts: 85
Joined: Tue Jun 21, 2005 7:26 pm
Location: Malta

Post by SunSatION »

Why not directly DX10 ? :P
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

SunSatION wrote:Why not directly DX10 ? :P
Most users uses DirectX9c at the moment
This request can come later :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Please note than the whole interfaces for DirectX9 programming are build-in in PureBasic. Some companies uses them to create DX9 games from scratch without using the PB build-in games commands.

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.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

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.
Can't wait for Christmas :lol: :lol: :lol:
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

> Please note than the whole interfaces for DirectX9 programming are build-in in PureBasic.

so, is there an include needed like for some of the openGL commands?

is there any additional information/documentation?
oh... and have a nice day.
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

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.
Oooh, *crosses fingers that OpenAL is supported in 4.20 as well*
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Kaeru Gaman wrote:is there any additional information/documentation?
What kind of information?
How to convert the necessary headers to PureBasic or about DX9 in general?
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

> How to convert the necessary headers to PureBasic

yes.
how to create the import like remi did for OGL...
..or even if some importer already exists...
and at least a hint what needs to be imported / needs an interface / however,
and what would be directly accessable.
part of OGL is directly accessable, part needs imports/interfaces...

> about DX9 in general
should be findable via google, like the redbook for OGL...
...is there a docu from MS free acessable/downloadable like the MSDN for WinAPI?
there are good expensive books to buy, too.
oh... and have a nice day.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

@Kaeru:
Search for dx9sdk.exe, 222 MB, there all headers, help and so
on included. I think the Microsoft Document Explorer is required,
comes with PSDK or MSDN.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Converting the headers shouldn't be too hard and can even be partly
automated. Just search the forums, some examples have already been
posted in the past.

Here're some headers and examples for DX8 to get you started in case
you missed the post:
http://purebasic.fr/english/viewtopic.php?t=16652

About books, IMHO there's no reason to buy any.
The official SDK (msdn) provides all the information you could ever need.
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

thanks a lot, guys. :D
oh... and have a nice day.
Post Reply