Page 1 of 1

Using de DirectX API functions

Posted: Tue Jan 04, 2011 11:39 pm
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.

Re: Using de DirectX API functions

Posted: Wed Jan 05, 2011 1:20 am
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.

Re: Using de DirectX API functions

Posted: Wed Jan 05, 2011 1:26 am
by tutiplain
HI, thanks for your answer. I guess I'll just try it, and let you know the result!

Re: Using de DirectX API functions

Posted: Wed Jan 05, 2011 8:22 pm
by blueznl
http://www.xs4all.nl/~bluez/purebasic/p ... napi_calls

Can't help you on any of the DirectX stuff though, sorry.