本文整理汇总了C++中Loader::LoadObj方法的典型用法代码示例。如果您正苦于以下问题:C++ Loader::LoadObj方法的具体用法?C++ Loader::LoadObj怎么用?C++ Loader::LoadObj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader::LoadObj方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
#pragma region win_set
WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(WNDCLASSEX));
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = WindowProc;
wc.hInstance = hInstance;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.lpszClassName = "WindowClass";
RegisterClassEx(&wc);
RECT wr = {0, 0, SW, SH};
AdjustWindowRect(&wr, WS_OVERLAPPEDWINDOW, FALSE);
hWnd = CreateWindowEx(NULL,
"WindowClass",
"DirextX",
WS_DLGFRAME,
300,
300,
wr.right - wr.left,
wr.bottom - wr.top,
NULL,
NULL,
hInstance,
NULL);
ShowWindow(hWnd, nCmdShow);
#pragma endregion Window_Setup
//spawn a console window,useful for debugging ect
AllocConsole() ;
AttachConsole( GetCurrentProcessId() ) ;
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
////////////////////////////////////////////////////
////////////////////////////////////////////////////
/*
Comm * NewComm = new Comm;
NewComm->setup();
NewComm->RECIVE();
*/
//setup object
DxSetup * DX = new DxSetup;
DX->InitD3D();
DX->InitPipeline();
Loader *load = new Loader;
load->loadTexture("Kan.png");
//load->InitLoad("AssetList.txt");
load->LoadObj("cube.obj");
load->LoadObj("spit.obj");
load->LoadObj("box.obj");
//camera obj
Cam * CamOverView = new Cam;
MlistTest.push_back(CamOverView);
//set inittal Camrea postion
cX = 0.0f;
cY = 0.0f;
cZ = -50.0f;
MSG msg;
devcon->ClearRenderTargetView(backbuffer, D3DXCOLOR(0.1f, 0.1f, 0.1f, 1.0f));
//.........这里部分代码省略.........