summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_3d_utils.h
diff options
context:
space:
mode:
authorOleksandr Shcherbina <o.shcherbina@samsung.com>2015-04-22 15:19:02 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-07 09:53:09 +0200
commitd88ccf06a5f6ebcfc68dcc21e55a241f64ff9aa9 (patch)
treec161bdf705243e99217f689e42458a0de2edb9f9 /src/lib/evas/include/evas_3d_utils.h
parent0f6d101ad5ec8327088e448c347e1f4054a5c8d7 (diff)
evas: use Evas_GL_image for generate texture unit for Evas_3D_Texture.
Summary: Used engine function for load image/data and use texture unit through Evas_GL_Image object Used Evas_ColorSpace format instead Evas_3D_Color/Pixel format Added transformation matrix for adjusting texture unit coordinates in shader Added property in Evas_3D_Texture for mark possibility get texture without atlas (see https://phab.enlightenment.org/conpherence/54/, I suppose it will done after this patch) Reviewers: Hermet, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2371 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/evas/include/evas_3d_utils.h')
-rw-r--r--src/lib/evas/include/evas_3d_utils.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/lib/evas/include/evas_3d_utils.h b/src/lib/evas/include/evas_3d_utils.h
index d11533ff6e..87bf70867d 100644
--- a/src/lib/evas/include/evas_3d_utils.h
+++ b/src/lib/evas/include/evas_3d_utils.h
@@ -1150,6 +1150,36 @@ evas_mat3_invserse(Evas_Mat3 *out, const Evas_Mat3 *mat)
1150 } 1150 }
1151} 1151}
1152 1152
1153static inline void
1154evas_mat3_set_position_transform(Evas_Mat3 *out, const Evas_Real p_x, const Evas_Real p_y)
1155{
1156 Evas_Real *d = &out->m[0];
1157 memset(d, 0x00, sizeof(Evas_Mat3));
1158 d[0] = 1;
1159 d[2] = p_x;
1160 d[4] = 1;
1161 d[5] = p_y;
1162 d[8] = 1;
1163 if (p_x || p_y)
1164 out->flags = 0;
1165 else
1166 out->flags = EVAS_MATRIX_IS_IDENTITY;
1167}
1168
1169static inline void
1170evas_mat3_set_scale_transform(Evas_Mat3 *out, Evas_Real s_x, Evas_Real s_y)
1171{
1172 Evas_Real *d = &out->m[0];
1173 memset(d, 0x00, sizeof(Evas_Mat3));
1174 d[0] = s_x;
1175 d[4] = s_y;
1176 d[8] = 1;
1177 if (s_x != 1.0 || s_y != 1.0)
1178 out->flags = 0;
1179 else
1180 out->flags = EVAS_MATRIX_IS_IDENTITY;
1181}
1182
1153/* 2x2 matrix */ 1183/* 2x2 matrix */
1154static inline void 1184static inline void
1155evas_mat2_identity_set(Evas_Mat2 *m) 1185evas_mat2_identity_set(Evas_Mat2 *m)