Using de DirectX API functions

Advanced game related topics
tutiplain
User
User
Posts: 43
Joined: Wed Jun 30, 2010 3:00 am

Using de DirectX API functions

Post by tutiplain »

Hi everyone,

I've noticed some people here on the forums are using DirectX API functions in their PB code. What do I need to do to enable this feature? I know that PB includes some helper files to make it easier to access these, as well as the WinAPI functions. Is there some sort of include file or commands I need to do first, or can I just and simply begin writing API calls? Thanks for any info.
Zach
Addict
Addict
Posts: 1678
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Using de DirectX API functions

Post by Zach »

I think you can just write your API calls without doing anything special. But I've never attempted to even try anything DirectX yet, so I could be seriously wrong.

It seems to me a lot of examples I have seen involve using API calls inside functions, with the function being built to do a specific thing.

i.e a "MakeTriangle()" function, that executes code that displys a triangle on the screen, potentially taking variables from the function call to determine size/position/rotation, and stuff like that.


You may have to at least use Init3DEngine() first, as that loads the Ogre3D as well as DirectX DLL's.


I'm sure someone who knows way more than I do will be along to correct me, if I've given erroneous advice.
tutiplain
User
User
Posts: 43
Joined: Wed Jun 30, 2010 3:00 am

Re: Using de DirectX API functions

Post by tutiplain »

HI, thanks for your answer. I guess I'll just try it, and let you know the result!
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Using de DirectX API functions

Post by blueznl »

http://www.xs4all.nl/~bluez/purebasic/p ... napi_calls

Can't help you on any of the DirectX stuff though, sorry.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply