本文整理汇总了C++中TransformState::getFramebufferHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ TransformState::getFramebufferHeight方法的具体用法?C++ TransformState::getFramebufferHeight怎么用?C++ TransformState::getFramebufferHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransformState
的用法示例。
在下文中一共展示了TransformState::getFramebufferHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: prepare
void Map::prepare() {
view.make_active();
// Update transform transitions.
animationTime = util::now();
if (transform.needsTransition()) {
transform.updateTransitions(animationTime);
}
const TransformState oldState = state;
state = transform.currentState();
bool pixelRatioChanged = oldState.getPixelRatio() != state.getPixelRatio();
bool dimensionsChanged = oldState.getFramebufferWidth() != state.getFramebufferWidth() ||
oldState.getFramebufferHeight() != state.getFramebufferHeight();
if (pixelRatioChanged) {
style->sprite = std::make_shared<Sprite>(*this, state.getPixelRatio());
style->sprite->load(kSpriteURL);
spriteAtlas->resize(state.getPixelRatio());
}
if (pixelRatioChanged || dimensionsChanged) {
painter.clearFramebuffers();
}
style->cascade(state.getNormalizedZoom());
// Update style transitions.
animationTime = util::now();
if (style->needsTransition()) {
style->updateTransitions(animationTime);
update();
}
// Allow the sprite atlas to potentially pull new sprite images if needed.
if (style->sprite && style->sprite->isLoaded()) {
spriteAtlas->update(*style->sprite);
}
updateTiles();
}