scene: Generate quads in item local coordinate space
Window quads need to be in some coordinate space. Since we want items to be used not only for rendering windows, window-local coordinates do not suffice. This change makes scene items generate quads in the item-local coordinate space. The model matrix is used to map the quads to the global screen coordinate system from the item coordinate space. Since the quads are in the item local coordinate space, the mvp matrix needs to be updated on every draw call. Given the render data, tracking the last mvp matrix won't result in less glUniform calls. If this indeed becomes a serious performance bottleneck, we can explore the possibility of dumping mvp matrices in a UBO, which have been introduced in OpenGL 3.1.
parent
29cc3194
Please register or sign in to comment