🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

basic d3d problem

Started by
1 comment, last by AlexM 24 years, 8 months ago
Is enumDeviceFunc ever being called at all? Can you put a breakpoint in it? Where is the enumcounter defined? Did you make sure you did not have a local version of enumcounter in the function that said it was 0?

Just some guesses...

------------------

-Kentamanos

-Kentamanos
Advertisement
the problem is the d3d enumdevices method. I followed pretty much my book's directions, tried many tutorials, etc. my callback simply incrementes a global int which i later check and find to be zero. i have d3d drivers installed, samples and games are rolling here's some code:
lpdd->QueryInterface(IID_IDirect3D,(void **)&lpd3d)
lpd3d->EnumDevices(enumDeviceFunc,NULL)
HRESULT WINAPI enumDeviceFunc
(LPGUID lpGuid,LPSTR lpDeviceDescription,
LPSTR lpDeviceName, LPD3DDEVICEDESC lpHW,
LPD3DDEVICEDESC lpSW, LPVOID lpContext)
{
enumcounter++;
return (D3DENUMRET_OK);
}
enumcounter is zero aft enumert, but enumdevices doesn't fail either (i check that with FAILED). this is driving me nuts! i must be missing some d3d specifics like #defines... no clue.
Thanks for any help, Alex.
well, i have to subject my ability of scrutiny to falsehood. There was a local enumcounter. Thanks, the problem is solved (but i've got an excuse, that program is well over 400 lines).

This topic is closed to new replies.

Advertisement