本文整理汇总了C++中IVideoDriver::OnResize方法的典型用法代码示例。如果您正苦于以下问题:C++ IVideoDriver::OnResize方法的具体用法?C++ IVideoDriver::OnResize怎么用?C++ IVideoDriver::OnResize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVideoDriver
的用法示例。
在下文中一共展示了IVideoDriver::OnResize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void TJS_INTF_METHOD
IrrlichtDrawDevice::SetDestRectangle(const tTVPRect &dest)
{
destRect.setLeft(dest.left);
destRect.setTop(dest.top);
destRect.setWidth((destWidth = dest.get_width()));
destRect.setHeight((destHeight = dest.get_height()));
if (device) {
IVideoDriver *driver = device->getVideoDriver();
if (driver) {
tjs_int w, h;
if (zoomMode) {
w = width;
h = height;
} else {
w = destWidth;
h = destHeight;
}
if (screenWidth != w || screenHeight != h) {
screenWidth = w;
screenHeight = h;
screenRect = rect<s32>(0,0,screenWidth,screenHeight);
driver->OnResize(dimension2d<s32>(w, h));
}
}
}
}
示例2:
void
IrrlichtSimpleDevice::_setSize()
{
if (useRender) {
TVPThrowExceptionMessage(L"can't change width/height when render mode");
}
if (device) {
IVideoDriver *driver = device->getVideoDriver();
if (driver) {
driver->OnResize(dimension2d<s32>(width, height));
}
}
}