scroll uvs
BlitzMax Forums/BlitzMax Programming/scroll uvs
| ||
Is there a way to scroll the textures that are drawn with DrawImage, perhaps before drawing, similar to SetScale..? |
| ||
Draw it with SetScale then use GrabImage. Did you mean scroll or scale? To scroll you'd have to draw it in four parts then grab it back, or have a clever polygon texture coord thing. |
| ||
or have a clever polygon texture coord thing Sort of what I was asking for in the topic. |
| ||
You can access the UV to do this, there is a function in DX and OpenGL to set the UV. there is no scrolling command or similar because Max2D does not even intend to allow you drawing parts of the image, which is in the end very similar to scrolling (both UV modification) |
| ||
If you create your own quad and define the texture coordinate at each vertex you create, you can have it point to any part of the texture, which would let you scroll over it. You'd have to enable wrapping in both directions to allow it to wrap around automatically. You could probably do the whole thing in a single quad. |