Tested under XP...Vista I don't know yet. If you try it, let me know OK?
So, Full screen, any resolution, ultra cheap GL window:
#include < windows.h >
#include < GL/gl.h >
static PIXELFORMATDESCRIPTOR pfd={
0, // Size Of This Pixel Format Descriptor... BAD coding, nothing new, saves 6 bytes
1, PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, 32, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0
};
static DEVMODE dmScreenSettings={
"",0,0,sizeof(dmScreenSettings),0,DM_PELSWIDTH|DM_PELSHEIGHT,
0,0,0,0,0,0,0,0,0,0,0,0,0,"",0,0,1024,768,0,0,0,0,0,0,0,0,0,0
};
void WINAPI WinMainCRTStartup()
{
ChangeDisplaySettings (&dmScreenSettings,CDS_FULLSCREEN);
HDC hDC = GetDC( CreateWindow("edit", 0, WS_POPUP|WS_VISIBLE|WS_MAXIMIZE, 0, 0, 0, 0, 0, 0, 0, 0) );
SetPixelFormat ( hDC, ChoosePixelFormat ( hDC, &pfd) , &pfd );
wglMakeCurrent ( hDC, wglCreateContext(hDC) );
ShowCursor(FALSE);
do {
// insert breakpoint winning 1k here
// pohar insert breakpoint winning 5k :-)
SwapBuffers(hDC);
} while ( !GetAsyncKeyState(VK_ESCAPE) );
}
this one decreased a 4k intro filesize by ~30 byte for me, thx
ReplyDeletepohar
How does one give good Karma on your blog... :-)
ReplyDeleteYou rule.