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 !
2 replies to this topic
#1 Members - Reputation: 114
Posted 18 May 2012 - 01:25 AM
--------------------------------------------------------------------------------Aurora Studio - PureLight - Animation & rendering software and API.http://www.polarlights.net
Sponsor:
#2 Members - Reputation: 1676
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.
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 Members - Reputation: 114
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
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






