port from perforce
This commit is contained in:
27
4kgfx/main.cpp
Normal file
27
4kgfx/main.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#pragma data_seg(".cube")
|
||||
static Mesh cube;
|
||||
|
||||
#pragma code_seg(".func_main")
|
||||
void __cdecl main(void)
|
||||
{
|
||||
#ifndef _DEBUG
|
||||
ChangeDisplaySettingsA(&screenSettings, CDS_FULLSCREEN);
|
||||
ShowCursor(0);
|
||||
#endif
|
||||
HDC hDC=GetDC(CreateWindowExA(0, "static", 0,WS_VISIBLE|WS_POPUP|WS_CLIPSIBLINGS|WS_CLIPCHILDREN,0,0,XRES,YRES,0,0,0,0));
|
||||
SetPixelFormat(hDC, ChoosePixelFormat(hDC, &pfd), &pfd);
|
||||
wglMakeCurrent(hDC, wglCreateContext(hDC));
|
||||
wglMakeCurrent(hDC, ((PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB"))(hDC, 0, attribs));
|
||||
|
||||
#ifdef _DEBUG
|
||||
((PFNGLDEBUGMESSAGECALLBACKAMDPROC)wglGetProcAddress("glDebugMessageCallbackAMD"))(glDebugOutputAMD, 0);
|
||||
#endif
|
||||
|
||||
cube.Render();
|
||||
SwapBuffers(hDC);
|
||||
|
||||
while (!GetAsyncKeyState(27));
|
||||
ExitProcess(0);
|
||||
}
|
||||
Reference in New Issue
Block a user