neuroliquid
Member
|
Atlas part free rotation
Hi again!
Is it possible somehow to draw atlas part rotated with specific angle just like Image::drawRotate(..)?
(This post was last modified: 01-25-2016 03:54 PM by neuroliquid.)
|
|
01-25-2016 03:48 PM |
|
Esenthel
Administrator
|
RE: Atlas part free rotation
Hi,
Yes but you'll have to manually specify vertex positions / tex coords
You can use the following function for that:
static void face(C Vtx2DTex &a, C Vtx2DTex &b, C Vtx2DTex &c, C Vtx2DTex &d);
VI.face(..);
|
|
01-26-2016 08:24 AM |
|
neuroliquid
Member
|
RE: Atlas part free rotation
Thanks, VI turned out to be quite useful for 2D.
I'm not sure but it even seems to draw faster than image->draw(..)
|
|
02-04-2016 02:59 PM |
|
Esenthel
Administrator
|
RE: Atlas part free rotation
VI will be faster if you make calls batched together, that's the whole point of it.
Vertex/Index buffering for faster performance.
|
|
02-07-2016 01:59 AM |
|
neuroliquid
Member
|
RE: Atlas part free rotation
This time I need to draw atlas part rotating and fading out with transparency in the same time. Problem is that VI.face does not respond to VI.color.
How can I do it then?
|
|
06-13-2016 09:51 AM |
|
Esenthel
Administrator
|
RE: Atlas part free rotation
You can use:
Code:
struct Vtx2DTexCol
{
Vec2 pos, tex;
Color color;
};
and specify color per-vertex
|
|
06-15-2016 10:19 AM |
|