Creating primary surface in DX (6)

Started by
2 comments, last by WymsicalWyvern 23 years, 7 months ago
argh!!! k, i wrote some sort of game architecture using directx for a simple game some time ago, which encapsulated all my directx calls, but i found that it was designed too specifically for that game (kinda like mfc designed too much for word processors so i re wrote it, so this week was the first time in a long time (2 years) that i actually touched the simple direct x stuff like create surface etc. But, when i was trying to set up the primary surface, it cut saying that the primary surface needed exclusive mode, this confused me because this was a windowed mode app, and i used EXACTLY the same code as before (although split into different functions), i stumped me soo bad, i took a break for a couple days, and now today, forgetting where i left off, i re ran my program and now, i got the error return that some of the capability bits were invalid, and i hadn''t even touched the code!!!!!! so, this pissing me off soo much, i started to hack, i first started to try using a DDSURFACEDESC struct instead of of DDSURFACEDESC2, but the compiler complained so i put it back, and then ya know what? i did a step through and it went through fine!!!!!!!!!! why!!!!!! i hadn''t changed anything!!!!!!! so thats my question, why would it work if i didn''t change anything? this wasn''t the first time, after this, i remember countless other times when i was first learning directx when i copied code directly from my books and tried it and it wouldn''t work. I am kinda forming some sort of answer to this: its microsoft''s fault, because i''ve had similar problems like this. For example: MSVC++ stopped compiling my code, i''d make some very obvious changes, and the compiler would just say: compiled!!! zero errors!!! then id run it and nothing would be different, and the way to solve this was to reboot the computer. Another example where this happens is networking in Windows 98, you first install the network card, it detects it, you setup workgroup and stuff and then... it won''t be able to see anything, and the way i fixed it was something like go into find files or folders or something totally non related, but thats my theory, anyone else have any ideas? or even explanations?

Wymsical, the Pissed of Wyvern
Advertisement
I have no idea... I just wanted to add that "It''s all Microsoft''s fault" is becoming my answer for more and more of my questions too.

-Ironblayde
Aeon Software
"Your superior intellect is no match for our puny weapons!"
As far as your code issues...I dont know enough, but my first guess would be your code was technically buggy, but an older version of DirectX allowed it to work anyway... Now when you are trying to use it with a newer version, the bugs are showing.

As far as Visual C not properly compiling your program, it sounds like a timestamp issue. For example, some of the compiled object files have a time that somehow got set in the future, so they are always newer than the source and ignored. This sort of thing happens on just about any development enviornment, including UNIX make tools. Either that, or you have some deeper issues with your OS that I''ve never seen before...
well its definately not the bugs just showing up now, cuz i recompiled the old code countless times and it worked perfectly, then i''d come back copy the code directly out into my new code then recompile, and it''ll fail. I''m sure i had more of these problems in the past, but this time, i recall EXACTLY the steps i took to solve the problem ( change to DDSURFACEDESC and back )

The WymsicalWyvern

This topic is closed to new replies.

Advertisement