读书人

Gallery3D中画图时调用glTranslate函数

发布时间: 2012-09-01 09:33:02 作者: rapoo

Gallery3D中画图时调用glTranslate函数参数赋值过程
GridDrawManager::drawDisplayItem(RenderView view, GL11 gl, DisplayItem displayItem, Texture texture, int pass,Texture previousTexture, float mixRatio) 函数有下面几句:

int currentlyVisibleSlotIndex = getAnchorSlotIndex(ANCHOR_CENTER);->anchorItem = displayItem.mItemRef;-> newSlotIndex = i;->if (currentAnchorSlotIndex != Shared.INVALID && newAnchorSlotIndex != Shared.INVALID) {                layout.getPositionForSlotIndex(newAnchorSlotIndex, itemWidth, itemHeight, deltaAnchorPosition);                oldLayout.getPositionForSlotIndex(currentAnchorSlotIndex, itemWidth, itemHeight, currentSlotPosition);                currentSlotPosition.subtract(sDeltaAnchorPosition);                deltaAnchorPosition.subtract(currentSlotPosition);                deltaAnchorPosition.y = 0;                deltaAnchorPosition.z = 0;            }


MediaFeed::run()
onFeedChanged(, onLayout(newSlotIndex, currentlyVisibleSlotIndex, null);
onLayout, sDeltaAnchorPositionUncommited.set(deltaAnchorPosition);
computeVisibleRange(),sDeltaAnchorPosition.set(sDeltaAnchorPositionUncommited);
deltaAnchorPosition.set(sDeltaAnchorPosition);
deltaAnchorPosition

读书人网 >移动开发

热点推荐