本文整理汇总了C++中IApplication::setWindowCaption方法的典型用法代码示例。如果您正苦于以下问题:C++ IApplication::setWindowCaption方法的具体用法?C++ IApplication::setWindowCaption怎么用?C++ IApplication::setWindowCaption使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IApplication
的用法示例。
在下文中一共展示了IApplication::setWindowCaption方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
SDeviceContextSettings settings;
settings.MultiSamplingCount = 4;
settings.MultiSamplingQuality = 32;
IApplication* device = createDevice(EDT_DIRECT3D11, 800, 600, EWS_NONE, true, settings);
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->createSceneManager();
IMeshManager* meshManager = driver->getMeshManager();
IResourceGroupManager* resourceGroupManager = driver->getResourceGroupManager();
resourceGroupManager->init("Resources.cfg");
//resourceGroupManager->loadResourceGroup("General");
XMFLOAT3 vertices[4];
vertices[0] = XMFLOAT3(-10.0f, 0.0f, 10.0f);
vertices[1] = XMFLOAT3(10.0f, 0.0f, 10.0f);
vertices[2] = XMFLOAT3(-10.0f, 0.0f, -10.0f);
vertices[3] = XMFLOAT3(10.0f, 0.0f, -10.0f);
ISimpleMesh* mesh = meshManager->createSimpleMesh("pointlist", EVF_POSITION,
vertices, NULL, 4, sizeof(XMFLOAT3), 0, math::SAxisAlignedBox(), false);
IMeshNode* meshNode = smgr->addMeshNode(mesh, nullptr, nullptr);
meshNode->setMaterialName("test/ts_material");
meshNode->setNeedCulling(false);
ICameraNode* camera = smgr->addFpsCameraNode(1, nullptr, XMFLOAT3(0, 1.0f, -4.0f), XMFLOAT3(0, 1.0f, 0.0f));
char caption[200];
ITimer* timer = device->getTimer();
timer->reset();
while (device->run())
{
const float clearColor[] = { 0.0f, 0.0f, 0.0f, 1.0f };
driver->beginScene(true, true, clearColor);
float dt = timer->tick() * 0.001f;
updateCamera(camera, dt);
smgr->update(dt);
smgr->drawAll();
driver->endScene();
sprintf(caption, "FPS:%f", getFps(dt));
device->setWindowCaption(caption);
}
device->drop();
return 0;
}