Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


SetPixelFormat failed....


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 polar01   Members   -  Reputation: 114

Like
0Likes
Like

Posted 18 May 2012 - 01:25 AM

Hi,

I have an application that was working for a long time and suddenly the SetPixelFormat method failed !
I have search the reason for a long time, but no way, I can't find the reason !
The GetLastError return 2000 (Mean that SetPixelFormat failed !!!)

I have a good Video card (gtx 590), but anyway I have the software on a lot of computer and always have the same problem !

What I have notice is the the method failed when I use the following flag : PFD_DOUBLEBUFFER

Of course, I need the double buffer !

How can I debug this problem ? I'm searching for a long time and of course it is a critical problem !
--------------------------------------------------------------------------------Aurora Studio - PureLight - Animation & rendering software and API.http://www.polarlights.net

Sponsor:

#2 szecs   Members   -  Reputation: 2185

Like
0Likes
Like

Posted 18 May 2012 - 01:47 AM

Are you calling these initialization things in the correct order?
Does it only fail with the PFD_DOUBLEBUFFER flag? So it works with single buffer?
Post your whole code, there can be many places where the bug lies. Maybe you are not setting the window style correctly, maybe you don't set the CS_OWNDC style, or anything.

#3 polar01   Members   -  Reputation: 114

Like
0Likes
Like

Posted 18 May 2012 - 02:06 AM

Thanks,

The whole code is difficult because it contains a mix of Java and C++ !
In reality I use 2 different 3D engine and both produce the same error !!!!

Yes, it works with the single buffer ! But of course does not produce the right result !

I have use the Spy++ tools to check the window style and it give me the following style : 0x56000000
I also have the old version of my software (this one work well), and it also have the same style !

I have also do the following test, each time I use GetDC it give me another one (Not sure it is because of OWN_DC)

Thanks
--------------------------------------------------------------------------------Aurora Studio - PureLight - Animation & rendering software and API.http://www.polarlights.net




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS