Page 1 of 2
InitDX9() ?
Posted: Sat Aug 04, 2007 8:05 pm
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?
Posted: Sat Aug 04, 2007 8:23 pm
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.
Posted: Sat Aug 04, 2007 8:44 pm
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
Posted: Sat Aug 04, 2007 9:36 pm
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...

Posted: Mon Aug 06, 2007 2:09 am
by SunSatION
Why not directly DX10 ?

Posted: Mon Aug 06, 2007 2:11 am
by ts-soft
SunSatION wrote:Why not directly DX10 ?

Most users uses DirectX9c at the moment
This request can come later

Posted: Mon Aug 06, 2007 12:20 pm
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.
Posted: Mon Aug 06, 2007 2:19 pm
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

Posted: Mon Aug 06, 2007 2:20 pm
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?
Posted: Mon Aug 06, 2007 11:15 pm
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*
Posted: Tue Aug 07, 2007 8:17 am
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?
Posted: Tue Aug 07, 2007 8:49 am
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.
Posted: Tue Aug 07, 2007 9:18 am
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.
Posted: Tue Aug 07, 2007 9:23 am
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.
Posted: Tue Aug 07, 2007 9:43 am
by Kaeru Gaman
thanks a lot, guys.
