INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR, INT){ WNDCLASSEX wc = {sizeof(WNDCLASSEX), CS_CLASSDC, MsgProc, 0L,0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, L"ClassName", NULL}; RegisterClassEx(&wc); HWND hWnd = CreateWindow(L"ClassName", L"Index Buffer Demo", WS_OVERLAPPEDWINDOW, 200,100,600,500,NULL, NULL, wc.hInstance, NULL); if(SUCCEEDED(initD3D(hWnd))){ if(SUCCEEDED(initVB())){ ShowWindow(hWnd, SW_SHOWDEFAULT); UpdateWindow(hWnd); MSG msg; ZeroMemory(&msg, sizeof(MSG)); while( msg.message!=WM_QUIT ) { if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) ){ TranslateMessage( &msg ); DispatchMessage( &msg ); }else{ render(); //Джх╬м╪пн } } } } UnregisterClass(L"ClassName", wc.hInstance); return 0; }
void ml::D3D11TriMesh::createGPU() { releaseGPU(); initVB(*m_graphics); initIB(*m_graphics); }
void ml::D3D11TriMesh::reset() { release(); initVB(*m_graphics); initIB(*m_graphics); }