Author Topic: DirectX projects  (Read 7646 times)

Offline Gorgro

  • Single posting newcomer
  • *
  • Posts: 2
DirectX projects
« on: April 08, 2010, 12:37:37 am »
Hi,

I've recently gotten interested in working with DirectX, so i wanted to see what the basic program looked like. I downloaded the latest SDK and attempted to open a new DirectX project. It kept failing to locate the files even though i entered the correct path. i then did a little editing to the script, making it look for the d3d9.h file (instead of d3d.h)
Now it said i needed version 8 or higher, so knowing that 9 > 8, i put this part in comment because it seemed like the easiest way. Now i finally got in to the actual code. i compiled and a whole bunch of errors popped up, some of which could be resolved by changing the number 8 to 9, but not all of them.

I'm assuming this isn't supposed to happen, so can someone please explain to me how to make C::B work with directX the way it should? (I've been looking for answers for a few hours already before i decided to mess with the script so please don't just refer me to other websites or something like that)

I have C::B version 8.02, if it makes a difference

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: DirectX projects
« Reply #1 on: April 08, 2010, 09:10:08 am »
not sure about codeblocks included mingw as i use my own fork of it but i seem to remember that mingw had a minimal implementation of the directx api ?

ah aye it does try removing all the d3d*.h from mingws include folder i seem to recall that they not allways play nice with the ms directx sdk.

for good measure also get rid of dxerr*.h dsound.h ddraw.h *being the version number eg.9 in my case.


Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: DirectX projects
« Reply #2 on: April 08, 2010, 09:29:21 am »
Although this has NOTHING to do with C::B, the guys at Allegro Games Library (www.liballeg.org) have a VERY UNOFFICIAL directx lib "wrapper" ...
http://allegro5.org/index.php?option=com_phocadownload&view=category&id=11:mingw-deps&Itemid=53

It works "well enough" ...

Offline Gorgro

  • Single posting newcomer
  • *
  • Posts: 2
Re: DirectX projects
« Reply #3 on: April 08, 2010, 12:49:23 pm »
Removing the files from minGW hasn't worked and i'd like to try sticking to the official one for now. I'm seeing that besides the problems with the directories, the basic code automatically uses #include <d3d8.h> and tailors everything to version 8, maybe there has been an update to solve this already that i'm unaware of? I've searched the nightly builds for directX and the latest one to mention it was a 2008 one.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: DirectX projects
« Reply #4 on: April 08, 2010, 01:25:17 pm »
The wizard was updated in december 2009 to work with dx8 and dx9.

I do not use any of them (obviously on linux), so I can't tell you anything further.

You can try a recent nightly, or wait for the coming release.

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: DirectX projects
« Reply #5 on: April 08, 2010, 07:07:06 pm »
think i misunderstood the question  :?

ofc if the api directly requests dx8 then theres a bit more work to it to have it accept the dx9 calls.

in fact a ton of work as i can attest to from trying to update my aging voodoo2 dx8 driver to dx9  :lol:

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: DirectX projects
« Reply #6 on: April 09, 2010, 03:41:45 am »
The last time I needed DirectX headers for MinGW, I used
http://mamedev.org/tools/ headers; not sure which version it uses was 9 a year or so ago.

http://mamedev.org/tools/20100102/directx-headers-for-mingw-20100102.zip

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org