SetDisplayMode & CreateSurface problem
O.k. Heres the problem. When I set the bpp to anything but that
of my desktop CreateSurface fails with DDERR_NOEXCLUSIVE or something like that.
so in otherwords
SetDisplayMode(800, 600, 32, 0, 0);
CreateSurface(...);
this is ok.
SetDisplayMode(800, 600, 16, 0, 0);
CreateSyrface(...);
this is not. My desktop is in 32 bit color.
What is causing this??
Please help.
Jason Mickela
ICQ : 873518
E-Mail: jmickela@pacbell.net
------------------------------
"Evil attacks from all sides
but the greatest evil attacks
from within." Me
------------------------------
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
You need to set the exclusive and fullscreen flags in your call to SetCooperativeLevel
Gee Brain, what we gonna do tonight?
I do, Like I said in my post, when I set is to the same bpp as my desktop it works, I get the full screen and all that jazz.
But when I change it to use 16 bit color it starts giving that error. I only change one number from 32 to 16 and I start getting that error.
But when I change it to use 16 bit color it starts giving that error. I only change one number from 32 to 16 and I start getting that error.
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
If you are setting the DDSCL_EXCLUSIVE and DDSCL_FULLSCREEN flags in your call to SetCooperativeLevel();, and you STILL get problems with different bit depths, then it''s a video card problem. What more can I say.
Thats what I thought at first too, BUT other programs don''t seem to have any problems.
BTW I''m trying to run in 800x600 16BPP
Other programs I have written can do it, plus I had a friend
try to run the exe and it failed on his computer too.
Like I said, the only differance between working and not working is changing the 16 to 32, What the hell is wrong?
BTW I''m trying to run in 800x600 16BPP
Other programs I have written can do it, plus I had a friend
try to run the exe and it failed on his computer too.
Like I said, the only differance between working and not working is changing the 16 to 32, What the hell is wrong?
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
Why don''t you go ahead and post the part of the source code; maybe we''ll find something.
Well, I''m at work and don''t have access to my code, but I posted a similar question, that does have my code in my reply, in a provious post with the subject "Major problems calling CreateSurface" If you think you may know whats wrong please read it and tell me. I would be very greatfull if you could help me out.
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
You should try writing code to enumerate through all the modes that your card will actually support. I have a Voodoo3, and could do 16 and 32bpp with DX7, but in DX8, can only do 16 because Voodoo3s must use 16bpp for the Z buffer to work, so DX8 won''t even let you access the 32bpp modes.
With Direct X, you should always enumerate the display modes.
Domini
Rastagon 2 Engine
With Direct X, you should always enumerate the display modes.
Domini
Rastagon 2 Engine
Domini Miracle Man Studios
I ran into this, and the problem turned out to be the refresh rate. Instead of simply passing 0 as the 4th parameter and hoping for the best, I first had to enumerate what was available (as Domini suggested), and pick a different refresh rate for the same resolution.
Since card/monitor combinations will differ greatly from system to system, you shouldn''t hard-code this, but enumerate and let the user pick from the list a resolution/refresh that works for them.
Bri
Since card/monitor combinations will differ greatly from system to system, you shouldn''t hard-code this, but enumerate and let the user pick from the list a resolution/refresh that works for them.
Bri
O.k., I tried to pass 60 as the refresh rate and, while the game did not come to an error, it stayed in 1024x768 32bit, I was trying to change to 800x600x16. That happenes when I use anything but 0. When I use 0 I get the error. I downloaded new drivers for my video card (3Dfx Voodoo 3 3500), but that didn''t do anything. What do I do?
Note: I ran the ModeTest program that came with the SDK and used one of the refresh rates that it listed with 800x600x16 video mode, it didn''t work.
Note: I ran the ModeTest program that came with the SDK and used one of the refresh rates that it listed with 800x600x16 video mode, it didn''t work.
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement