Add the possibility to set a 4x4 matrix to be used on blf.
authorDiego Borghetti <bdiego@gmail.com>
Thu, 9 Dec 2010 04:36:58 +0000 (04:36 +0000)
committerDiego Borghetti <bdiego@gmail.com>
Thu, 9 Dec 2010 04:36:58 +0000 (04:36 +0000)
commitb25c32393d42c314c073ef2244cde1fabb7b64af
treea295abf9b556d1fdc8ed2d8d555f602bc1f874ce
parent36175f37c9d3ea128cfdcebd1c1b438494b34433
Add the possibility to set a 4x4 matrix to be used on blf.

This option allow the user to set a 4x4 matrix to be
multiplied before draw the text, for example:

double *m;

/* Get the matrix or build it! */

BLF_matrix(m);
BLF_enable(BLF_MATRIX);

/* set color, size, etc and draw! */

BLF_disable(BLF_MATRIX);

You don't need the last line (disable), but remember
that if you use the font to draw in any other place,
the matrix will be used!.

The GL code is:

glPushMatrix();
glMultMatrixd(m);
glTranslatef();
glScalef();
glRotatef();

glPopMatrix();

Let's Dalai test this!!! :D
source/blender/blenfont/BLF_api.h
source/blender/blenfont/intern/blf.c
source/blender/blenfont/intern/blf_font.c
source/blender/blenfont/intern/blf_internal_types.h