Hi there,
Recently I am rewriting my code from scratch (better design, better style, better code, it''s a new year, etc...)
My main problem until now was having a black screen, but now I have a wonderful triangle

I updated my driver and checked the order in wich I make the initialisation against previous code that actually work (it includes Nehe base code and tutorials)
Now the only problem is that my app don''t switch to full screen, and I cannot see why. Apparently my call to ChangeDisplaySettings() is succesfull but in fact nothings happen.
I''m quite sure that I checked carefully my code, but as I said all previous code work, so there must be some crap somewhere

Here I recap the process of switching to fullscreen I did :
- I Fill the DEVMODE structure :
VideoMode_.dmPelsWidth
= i->dmPelsWidth ;
VideoMode_.dmPelsHeight
= i->dmPelsHeight ;
VideoMode_.dmBitsPerPel
= i->dmBitsPerPel ;
VideoMode_.dmDisplayFrequency
= i->dmDisplayFrequency ;
VideoMode_.dmFields
= (DM_PELSWIDTH|DM_PELSHEIGHT|DM_BITSPERPEL|DM_DISPLAYFREQUENCY) ;
Note that I also tried with just 640*480*32bpp@60hz
- Then I call a function that use ChangeDisplaySettings()
bool SwitchToFullScreen(DEVMODE* mode)
{
if (0 != mode)
{
std::cout << "Switch to full screen : " ;
if (DISP_CHANGE_SUCCESSFUL !=
ChangeDisplaySettings(mode, CDS_TEST))
{
std::cout << "Test of ChangeDisplaySettings() failed." << std::endl ;
return false ;
}
if (DISP_CHANGE_SUCCESSFUL !=
ChangeDisplaySettings(mode, CDS_FULLSCREEN))
{
std::cout << "ChangeDisplaySettings() failed." << std::endl ;
return false ;
}
std::cout
<< mode->dmPelsWidth << "x"
<< mode->dmPelsHeight << "x"
<< mode->dmBitsPerPel << "@"
<< mode->dmDisplayFrequency << "Hz"
<< std::endl ;
return true ;
} // if (true == fsFlag)
else
{
std::cout << "Switch back to full screen." << std::endl ;
return (DISP_CHANGE_SUCCESSFUL == ChangeDisplaySettings(0, 0)) ;
} // if (true == fsFlag)
}
finally, here is the log file I get :
____________________ Start of Log ____________________
Creating fullScreen window...
39 full screen modes.
Switch to full screen : 1280x960x32@120Hz
SwitchToFullScreen() succeeded.
CreateWindowEx() succedeed.
Initialize OpenGL.
OpenGL initialized.
Resizes window : 1280 x 960...
Resizes viewport : 1280 x 960...
Resizes completed
Sporniket OpenGL Framework - 16.7984 FPS
Sporniket OpenGL Framework - 15.6709 FPS
Sporniket OpenGL Framework - 15.8259 FPS
Uninitialize OpenGL.
ReleaseDC() failed.
OpenGL uninitialized.
Switch back from full screen.
^^^^^^^^^^^^^^^^^^^^^ End of Log ^^^^^^^^^^^^^^^^^^^^^
I will go to the office now, so I will have to wait this evening before trying your ideas.
Many thanks in advance.
----
David Sporn AKA Sporniket