bgeSprite::DrawEx(bgeVector &source_pos, float source_width, float source_height, bgeVector &dest_pos, float dest_width, float dest_height, float rotation, BGECOLOR *color)
As you can see the user can specify the source position (x, y) and the source size(width and height). They can also specify the destination position and size. How do I find out the U and V coordinates that map to what the user wants?
TIA!
Texture Quad - Reading RECT from file
Hi.
I'm trying to draw a specific rectangle out of a texture onto a texture quad.
I am having some trouble finding out what to set the U and V coordinates to.
For example here is my prototype:
It depends entirely on the texture, not on the size or position of the quad. To map the whole texture to the quad, you'd use UV coords of (0, 0) to (1, 1).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement