Compare commits

...

22 Commits

Author SHA1 Message Date
Bogdan Devichev 5e6a655329 Obj_io. Step 5.1 fix codestyle 2015-01-29 17:45:13 +02:00
Bogdan Devichev d69e06183c Obj_io. Step 5. Example to see fix on step 4. (warning with memory in loader will be fixed ASAP) 2015-01-29 17:39:59 +02:00
Bogdan Devichev 23c3cd9489 Obj_io. Step 4. Now _read_point works correctly for obj files saves without normals or/and tex_coords too. 2015-01-29 16:17:42 +02:00
Bogdan Devichev 5bcc44953b Obj_io. Step 3. Refactoring of reading of faces. Prepearing for stabilization of obj. 2015-01-28 19:08:11 +02:00
Bogdan Devichev 6053e67310 Obj_io. Step 2. Example to see fix on step 1. 2015-01-28 18:49:03 +02:00
Bogdan Devichev 199ea77b4e Obj_io. Step 1. Fix incorrect loading of mesh with faces which have more than 4 vertices. (like: f n1/n2/n3 n4/n5/n6 n7/n8/n9 n10/n11/n12 n13/n14/n15 ...) 2015-01-28 18:32:33 +02:00
Bogdan Devichev 92d7024653 Model_save_load. Step 13. efl_file_set and efl_file_save are used directly. 2014-12-23 16:08:39 +02:00
Bogdan Devichev d347ff43ae Model_save_load. Step 12. Evas 3d mesh is inherited from Efl.File. (functions file_set and save) 2014-12-22 16:16:19 +02:00
Bogdan Devichev 5adf8c44d9 Fix of warning created on step 10 and fix of wrong logic of error. 2014-12-22 11:37:30 +02:00
Bogdan Devichev c908c654f5 Model_save_load. Step 11. Better example of _mmap_set and resources for it are added. 2014-12-17 15:48:00 +02:00
Bogdan Devichev f751141009 Model_save_load. Step 10. An _mmap version of the file_set is added. 2014-12-12 17:23:49 +02:00
Bogdan Devichev 2b5dc25974 Model_save_load. Step 9. The eet loader use eet_mmap that take an Eina_File instead of eet_open. 2014-12-11 15:06:44 +02:00
Bogdan Devichev 0346ad1a71 Model_save_load. Step 8. Entry points to modules is Eina_File. Model_Common_Loader is deleted. 2014-12-10 18:31:20 +02:00
Bogdan Devichev dbf100eb8e Model_save_load. Step 7. Entry points to modules is new struct with Eina_file, not const char *file. 2014-12-09 17:25:01 +02:00
Bogdan Devichev 063c83a01d Model_save_load. Fix for Step 6. Tests passed. 2014-12-05 11:11:41 +02:00
Bogdan Devichev 952027af93 Model_save_load. Step 6. Ply_loader and obj_loader work with Eina_File. (need fix of tests). 2014-12-05 11:11:25 +02:00
Bogdan Devichev 8b1d380ba5 Model_save_load. Step 5. Test cases are changed according to changes of API in step 4. Specific logic in obj_saver is removed for standardization of API. 2014-12-05 11:11:09 +02:00
Bogdan Devichev 42562b3ddf Model_save_load. Step 4. Evas_3D_Mesh_File_Type sank into oblivion. Changing entry point to model_save_load. Changing API in examples. 2014-12-05 11:10:52 +02:00
Bogdan Devichev 291291e027 Model_save_load. Step 3. lib/evas/common/evas_model_<action>.c is added. Functions are renamed similar to functions in image_save_load process. 2014-12-05 11:09:56 +02:00
Bogdan Devichev 2f502b7f0e Model_save_load. Step 2. Replace and rename savers/loaders. 2014-12-05 11:06:41 +02:00
Bogdan Devichev 7183fb6555 Model_save_load. Step 1_2. Dummies for model_saver_loader are created. 2014-12-04 16:34:38 +02:00
Bogdan Devichev 4afc221525 Model_save_load. Step 1. Preparation of places for model_saver_loader separated from image_saver_loader. 2014-12-04 16:27:26 +02:00
67 changed files with 38191 additions and 527 deletions

View File

@ -97,8 +97,8 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
%{_libdir}/*.so.*
%{_libdir}/evas/cserve2/loaders/*/linux-gnu-*/*.so
%{_libdir}/evas/modules/engines/*/linux-gnu-*/*.so
%{_libdir}/evas/modules/loaders/*/linux-gnu-*/*.so
%{_libdir}/evas/modules/savers/*/linux-gnu-*/*.so
%{_libdir}/evas/modules/image_loaders/*/linux-gnu-*/*.so
%{_libdir}/evas/modules/image_savers/*/linux-gnu-*/*.so
%{_libdir}/ecore/*/*.so
%{_libdir}/ecore_evas/*/*/*/*.so
%{_libexecdir}/*
@ -115,8 +115,8 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
%{_libdir}/ecore_evas/*/*/*/*.la
%{_libdir}/evas/cserve2/loaders/*/linux-gnu-*/*.la
%{_libdir}/evas/modules/engines/*/linux-gnu-*/*.la
%{_libdir}/evas/modules/loaders/*/linux-gnu-*/*.la
%{_libdir}/evas/modules/savers/*/linux-gnu-*/*.la
%{_libdir}/evas/modules/image_loaders/*/linux-gnu-*/*.la
%{_libdir}/evas/modules/image_savers/*/linux-gnu-*/*.la
%{_datadir}/embryo/
%{_datadir}/evas/

View File

@ -188,15 +188,18 @@ lib/evas/canvas/evas_3d_camera.c \
lib/evas/canvas/evas_3d_light.c \
lib/evas/canvas/evas_3d_mesh.c \
lib/evas/canvas/evas_3d_texture.c \
lib/evas/canvas/evas_3d_material.c \
lib/evas/canvas/evas_3d_mesh_loader_md2.c \
lib/evas/canvas/evas_3d_mesh_loader_obj.c \
lib/evas/canvas/evas_3d_mesh_saver_obj.c \
lib/evas/canvas/evas_3d_mesh_loader_eet.c \
lib/evas/canvas/evas_3d_mesh_saver_eet.c \
lib/evas/canvas/evas_3d_eet.c \
lib/evas/canvas/evas_3d_mesh_loader_ply.c \
lib/evas/canvas/evas_3d_mesh_saver_ply.c
lib/evas/canvas/evas_3d_material.c
# Model savers/loaders (will be replaced to modules in next commits)
lib_evas_libevas_la_SOURCES += \
modules/evas/model_loaders/eet/evas_model_load_eet.c \
modules/evas/model_loaders/md2/evas_model_load_md2.c \
modules/evas/model_loaders/obj/evas_model_load_obj.c \
modules/evas/model_loaders/ply/evas_model_load_ply.c \
modules/evas/model_savers/eet/evas_model_save_eet.c \
modules/evas/model_savers/obj/evas_model_save_obj.c \
modules/evas/model_savers/ply/evas_model_save_ply.c \
lib/evas/canvas/evas_3d_eet.c
# Engine
lib_evas_libevas_la_SOURCES += \
@ -231,6 +234,8 @@ lib/evas/common/evas_image_save.c \
lib/evas/common/evas_image_main.c \
lib/evas/common/evas_image_data.c \
lib/evas/common/evas_image_scalecache.c \
lib/evas/common/evas_model_load.c \
lib/evas/common/evas_model_save.c \
lib/evas/common/evas_line_main.c \
lib/evas/common/evas_polygon_main.c \
lib/evas/common/evas_rectangle_main.c \
@ -1239,503 +1244,503 @@ bin_evas_dummy_slave_LDADD = \
endif
### Loaders and savers
### loaders and savers
if BUILD_LOADER_BMP
if EVAS_STATIC_BUILD_BMP
lib_evas_libevas_la_SOURCES += modules/evas/loaders/bmp/evas_image_load_bmp.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/bmp/evas_image_load_bmp.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_bmp_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_bmp_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/bmp/evas_image_load_bmp.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/bmp/evas_image_load_bmp.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_bmp_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_bmp_libs@
endif
else
loaderbmppkgdir = $(libdir)/evas/modules/loaders/bmp/$(MODULE_ARCH)
loaderbmppkg_LTLIBRARIES = modules/evas/loaders/bmp/module.la
modules_evas_loaders_bmp_module_la_SOURCES = modules/evas/loaders/bmp/evas_image_load_bmp.c
modules_evas_loaders_bmp_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderbmppkgdir = $(libdir)/evas/modules/image_loaders/bmp/$(MODULE_ARCH)
loaderbmppkg_LTLIBRARIES = modules/evas/image_loaders/bmp/module.la
modules_evas_image_loaders_bmp_module_la_SOURCES = modules/evas/image_loaders/bmp/evas_image_load_bmp.c
modules_evas_image_loaders_bmp_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_bmp_cflags@
modules_evas_loaders_bmp_module_la_LIBADD = \
modules_evas_image_loaders_bmp_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_bmp_libs@
modules_evas_loaders_bmp_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_bmp_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_bmp_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_bmp_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_bmp_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_bmp_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_DDS
if EVAS_STATIC_BUILD_DDS
lib_evas_libevas_la_SOURCES += \
modules/evas/loaders/dds/evas_image_load_dds.c \
modules/evas/loaders/dds/s3tc_decoder.c \
modules/evas/loaders/dds/s3tc.h
modules/evas/image_loaders/dds/evas_image_load_dds.c \
modules/evas/image_loaders/dds/s3tc_decoder.c \
modules/evas/image_loaders/dds/s3tc.h
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_dds_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_dds_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += \
modules/evas/loaders/dds/evas_image_load_dds.c \
modules/evas/loaders/dds/s3tc_decoder.c \
modules/evas/loaders/dds/s3tc.h
modules/evas/image_loaders/dds/evas_image_load_dds.c \
modules/evas/image_loaders/dds/s3tc_decoder.c \
modules/evas/image_loaders/dds/s3tc.h
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_dds_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_dds_libs@
endif
else
loaderddspkgdir = $(libdir)/evas/modules/loaders/dds/$(MODULE_ARCH)
loaderddspkg_LTLIBRARIES = modules/evas/loaders/dds/module.la
modules_evas_loaders_dds_module_la_SOURCES = \
modules/evas/loaders/dds/evas_image_load_dds.c \
modules/evas/loaders/dds/s3tc_decoder.c \
modules/evas/loaders/dds/s3tc.h
modules_evas_loaders_dds_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderddspkgdir = $(libdir)/evas/modules/image_loaders/dds/$(MODULE_ARCH)
loaderddspkg_LTLIBRARIES = modules/evas/image_loaders/dds/module.la
modules_evas_image_loaders_dds_module_la_SOURCES = \
modules/evas/image_loaders/dds/evas_image_load_dds.c \
modules/evas/image_loaders/dds/s3tc_decoder.c \
modules/evas/image_loaders/dds/s3tc.h
modules_evas_image_loaders_dds_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_dds_cflags@
modules_evas_loaders_dds_module_la_LIBADD = \
modules_evas_image_loaders_dds_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_dds_libs@
modules_evas_loaders_dds_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_dds_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_dds_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_dds_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_dds_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_dds_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_EET
if EVAS_STATIC_BUILD_EET
lib_evas_libevas_la_SOURCES += modules/evas/loaders/eet/evas_image_load_eet.c modules/evas/savers/eet/evas_image_save_eet.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/eet/evas_image_load_eet.c modules/evas/image_savers/eet/evas_image_save_eet.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_eet_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_eet_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/eet/evas_image_load_eet.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/eet/evas_image_load_eet.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_eet_cflags@
bin_evas_evas_cserve2_slave_DEPENDENCIES += @USE_EET_INTERNAL_LIBS@
bin_evas_evas_cserve2_slave_LDADD += @USE_EET_LIBS@ @evas_image_loader_eet_libs@
endif
else
loadereetpkgdir = $(libdir)/evas/modules/loaders/eet/$(MODULE_ARCH)
loadereetpkg_LTLIBRARIES = modules/evas/loaders/eet/module.la
modules_evas_loaders_eet_module_la_SOURCES = modules/evas/loaders/eet/evas_image_load_eet.c
modules_evas_loaders_eet_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loadereetpkgdir = $(libdir)/evas/modules/image_loaders/eet/$(MODULE_ARCH)
loadereetpkg_LTLIBRARIES = modules/evas/image_loaders/eet/module.la
modules_evas_image_loaders_eet_module_la_SOURCES = modules/evas/image_loaders/eet/evas_image_load_eet.c
modules_evas_image_loaders_eet_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_eet_cflags@
modules_evas_loaders_eet_module_la_LIBADD = \
modules_evas_image_loaders_eet_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_eet_libs@
modules_evas_loaders_eet_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_eet_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_eet_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_eet_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_eet_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_eet_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_GENERIC
if EVAS_STATIC_BUILD_GENERIC
lib_evas_libevas_la_SOURCES += modules/evas/loaders/generic/evas_image_load_generic.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/generic/evas_image_load_generic.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_generic_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_generic_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/generic/evas_image_load_generic.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/generic/evas_image_load_generic.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_generic_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_generic_libs@
endif
else
loadergenericpkgdir = $(libdir)/evas/modules/loaders/generic/$(MODULE_ARCH)
loadergenericpkg_LTLIBRARIES = modules/evas/loaders/generic/module.la
modules_evas_loaders_generic_module_la_SOURCES = modules/evas/loaders/generic/evas_image_load_generic.c
modules_evas_loaders_generic_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loadergenericpkgdir = $(libdir)/evas/modules/image_loaders/generic/$(MODULE_ARCH)
loadergenericpkg_LTLIBRARIES = modules/evas/image_loaders/generic/module.la
modules_evas_image_loaders_generic_module_la_SOURCES = modules/evas/image_loaders/generic/evas_image_load_generic.c
modules_evas_image_loaders_generic_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_generic_cflags@
modules_evas_loaders_generic_module_la_LIBADD = \
modules_evas_image_loaders_generic_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_generic_libs@
modules_evas_loaders_generic_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_generic_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_generic_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_generic_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_generic_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_generic_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_GIF
if EVAS_STATIC_BUILD_GIF
lib_evas_libevas_la_SOURCES += modules/evas/loaders/gif/evas_image_load_gif.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/gif/evas_image_load_gif.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_gif_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_gif_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/gif/evas_image_load_gif.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/gif/evas_image_load_gif.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_gif_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_gif_libs@
endif
else
loadergifpkgdir = $(libdir)/evas/modules/loaders/gif/$(MODULE_ARCH)
loadergifpkg_LTLIBRARIES = modules/evas/loaders/gif/module.la
modules_evas_loaders_gif_module_la_SOURCES = modules/evas/loaders/gif/evas_image_load_gif.c
modules_evas_loaders_gif_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loadergifpkgdir = $(libdir)/evas/modules/image_loaders/gif/$(MODULE_ARCH)
loadergifpkg_LTLIBRARIES = modules/evas/image_loaders/gif/module.la
modules_evas_image_loaders_gif_module_la_SOURCES = modules/evas/image_loaders/gif/evas_image_load_gif.c
modules_evas_image_loaders_gif_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_gif_cflags@
modules_evas_loaders_gif_module_la_LIBADD = \
modules_evas_image_loaders_gif_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_gif_libs@
modules_evas_loaders_gif_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_gif_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_gif_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_gif_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_gif_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_gif_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_ICO
if EVAS_STATIC_BUILD_ICO
lib_evas_libevas_la_SOURCES += modules/evas/loaders/ico/evas_image_load_ico.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/ico/evas_image_load_ico.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_ico_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_ico_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/ico/evas_image_load_ico.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/ico/evas_image_load_ico.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_ico_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_ico_libs@
endif
else
loadericopkgdir = $(libdir)/evas/modules/loaders/ico/$(MODULE_ARCH)
loadericopkg_LTLIBRARIES = modules/evas/loaders/ico/module.la
modules_evas_loaders_ico_module_la_SOURCES = modules/evas/loaders/ico/evas_image_load_ico.c
modules_evas_loaders_ico_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loadericopkgdir = $(libdir)/evas/modules/image_loaders/ico/$(MODULE_ARCH)
loadericopkg_LTLIBRARIES = modules/evas/image_loaders/ico/module.la
modules_evas_image_loaders_ico_module_la_SOURCES = modules/evas/image_loaders/ico/evas_image_load_ico.c
modules_evas_image_loaders_ico_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_ico_cflags@
modules_evas_loaders_ico_module_la_LIBADD = \
modules_evas_image_loaders_ico_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_ico_libs@
modules_evas_loaders_ico_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_ico_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_ico_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_ico_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_ico_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_ico_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_JPEG
if EVAS_STATIC_BUILD_JPEG
lib_evas_libevas_la_SOURCES += modules/evas/loaders/jpeg/evas_image_load_jpeg.c
lib_evas_libevas_la_SOURCES += modules/evas/savers/jpeg/evas_image_save_jpeg.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/jpeg/evas_image_load_jpeg.c
lib_evas_libevas_la_SOURCES += modules/evas/image_savers/jpeg/evas_image_save_jpeg.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_jpeg_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_jpeg_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/jpeg/evas_image_load_jpeg.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/jpeg/evas_image_load_jpeg.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_jpeg_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_jpeg_libs@
endif
else
loaderjpegpkgdir = $(libdir)/evas/modules/loaders/jpeg/$(MODULE_ARCH)
loaderjpegpkg_LTLIBRARIES = modules/evas/loaders/jpeg/module.la
modules_evas_loaders_jpeg_module_la_SOURCES = modules/evas/loaders/jpeg/evas_image_load_jpeg.c
modules_evas_loaders_jpeg_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderjpegpkgdir = $(libdir)/evas/modules/image_loaders/jpeg/$(MODULE_ARCH)
loaderjpegpkg_LTLIBRARIES = modules/evas/image_loaders/jpeg/module.la
modules_evas_image_loaders_jpeg_module_la_SOURCES = modules/evas/image_loaders/jpeg/evas_image_load_jpeg.c
modules_evas_image_loaders_jpeg_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_jpeg_cflags@
modules_evas_loaders_jpeg_module_la_LIBADD = \
modules_evas_image_loaders_jpeg_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_jpeg_libs@
modules_evas_loaders_jpeg_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_jpeg_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_jpeg_module_la_LIBTOOLFLAGS = --tag=disable-static
saverjpegpkgdir = $(libdir)/evas/modules/savers/jpeg/$(MODULE_ARCH)
saverjpegpkg_LTLIBRARIES = modules/evas/savers/jpeg/module.la
modules_evas_savers_jpeg_module_la_SOURCES = modules/evas/savers/jpeg/evas_image_save_jpeg.c
modules_evas_savers_jpeg_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
modules_evas_image_loaders_jpeg_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_jpeg_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_jpeg_module_la_LIBTOOLFLAGS = --tag=disable-static
saverjpegpkgdir = $(libdir)/evas/modules/image_savers/jpeg/$(MODULE_ARCH)
saverjpegpkg_LTLIBRARIES = modules/evas/image_savers/jpeg/module.la
modules_evas_image_savers_jpeg_module_la_SOURCES = modules/evas/image_savers/jpeg/evas_image_save_jpeg.c
modules_evas_image_savers_jpeg_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_jpeg_cflags@
modules_evas_savers_jpeg_module_la_LIBADD = \
modules_evas_image_savers_jpeg_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_jpeg_libs@
modules_evas_savers_jpeg_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_savers_jpeg_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_savers_jpeg_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_savers_jpeg_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_savers_jpeg_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_savers_jpeg_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_JP2K
if EVAS_STATIC_BUILD_JP2K
lib_evas_libevas_la_SOURCES += modules/evas/loaders/jp2k/evas_image_load_jp2k.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_jp2k_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_jp2k_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/jp2k/evas_image_load_jp2k.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_jp2k_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_jp2k_libs@
endif
else
loaderjp2kpkgdir = $(libdir)/evas/modules/loaders/jp2k/$(MODULE_ARCH)
loaderjp2kpkg_LTLIBRARIES = modules/evas/loaders/jp2k/module.la
modules_evas_loaders_jp2k_module_la_SOURCES = modules/evas/loaders/jp2k/evas_image_load_jp2k.c
modules_evas_loaders_jp2k_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderjp2kpkgdir = $(libdir)/evas/modules/image_loaders/jp2k/$(MODULE_ARCH)
loaderjp2kpkg_LTLIBRARIES = modules/evas/image_loaders/jp2k/module.la
modules_evas_image_loaders_jp2k_module_la_SOURCES = modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c
modules_evas_image_loaders_jp2k_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_jp2k_cflags@
modules_evas_loaders_jp2k_module_la_LIBADD = \
modules_evas_image_loaders_jp2k_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_jp2k_libs@
modules_evas_loaders_jp2k_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_jp2k_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_jp2k_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_jp2k_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_jp2k_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_jp2k_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_PMAPS
if EVAS_STATIC_BUILD_PMAPS
lib_evas_libevas_la_SOURCES += modules/evas/loaders/pmaps/evas_image_load_pmaps.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/pmaps/evas_image_load_pmaps.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_pmaps_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_pmaps_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/pmaps/evas_image_load_pmaps.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/pmaps/evas_image_load_pmaps.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_pmaps_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_pmaps_libs@
endif
else
loaderpmapspkgdir = $(libdir)/evas/modules/loaders/pmaps/$(MODULE_ARCH)
loaderpmapspkg_LTLIBRARIES = modules/evas/loaders/pmaps/module.la
modules_evas_loaders_pmaps_module_la_SOURCES = modules/evas/loaders/pmaps/evas_image_load_pmaps.c
modules_evas_loaders_pmaps_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderpmapspkgdir = $(libdir)/evas/modules/image_loaders/pmaps/$(MODULE_ARCH)
loaderpmapspkg_LTLIBRARIES = modules/evas/image_loaders/pmaps/module.la
modules_evas_image_loaders_pmaps_module_la_SOURCES = modules/evas/image_loaders/pmaps/evas_image_load_pmaps.c
modules_evas_image_loaders_pmaps_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_pmaps_cflags@
modules_evas_loaders_pmaps_module_la_LIBADD = \
modules_evas_image_loaders_pmaps_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_pmaps_libs@
modules_evas_loaders_pmaps_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_pmaps_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_pmaps_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_pmaps_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_pmaps_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_pmaps_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_PNG
if EVAS_STATIC_BUILD_PNG
lib_evas_libevas_la_SOURCES += modules/evas/loaders/png/evas_image_load_png.c modules/evas/savers/png/evas_image_save_png.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/png/evas_image_load_png.c modules/evas/image_savers/png/evas_image_save_png.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_png_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_png_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/png/evas_image_load_png.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/png/evas_image_load_png.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_png_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_png_libs@
endif
else
loaderpngpkgdir = $(libdir)/evas/modules/loaders/png/$(MODULE_ARCH)
loaderpngpkg_LTLIBRARIES = modules/evas/loaders/png/module.la
modules_evas_loaders_png_module_la_SOURCES = modules/evas/loaders/png/evas_image_load_png.c
modules_evas_loaders_png_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderpngpkgdir = $(libdir)/evas/modules/image_loaders/png/$(MODULE_ARCH)
loaderpngpkg_LTLIBRARIES = modules/evas/image_loaders/png/module.la
modules_evas_image_loaders_png_module_la_SOURCES = modules/evas/image_loaders/png/evas_image_load_png.c
modules_evas_image_loaders_png_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_png_cflags@
modules_evas_loaders_png_module_la_LIBADD = \
modules_evas_image_loaders_png_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_png_libs@
modules_evas_loaders_png_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_png_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_png_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_png_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_png_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_png_module_la_LIBTOOLFLAGS = --tag=disable-static
saverpngpkgdir = $(libdir)/evas/modules/savers/png/$(MODULE_ARCH)
saverpngpkg_LTLIBRARIES = modules/evas/savers/png/module.la
modules_evas_savers_png_module_la_SOURCES = modules/evas/savers/png/evas_image_save_png.c
modules_evas_savers_png_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
saverpngpkgdir = $(libdir)/evas/modules/image_savers/png/$(MODULE_ARCH)
saverpngpkg_LTLIBRARIES = modules/evas/image_savers/png/module.la
modules_evas_image_savers_png_module_la_SOURCES = modules/evas/image_savers/png/evas_image_save_png.c
modules_evas_image_savers_png_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_png_cflags@
modules_evas_savers_png_module_la_LIBADD = \
modules_evas_image_savers_png_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_png_libs@
modules_evas_savers_png_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_savers_png_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_savers_png_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_savers_png_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_savers_png_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_savers_png_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_PSD
if EVAS_STATIC_BUILD_PSD
lib_evas_libevas_la_SOURCES += modules/evas/loaders/psd/evas_image_load_psd.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/psd/evas_image_load_psd.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_psd_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_psd_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/psd/evas_image_load_psd.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/psd/evas_image_load_psd.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_psd_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_psd_libs@
endif
else
loaderpsdpkgdir = $(libdir)/evas/modules/loaders/psd/$(MODULE_ARCH)
loaderpsdpkg_LTLIBRARIES = modules/evas/loaders/psd/module.la
modules_evas_loaders_psd_module_la_SOURCES = modules/evas/loaders/psd/evas_image_load_psd.c
modules_evas_loaders_psd_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderpsdpkgdir = $(libdir)/evas/modules/image_loaders/psd/$(MODULE_ARCH)
loaderpsdpkg_LTLIBRARIES = modules/evas/image_loaders/psd/module.la
modules_evas_image_loaders_psd_module_la_SOURCES = modules/evas/image_loaders/psd/evas_image_load_psd.c
modules_evas_image_loaders_psd_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_psd_cflags@
modules_evas_loaders_psd_module_la_LIBADD = \
modules_evas_image_loaders_psd_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_psd_libs@
modules_evas_loaders_psd_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_psd_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_psd_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_psd_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_psd_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_psd_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_TGA
if EVAS_STATIC_BUILD_TGA
lib_evas_libevas_la_SOURCES += modules/evas/loaders/tga/evas_image_load_tga.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/tga/evas_image_load_tga.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_tga_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_tga_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/tga/evas_image_load_tga.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/tga/evas_image_load_tga.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_tga_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_tga_libs@
endif
else
loadertgapkgdir = $(libdir)/evas/modules/loaders/tga/$(MODULE_ARCH)
loadertgapkg_LTLIBRARIES = modules/evas/loaders/tga/module.la
modules_evas_loaders_tga_module_la_SOURCES = modules/evas/loaders/tga/evas_image_load_tga.c
modules_evas_loaders_tga_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loadertgapkgdir = $(libdir)/evas/modules/image_loaders/tga/$(MODULE_ARCH)
loadertgapkg_LTLIBRARIES = modules/evas/image_loaders/tga/module.la
modules_evas_image_loaders_tga_module_la_SOURCES = modules/evas/image_loaders/tga/evas_image_load_tga.c
modules_evas_image_loaders_tga_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_tga_cflags@
modules_evas_loaders_tga_module_la_LIBADD = \
modules_evas_image_loaders_tga_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_tga_libs@
modules_evas_loaders_tga_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_tga_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_tga_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_tga_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_tga_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_tga_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_TIFF
if EVAS_STATIC_BUILD_TIFF
lib_evas_libevas_la_SOURCES += modules/evas/loaders/tiff/evas_image_load_tiff.c modules/evas/savers/tiff/evas_image_save_tiff.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/tiff/evas_image_load_tiff.c modules/evas/image_savers/tiff/evas_image_save_tiff.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_tiff_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_tiff_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/tiff/evas_image_load_tiff.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/tiff/evas_image_load_tiff.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_tiff_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_tiff_libs@
endif
else
loadertiffpkgdir = $(libdir)/evas/modules/loaders/tiff/$(MODULE_ARCH)
loadertiffpkg_LTLIBRARIES = modules/evas/loaders/tiff/module.la
modules_evas_loaders_tiff_module_la_SOURCES = modules/evas/loaders/tiff/evas_image_load_tiff.c
modules_evas_loaders_tiff_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loadertiffpkgdir = $(libdir)/evas/modules/image_loaders/tiff/$(MODULE_ARCH)
loadertiffpkg_LTLIBRARIES = modules/evas/image_loaders/tiff/module.la
modules_evas_image_loaders_tiff_module_la_SOURCES = modules/evas/image_loaders/tiff/evas_image_load_tiff.c
modules_evas_image_loaders_tiff_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_tiff_cflags@
modules_evas_loaders_tiff_module_la_LIBADD = \
modules_evas_image_loaders_tiff_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_tiff_libs@
modules_evas_loaders_tiff_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_tiff_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_tiff_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_tiff_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_tiff_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_tiff_module_la_LIBTOOLFLAGS = --tag=disable-static
savertiffpkgdir = $(libdir)/evas/modules/savers/tiff/$(MODULE_ARCH)
savertiffpkg_LTLIBRARIES = modules/evas/savers/tiff/module.la
modules_evas_savers_tiff_module_la_SOURCES = modules/evas/savers/tiff/evas_image_save_tiff.c
modules_evas_savers_tiff_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
savertiffpkgdir = $(libdir)/evas/modules/image_savers/tiff/$(MODULE_ARCH)
savertiffpkg_LTLIBRARIES = modules/evas/image_savers/tiff/module.la
modules_evas_image_savers_tiff_module_la_SOURCES = modules/evas/image_savers/tiff/evas_image_save_tiff.c
modules_evas_image_savers_tiff_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_tiff_cflags@
modules_evas_savers_tiff_module_la_LIBADD = \
modules_evas_image_savers_tiff_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_tiff_libs@
modules_evas_savers_tiff_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_savers_tiff_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_savers_tiff_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_savers_tiff_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_savers_tiff_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_savers_tiff_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_WBMP
if EVAS_STATIC_BUILD_WBMP
lib_evas_libevas_la_SOURCES += modules/evas/loaders/wbmp/evas_image_load_wbmp.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_wbmp_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_wbmp_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/wbmp/evas_image_load_wbmp.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_wbmp_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_wbmp_libs@
endif
else
loaderwbmppkgdir = $(libdir)/evas/modules/loaders/wbmp/$(MODULE_ARCH)
loaderwbmppkg_LTLIBRARIES = modules/evas/loaders/wbmp/module.la
modules_evas_loaders_wbmp_module_la_SOURCES = modules/evas/loaders/wbmp/evas_image_load_wbmp.c
modules_evas_loaders_wbmp_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderwbmppkgdir = $(libdir)/evas/modules/image_loaders/wbmp/$(MODULE_ARCH)
loaderwbmppkg_LTLIBRARIES = modules/evas/image_loaders/wbmp/module.la
modules_evas_image_loaders_wbmp_module_la_SOURCES = modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c
modules_evas_image_loaders_wbmp_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_wbmp_cflags@
modules_evas_loaders_wbmp_module_la_LIBADD = \
modules_evas_image_loaders_wbmp_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_wbmp_libs@
modules_evas_loaders_wbmp_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_wbmp_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_wbmp_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_wbmp_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_wbmp_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_wbmp_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_WEBP
if EVAS_STATIC_BUILD_WEBP
lib_evas_libevas_la_SOURCES += modules/evas/loaders/webp/evas_image_load_webp.c modules/evas/savers/webp/evas_image_save_webp.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/webp/evas_image_load_webp.c modules/evas/image_savers/webp/evas_image_save_webp.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_webp_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_webp_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/webp/evas_image_load_webp.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/webp/evas_image_load_webp.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_webp_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_webp_libs@
endif
else
loaderwebppkgdir = $(libdir)/evas/modules/loaders/webp/$(MODULE_ARCH)
loaderwebppkg_LTLIBRARIES = modules/evas/loaders/webp/module.la
modules_evas_loaders_webp_module_la_SOURCES = modules/evas/loaders/webp/evas_image_load_webp.c
modules_evas_loaders_webp_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderwebppkgdir = $(libdir)/evas/modules/image_loaders/webp/$(MODULE_ARCH)
loaderwebppkg_LTLIBRARIES = modules/evas/image_loaders/webp/module.la
modules_evas_image_loaders_webp_module_la_SOURCES = modules/evas/image_loaders/webp/evas_image_load_webp.c
modules_evas_image_loaders_webp_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_webp_cflags@
modules_evas_loaders_webp_module_la_LIBADD = \
modules_evas_image_loaders_webp_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_webp_libs@
modules_evas_loaders_webp_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_webp_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_webp_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_webp_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_webp_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_webp_module_la_LIBTOOLFLAGS = --tag=disable-static
saverwebppkgdir = $(libdir)/evas/modules/savers/webp/$(MODULE_ARCH)
saverwebppkg_LTLIBRARIES = modules/evas/savers/webp/module.la
modules_evas_savers_webp_module_la_SOURCES = modules/evas/savers/webp/evas_image_save_webp.c
modules_evas_savers_webp_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
saverwebppkgdir = $(libdir)/evas/modules/image_savers/webp/$(MODULE_ARCH)
saverwebppkg_LTLIBRARIES = modules/evas/image_savers/webp/module.la
modules_evas_image_savers_webp_module_la_SOURCES = modules/evas/image_savers/webp/evas_image_save_webp.c
modules_evas_image_savers_webp_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_webp_cflags@
modules_evas_savers_webp_module_la_LIBADD = \
modules_evas_image_savers_webp_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_webp_libs@
modules_evas_savers_webp_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_savers_webp_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_savers_webp_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_savers_webp_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_savers_webp_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_savers_webp_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_LOADER_XPM
if EVAS_STATIC_BUILD_XPM
lib_evas_libevas_la_SOURCES += modules/evas/loaders/xpm/evas_image_load_xpm.c
lib_evas_libevas_la_SOURCES += modules/evas/image_loaders/xpm/evas_image_load_xpm.c
lib_evas_libevas_la_CPPFLAGS += @evas_image_loader_xpm_cflags@
lib_evas_libevas_la_LIBADD += @evas_image_loader_xpm_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/loaders/xpm/evas_image_load_xpm.c
bin_evas_evas_cserve2_slave_SOURCES += modules/evas/image_loaders/xpm/evas_image_load_xpm.c
bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_image_loader_xpm_cflags@
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_xpm_libs@
endif
else
loaderxpmpkgdir = $(libdir)/evas/modules/loaders/xpm/$(MODULE_ARCH)
loaderxpmpkg_LTLIBRARIES = modules/evas/loaders/xpm/module.la
modules_evas_loaders_xpm_module_la_SOURCES = modules/evas/loaders/xpm/evas_image_load_xpm.c
modules_evas_loaders_xpm_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
loaderxpmpkgdir = $(libdir)/evas/modules/image_loaders/xpm/$(MODULE_ARCH)
loaderxpmpkg_LTLIBRARIES = modules/evas/image_loaders/xpm/module.la
modules_evas_image_loaders_xpm_module_la_SOURCES = modules/evas/image_loaders/xpm/evas_image_load_xpm.c
modules_evas_image_loaders_xpm_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/lib/evas/include \
@EVAS_CFLAGS@ \
@evas_image_loader_xpm_cflags@
modules_evas_loaders_xpm_module_la_LIBADD = \
modules_evas_image_loaders_xpm_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_xpm_libs@
modules_evas_loaders_xpm_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_xpm_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_xpm_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_xpm_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_xpm_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_xpm_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
@ -1743,8 +1748,8 @@ if BUILD_LOADER_TGV
EXTRA_DIST += static_libs/rg_etc/README
if EVAS_STATIC_BUILD_TGV
lib_evas_libevas_la_SOURCES += \
modules/evas/loaders/tgv/evas_image_load_tgv.c \
modules/evas/savers/tgv/evas_image_save_tgv.c \
modules/evas/image_loaders/tgv/evas_image_load_tgv.c \
modules/evas/image_savers/tgv/evas_image_save_tgv.c \
static_libs/rg_etc/rg_etc1.c \
static_libs/rg_etc/rg_etc2.c \
static_libs/rg_etc/rg_etc1.h \
@ -1766,7 +1771,7 @@ endif
lib_evas_libevas_la_LIBADD += @evas_image_loader_tgv_libs@
if EVAS_CSERVE2
bin_evas_evas_cserve2_slave_SOURCES += \
modules/evas/loaders/tgv/evas_image_load_tgv.c \
modules/evas/image_loaders/tgv/evas_image_load_tgv.c \
static_libs/rg_etc/rg_etc1.c \
static_libs/rg_etc/rg_etc2.c \
static_libs/rg_etc/rg_etc1.h
@ -1788,19 +1793,19 @@ endif
bin_evas_evas_cserve2_slave_LDADD += @evas_image_loader_tgv_libs@
endif
else
loadertgvpkgdir = $(libdir)/evas/modules/loaders/tgv/$(MODULE_ARCH)
loadertgvpkg_LTLIBRARIES = modules/evas/loaders/tgv/module.la
modules_evas_loaders_tgv_module_la_SOURCES = \
modules/evas/loaders/tgv/evas_image_load_tgv.c \
loadertgvpkgdir = $(libdir)/evas/modules/image_loaders/tgv/$(MODULE_ARCH)
loadertgvpkg_LTLIBRARIES = modules/evas/image_loaders/tgv/module.la
modules_evas_image_loaders_tgv_module_la_SOURCES = \
modules/evas/image_loaders/tgv/evas_image_load_tgv.c \
static_libs/rg_etc/rg_etc1.c \
static_libs/rg_etc/rg_etc2.c \
static_libs/rg_etc/rg_etc1.h
if ! ENABLE_LIBLZ4
modules_evas_loaders_tgv_module_la_SOURCES += \
modules_evas_image_loaders_tgv_module_la_SOURCES += \
static_libs/lz4/lz4.c \
static_libs/lz4/lz4.h
endif
modules_evas_loaders_tgv_module_la_CPPFLAGS = \
modules_evas_image_loaders_tgv_module_la_CPPFLAGS = \
-I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/static_libs/rg_etc \
-I$(top_srcdir)/src/lib/evas/ \
@ -1808,46 +1813,46 @@ modules_evas_loaders_tgv_module_la_CPPFLAGS = \
@NEON_CFLAGS@ \
@evas_image_loader_tgv_cflags@
if ! ENABLE_LIBLZ4
modules_evas_loaders_tgv_module_la_CPPFLAGS += \
modules_evas_image_loaders_tgv_module_la_CPPFLAGS += \
-I$(top_srcdir)/src/static_libs/lz4
endif
modules_evas_loaders_tgv_module_la_LIBADD = \
modules_evas_image_loaders_tgv_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_loader_tgv_libs@
modules_evas_loaders_tgv_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_loaders_tgv_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_loaders_tgv_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_loaders_tgv_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_loaders_tgv_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_loaders_tgv_module_la_LIBTOOLFLAGS = --tag=disable-static
savertgvpkgdir = $(libdir)/evas/modules/savers/tgv/$(MODULE_ARCH)
savertgvpkg_LTLIBRARIES = modules/evas/savers/tgv/module.la
modules_evas_savers_tgv_module_la_SOURCES = \
modules/evas/savers/tgv/evas_image_save_tgv.c \
savertgvpkgdir = $(libdir)/evas/modules/image_savers/tgv/$(MODULE_ARCH)
savertgvpkg_LTLIBRARIES = modules/evas/image_savers/tgv/module.la
modules_evas_image_savers_tgv_module_la_SOURCES = \
modules/evas/image_savers/tgv/evas_image_save_tgv.c \
static_libs/rg_etc/rg_etc1.c \
static_libs/rg_etc/rg_etc1.h \
static_libs/rg_etc/etc2_encoder.c
if ! ENABLE_LIBLZ4
modules_evas_savers_tgv_module_la_SOURCES += \
modules_evas_image_savers_tgv_module_la_SOURCES += \
static_libs/lz4/lz4.c \
static_libs/lz4/lz4.h \
static_libs/lz4/lz4hc.c \
static_libs/lz4/lz4hc.h
endif
modules_evas_savers_tgv_module_la_CPPFLAGS = \
modules_evas_image_savers_tgv_module_la_CPPFLAGS = \
-I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/static_libs/rg_etc \
-I$(top_srcdir)/src/lib/evas/ \
@EVAS_CFLAGS@ \
@evas_image_saver_tgv_cflags@
if ! ENABLE_LIBLZ4
modules_evas_savers_tgv_module_la_CPPFLAGS += \
modules_evas_image_savers_tgv_module_la_CPPFLAGS += \
-I$(top_srcdir)/src/static_libs/lz4
endif
modules_evas_savers_tgv_module_la_LIBADD = \
modules_evas_image_savers_tgv_module_la_LIBADD = \
@USE_EVAS_LIBS@ \
@evas_image_saver_tgv_libs@
modules_evas_savers_tgv_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_savers_tgv_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_savers_tgv_module_la_LIBTOOLFLAGS = --tag=disable-static
modules_evas_image_savers_tgv_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
modules_evas_image_savers_tgv_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_evas_image_savers_tgv_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif

View File

@ -0,0 +1,210 @@
/**
* Temporary example to explain what changed in obj.
*
* @verbatim
* gcc -o example_to_explain_fixes example_to_explain_fixes.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`
* @endverbatim
*/
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#define WIDTH 1900
#define HEIGHT 1080
#define ADD_OBJ_MESH(mesh_name, Y, Z) \
mesh_name = eo_add(EVAS_3D_MESH_CLASS, evas); \
eo_do(mesh_name, \
efl_file_set("sweet_"#mesh_name".obj", NULL), \
evas_3d_mesh_frame_material_set(0, material), \
evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG)); \
eo_do(mesh_name, efl_file_save("saved_"#mesh_name".obj", NULL, NULL)); \
mesh_name##_node = eo_add(EVAS_3D_NODE_CLASS, evas, \
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); \
eo_do(root_node, \
evas_3d_node_member_add(mesh_name##_node)); \
eo_do(mesh_name##_node, \
evas_3d_node_mesh_add(mesh_name), \
evas_3d_node_position_set(0, Y, Z));
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;
Eo *background = NULL;
Eo *image = NULL;
Eo *scene = NULL;
Eo *root_node = NULL;
Eo *camera_node = NULL;
Eo *light_node = NULL;
Eo *camera = NULL;
Eo *home_node = NULL;
Eo *home = NULL;
Eo *home_without_normals_node = NULL;
Eo *home_without_normals = NULL;;
Eo *home_without_tex_coords_node = NULL;
Eo *home_without_tex_coords = NULL;
Eo *home_only_vertex_coords_node = NULL;
Eo *home_only_vertex_coords = NULL;
Eo *material = NULL;
Eo *texture = NULL;
Eo *light = NULL;
static float angle = 0;
static Eina_Bool
_animate_scene(void *data)
{
angle += 0.2;
eo_do((Evas_3D_Node *)data, evas_3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, -1.0));
/* Rotate */
if (angle > 360.0) angle -= 360.0f;
return EINA_TRUE;
}
static void
_on_delete(Ecore_Evas *ee EINA_UNUSED)
{
ecore_main_loop_quit();
}
static void
_on_canvas_resize(Ecore_Evas *ee)
{
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
eo_do(background, evas_obj_size_set(w, h));
eo_do(image, evas_obj_size_set(w, h));
}
int
main(void)
{
//Unless Evas 3D supports Software renderer, we set gl backened forcely.
setenv("ECORE_EVAS_ENGINE", "opengl_x11", 1);
if (!ecore_evas_init()) return 0;
ecore_evas = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL);
if (!ecore_evas) return 0;
ecore_evas_callback_delete_request_set(ecore_evas, _on_delete);
ecore_evas_callback_resize_set(ecore_evas, _on_canvas_resize);
ecore_evas_show(ecore_evas);
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
scene = eo_add(EVAS_3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
root_node = eo_add(EVAS_3D_NODE_CLASS, evas,
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_3d_camera_projection_perspective_set(100.0, 1.0, 1.0, 500.0));
camera_node =
eo_add(EVAS_3D_NODE_CLASS, evas,
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_3d_node_camera_set(camera));
eo_do(root_node,
evas_3d_node_member_add(camera_node));
eo_do(camera_node,
evas_3d_node_position_set(10.0, 0.0, 0.0),
evas_3d_node_look_at_set(EVAS_3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_3D_SPACE_PARENT, 0.0, 0.0, 1.0));
/* Add the light. */
light = eo_add(EVAS_3D_LIGHT_CLASS, evas);
eo_do(light,
evas_3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_3d_light_directional_set(EINA_TRUE));
light_node =
eo_add(EVAS_3D_NODE_CLASS, evas,
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_3d_node_light_set(light),
evas_3d_node_position_set(10.0, 0.0, 2.0),
evas_3d_node_look_at_set(EVAS_3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_3D_SPACE_PARENT, 0.0, 1.0, 0.0));
eo_do(root_node,
evas_3d_node_member_add(light_node));
texture = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
ADD_OBJ_MESH(home, -3, -3)
ADD_OBJ_MESH(home_without_normals, -3, 3)
ADD_OBJ_MESH(home_without_tex_coords, 3, -3)
ADD_OBJ_MESH(home_only_vertex_coords, 3, 3)
eo_do(texture,
evas_3d_texture_file_set("sweet_home_temp.png", NULL),
evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST,
EVAS_3D_TEXTURE_FILTER_NEAREST),
evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT,
EVAS_3D_WRAP_MODE_REPEAT));
eo_do(material,
evas_3d_material_texture_set(EVAS_3D_MATERIAL_DIFFUSE, texture),
evas_3d_material_enable_set(EVAS_3D_MATERIAL_AMBIENT, EINA_TRUE),
evas_3d_material_enable_set(EVAS_3D_MATERIAL_DIFFUSE, EINA_TRUE),
evas_3d_material_enable_set(EVAS_3D_MATERIAL_SPECULAR, EINA_TRUE),
evas_3d_material_enable_set(EVAS_3D_MATERIAL_NORMAL, EINA_TRUE),
evas_3d_material_color_set(EVAS_3D_MATERIAL_AMBIENT,
0.01, 0.01, 0.01, 1.0),
evas_3d_material_color_set(EVAS_3D_MATERIAL_DIFFUSE,
1.0, 1.0, 1.0, 1.0),
evas_3d_material_color_set(EVAS_3D_MATERIAL_SPECULAR,
1.0, 1.0, 1.0, 1.0),
evas_3d_material_shininess_set(50.0));
/* Set up scene. */
eo_do(scene,
evas_3d_scene_root_node_set(root_node),
evas_3d_scene_camera_node_set(camera_node),
evas_3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
evas_obj_color_set(0, 0, 0, 255),
evas_obj_size_set(WIDTH, HEIGHT),
evas_obj_visibility_set(EINA_TRUE));
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
eo_do(image,
evas_obj_size_set(WIDTH, HEIGHT),
evas_obj_visibility_set(EINA_TRUE));
/* Set the image object as render target for 3D scene. */
eo_do(image, evas_obj_image_scene_set(scene));
ecore_timer_add(0.01, _animate_scene, home_node);
ecore_timer_add(0.01, _animate_scene, home_without_normals_node);
ecore_timer_add(0.01, _animate_scene, home_without_tex_coords_node);
ecore_timer_add(0.01, _animate_scene, home_only_vertex_coords_node);
/* Enter main loop. */
ecore_main_loop_begin();
ecore_evas_free(ecore_evas);
ecore_evas_shutdown();
return 0;
}

View File

@ -0,0 +1,22 @@
# Blender MTL File: 'sweet_home.blend'
# Material Count: 2
newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd /home/bdevichev/Desktop/rect.png
newmtl Material_Untitled
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd /home/bdevichev/Desktop/sweet_home.png

View File

@ -0,0 +1,111 @@
# Blender v2.69 (sub 0) OBJ File: 'sweet_home.blend'
# www.blender.org
mtllib sweet_home.mtl
o Cube
v 1.000003 -0.999997 0.000002
v -0.999997 -1.000003 0.000002
v -1.000002 0.999998 0.000002
v 0.999998 1.000002 0.000002
v 1.000002 -0.999998 2.000002
v -0.999998 -1.000002 2.000002
v -1.000002 0.999998 2.000002
v 0.999997 1.000003 2.000002
v 0.000002 -1.000000 3.075149
v -0.000002 1.000000 3.075149
v 0.666668 -0.644449 2.358384
v 0.333335 -0.644450 2.716766
v 0.666667 -0.293067 2.358384
v 0.333334 -0.293068 2.716766
v 0.662209 -0.629904 2.991038
v 0.337794 -0.629904 2.980731
v 0.662208 -0.307612 2.991038
v 0.337793 -0.307613 2.980731
vt 0.013689 0.608350
vt 0.285640 0.608350
vt 0.285640 0.978776
vt 0.013689 0.978776
vt 0.564957 0.983606
vt 0.293719 0.983606
vt 0.293719 0.613180
vt 0.564957 0.613180
vt 0.646856 0.021326
vt 0.083404 0.021326
vt 0.083369 0.584801
vt 0.646820 0.584801
vt 0.949735 0.303064
vt 0.654355 0.022016
vt 0.957234 0.303753
vt 0.654320 0.585490
vt 0.090869 0.585491
vt 0.090904 0.022016
vt 0.820337 0.692442
vt 0.820337 0.803140
vt 0.740863 0.803140
vt 0.740863 0.692442
vt 0.695284 0.903159
vt 0.695284 0.830265
vt 0.768687 0.830265
vt 0.768687 0.903159
vt 0.874667 0.789013
vt 0.874667 0.893367
vt 0.979009 0.893367
vt 0.979009 0.789013
vt 0.567834 0.981515
vt 0.567834 0.611089
vt 0.768686 0.903159
vt 0.768687 0.823686
vt 0.811715 0.826975
vt 0.811715 0.899870
vt 0.591196 0.903159
vt 0.591196 0.823686
vt 0.695284 0.826975
vt 0.695284 0.899870
vt 0.666035 0.721564
vt 0.667476 0.661838
vt 0.740863 0.660019
vt 0.591196 0.741571
vt 0.666035 0.660015
vt 0.666035 0.803140
vt 0.592658 0.801339
vt 0.013481 0.981515
vt 0.104078 0.915663
vt 0.194676 0.915663
vt 0.285274 0.981515
vt 0.194676 0.850582
vt 0.285274 0.611089
vt 0.104078 0.850582
vt 0.013481 0.611089
vn -0.732233 -0.000002 0.681054
vn 1.000000 0.000002 0.000000
vn 0.000002 -1.000000 0.000000
vn -0.000002 1.000000 -0.000000
vn -0.732233 -0.000001 -0.681054
vn -0.031755 -0.000000 0.999496
vn -0.000000 0.000000 -1.000000
vn -1.000000 -0.000002 -0.000000
vn -0.999857 -0.000002 0.016891
vn 0.999975 0.000002 0.007049
vn 0.017155 0.999327 0.032422
vn 0.017160 -0.999327 0.032422
vn 0.732233 0.000001 0.681054
vn 0.732233 0.000002 0.681054
vn 0.732234 0.000002 0.681053
usemtl Material
s off
f 6/1/1 9/2/1 10/3/1 7/4/1
usemtl Material_Untitled
f 4/5/2 8/6/2 5/7/2 1/8/2
f 6/9/3 2/10/3 1/11/3 5/12/3 9/13/3
f 7/14/4 10/15/4 8/16/4 4/17/4 3/18/4
f 11/19/5 12/20/5 14/21/5 13/22/5
f 15/23/6 17/24/6 18/25/6 16/26/6
f 2/27/7 3/28/7 4/29/7 1/30/7
f 6/2/8 7/3/8 3/31/8 2/32/8
f 14/33/9 12/34/9 16/35/9 18/36/9
f 11/37/10 13/38/10 17/39/10 15/40/10
f 13/21/11 14/41/11 18/42/11 17/43/11
f 12/44/12 11/45/12 15/46/12 16/47/12
f 5/48/13 11/49/13 12/50/13 9/51/13
f 9/51/14 12/50/14 14/52/14 10/53/14
f 13/54/14 8/55/14 10/53/14 14/52/14
f 11/49/15 5/48/15 8/55/15 13/54/15

View File

@ -0,0 +1,12 @@
# Blender MTL File: 'sweet_home.blend'
# Material Count: 1
newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd /home/bdevichev/Desktop/rect.png

View File

@ -0,0 +1,40 @@
# Blender v2.69 (sub 0) OBJ File: 'sweet_home.blend'
# www.blender.org
mtllib sweet_home_only_vertex_coords.mtl
o Cube
v 1.000003 -0.999997 0.000002
v -0.999997 -1.000003 0.000002
v -1.000002 0.999998 0.000002
v 0.999998 1.000002 0.000002
v 1.000002 -0.999998 2.000002
v -0.999998 -1.000002 2.000002
v -1.000002 0.999998 2.000002
v 0.999997 1.000003 2.000002
v 0.000002 -1.000000 3.075149
v -0.000002 1.000000 3.075149
v 0.666668 -0.644449 2.358384
v 0.333335 -0.644450 2.716766
v 0.666667 -0.293067 2.358384
v 0.333334 -0.293068 2.716766
v 0.662209 -0.629904 2.991038
v 0.337794 -0.629904 2.980731
v 0.662208 -0.307612 2.991038
v 0.337793 -0.307613 2.980731
usemtl Material
s off
f 4 8 5 1
f 6 2 1 5 9
f 7 10 8 4 3
f 11 12 14 13
f 15 17 18 16
f 2 3 4 1
f 6 7 3 2
f 6 9 10 7
f 14 12 16 18
f 11 13 17 15
f 13 14 18 17
f 12 11 15 16
f 5 11 12 9
f 9 12 14 10
f 13 8 10 14
f 11 5 8 13

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 KiB

View File

@ -0,0 +1,22 @@
# Blender MTL File: 'sweet_home.blend'
# Material Count: 2
newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd /home/bdevichev/Desktop/rect.png
newmtl Material_Untitled
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd /home/bdevichev/Desktop/sweet_home.png

View File

@ -0,0 +1,96 @@
# Blender v2.69 (sub 0) OBJ File: 'sweet_home.blend'
# www.blender.org
mtllib sweet_home_without_normals.mtl
o Cube
v 1.000003 -0.999997 0.000002
v -0.999997 -1.000003 0.000002
v -1.000002 0.999998 0.000002
v 0.999998 1.000002 0.000002
v 1.000002 -0.999998 2.000002
v -0.999998 -1.000002 2.000002
v -1.000002 0.999998 2.000002
v 0.999997 1.000003 2.000002
v 0.000002 -1.000000 3.075149
v -0.000002 1.000000 3.075149
v 0.666668 -0.644449 2.358384
v 0.333335 -0.644450 2.716766
v 0.666667 -0.293067 2.358384
v 0.333334 -0.293068 2.716766
v 0.662209 -0.629904 2.991038
v 0.337794 -0.629904 2.980731
v 0.662208 -0.307612 2.991038
v 0.337793 -0.307613 2.980731
vt 0.013689 0.608350
vt 0.285640 0.608350
vt 0.285640 0.978776
vt 0.013689 0.978776
vt 0.564957 0.983606
vt 0.293719 0.983606
vt 0.293719 0.613180
vt 0.564957 0.613180
vt 0.646856 0.021326
vt 0.083404 0.021326
vt 0.083369 0.584801
vt 0.646820 0.584801
vt 0.949735 0.303064
vt 0.654355 0.022016
vt 0.957234 0.303753
vt 0.654320 0.585490
vt 0.090869 0.585491
vt 0.090904 0.022016
vt 0.820337 0.692442
vt 0.820337 0.803140
vt 0.740863 0.803140
vt 0.740863 0.692442
vt 0.695284 0.903159
vt 0.695284 0.830265
vt 0.768687 0.830265
vt 0.768687 0.903159
vt 0.874667 0.789013
vt 0.874667 0.893367
vt 0.979009 0.893367
vt 0.979009 0.789013
vt 0.567834 0.981515
vt 0.567834 0.611089
vt 0.768686 0.903159
vt 0.768687 0.823686
vt 0.811715 0.826975
vt 0.811715 0.899870
vt 0.591196 0.903159
vt 0.591196 0.823686
vt 0.695284 0.826975
vt 0.695284 0.899870
vt 0.666035 0.721564
vt 0.667476 0.661838
vt 0.740863 0.660019
vt 0.591196 0.741571
vt 0.666035 0.660015
vt 0.666035 0.803140
vt 0.592658 0.801339
vt 0.013481 0.981515
vt 0.104078 0.915663
vt 0.194676 0.915663
vt 0.285274 0.981515
vt 0.194676 0.850582
vt 0.285274 0.611089
vt 0.104078 0.850582
vt 0.013481 0.611089
usemtl Material
s off
f 6/1 9/2 10/3 7/4
usemtl Material_Untitled
f 4/5 8/6 5/7 1/8
f 6/9 2/10 1/11 5/12 9/13
f 7/14 10/15 8/16 4/17 3/18
f 11/19 12/20 14/21 13/22
f 15/23 17/24 18/25 16/26
f 2/27 3/28 4/29 1/30
f 6/2 7/3 3/31 2/32
f 14/33 12/34 16/35 18/36
f 11/37 13/38 17/39 15/40
f 13/21 14/41 18/42 17/43
f 12/44 11/45 15/46 16/47
f 5/48 11/49 12/50 9/51
f 9/51 12/50 14/52 10/53
f 13/54 8/55 10/53 14/52
f 11/49 5/48 8/55 13/54

View File

@ -0,0 +1,12 @@
# Blender MTL File: 'sweet_home.blend'
# Material Count: 1
newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd /home/bdevichev/Desktop/rect.png

View File

@ -0,0 +1,55 @@
# Blender v2.69 (sub 0) OBJ File: 'sweet_home.blend'
# www.blender.org
mtllib sweet_home_without_tex_coords.mtl
o Cube
v 1.000003 -0.999997 0.000002
v -0.999997 -1.000003 0.000002
v -1.000002 0.999998 0.000002
v 0.999998 1.000002 0.000002
v 1.000002 -0.999998 2.000002
v -0.999998 -1.000002 2.000002
v -1.000002 0.999998 2.000002
v 0.999997 1.000003 2.000002
v 0.000002 -1.000000 3.075149
v -0.000002 1.000000 3.075149
v 0.666668 -0.644449 2.358384
v 0.333335 -0.644450 2.716766
v 0.666667 -0.293067 2.358384
v 0.333334 -0.293068 2.716766
v 0.662209 -0.629904 2.991038
v 0.337794 -0.629904 2.980731
v 0.662208 -0.307612 2.991038
v 0.337793 -0.307613 2.980731
vn 1.000000 0.000002 0.000000
vn 0.000002 -1.000000 0.000000
vn -0.000002 1.000000 -0.000000
vn -0.732233 -0.000001 -0.681054
vn -0.031755 -0.000000 0.999496
vn -0.000000 0.000000 -1.000000
vn -1.000000 -0.000002 -0.000000
vn -0.732233 -0.000002 0.681054
vn -0.999857 -0.000002 0.016891
vn 0.999975 0.000002 0.007049
vn 0.017155 0.999327 0.032422
vn 0.017160 -0.999327 0.032422
vn 0.732233 0.000001 0.681054
vn 0.732233 0.000002 0.681054
vn 0.732234 0.000002 0.681053
usemtl Material
s off
f 4//1 8//1 5//1 1//1
f 6//2 2//2 1//2 5//2 9//2
f 7//3 10//3 8//3 4//3 3//3
f 11//4 12//4 14//4 13//4
f 15//5 17//5 18//5 16//5
f 2//6 3//6 4//6 1//6
f 6//7 7//7 3//7 2//7
f 6//8 9//8 10//8 7//8
f 14//9 12//9 16//9 18//9
f 11//10 13//10 17//10 15//10
f 13//11 14//11 18//11 17//11
f 12//12 11//12 15//12 16//12
f 5//13 11//13 12//13 9//13
f 9//14 12//14 14//14 10//14
f 13//14 8//14 10//14 14//14
f 11//15 5//15 8//15 13//15

View File

@ -3,7 +3,7 @@
* @see _mesh_aabb(Evas_3D_Mesh **mesh_b, const Evas_3D_Node *node);
* Rotate axises (keys 1-4) for model and bounding box view from another angle.
* Compile with "gcc -o evas-3d-aabb evas-3d-aabb.c `pkg-config --libs --cflags evas ecore ecore-evas eo`"
* Compile with "gcc -o evas-3d-aabb evas-3d-aabb.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`"
*/
#define EFL_EO_API_SUPPORT
@ -227,7 +227,7 @@ main(void)
material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
eo_do(mesh,
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_MD2, "sonic.md2", NULL),
efl_file_set("sonic.md2", NULL),
evas_3d_mesh_frame_material_set(0, material),
evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));

View File

@ -9,7 +9,7 @@
* Show it in right side.
*
* @verbatim
* gcc -o evas-3d-eet evas-3d-eet.c `pkg-config --libs --cflags eina evas ecore ecore-evas eo`
* gcc -o evas-3d-eet evas-3d-eet.c `pkg-config --libs --cflags efl eina evas ecore ecore-evas eo`
* @endverbatim
*/
@ -151,7 +151,7 @@ main(void)
material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
eo_do(mesh,
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_MD2, "sonic.md2", NULL),
efl_file_set("sonic.md2", NULL),
evas_3d_mesh_frame_material_set(0, material),
evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));
@ -168,12 +168,10 @@ main(void)
0.50, 0.00, 0.50, 0.30),
evas_3d_material_shininess_set(50.0));
eo_do(mesh,
evas_3d_mesh_save(EVAS_3D_MESH_FILE_TYPE_EET,
"saved_Sonic_EET.eet", NULL));
eo_do(mesh, efl_file_save("saved_Sonic_EET.eet", NULL, NULL));
eo_do(mesh2,
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_EET, "saved_Sonic_EET.eet", NULL),
efl_file_set("saved_Sonic_EET.eet", NULL),
evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));
mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas,

View File

@ -5,7 +5,7 @@
* See in terminal output value of z coordinate of far plane of frustum
* and check OBB's points inside frustum.
* @see evas_3d_node_obb_frustum_check.
* Compile with "gcc -o evas-3d-frustum evas-3d-frustum.c `pkg-config --libs --cflags evas ecore ecore-evas eo`"
* Compile with "gcc -o evas-3d-frustum evas-3d-frustum.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`"
*/
#define EFL_EO_API_SUPPORT
@ -175,7 +175,7 @@ _mesh_setup_model(Scene_Data *data)
evas_3d_material_shininess_set(100.0));
eo_do(data->mesh_model,
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_MD2, "eagle.md2", NULL),
efl_file_set("eagle.md2", NULL),
evas_3d_mesh_frame_material_set(0, data->material_model),
evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_DIFFUSE));
}

View File

@ -120,7 +120,7 @@ main(void)
material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
eo_do(mesh,
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_MD2, "sonic.md2", NULL),
efl_file_set("sonic.md2", NULL),
evas_3d_mesh_frame_material_set(0, material),
evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));

View File

@ -0,0 +1,275 @@
/**
* Simple Evas example illustrating import from mmap.
*
* Open files to Eina_Files.
* Read meshes from Eina_Files.
* Show the results.
*
* @verbatim
* gcc -o evas-3d-mmap-set evas-3d-mmap-set.c `pkg-config --libs --cflags evas ecore ecore-evas eina eo` -lm
* @endverbatim
*/
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <math.h>
#define WIDTH 1000
#define HEIGHT 1000
#define LOAD_AND_ADD_MESH(extention, number) \
extention##_file = eina_file_open("mesh_mmap_set/mesh."#extention, 0); \
mesh_##extention = eo_add(EVAS_3D_MESH_CLASS, evas); \
eo_do(mesh_##extention, \
evas_3d_mesh_mmap_set(extention##_file, NULL), \
evas_3d_mesh_frame_material_set(0, material), \
evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG)); \
node_##extention = eo_add(EVAS_3D_NODE_CLASS, evas, \
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); \
eo_do(root_node, evas_3d_node_member_add(node_##extention)); \
eo_do(node_##extention, evas_3d_node_mesh_add(mesh_##extention), \
evas_3d_node_position_set(initial_node_data[number * 10], \
initial_node_data[number * 10 + 1], \
initial_node_data[number * 10 + 2]), \
evas_3d_node_scale_set(initial_node_data[number * 10 + 3], \
initial_node_data[number * 10 + 4], \
initial_node_data[number * 10 + 5]), \
evas_3d_node_orientation_angle_axis_set(initial_node_data[number * 10 + 6], \
initial_node_data[number * 10 + 7], \
initial_node_data[number * 10 + 8], \
initial_node_data[number * 10 + 9]));\
ecore_timer_add(0.01, _animate_##extention, node_##extention);
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;
Eo *background = NULL;
Eo *image = NULL;
Eo *scene = NULL;
Eo *root_node = NULL;
Eo *camera_node = NULL;
Eo *light_node = NULL;
Eo *camera = NULL;
Eo *material = NULL;
Eo *light = NULL;
Eo *node_obj = NULL, *node_ply = NULL, *node_eet = NULL, *node_md2 = NULL;
Eo *mesh_obj = NULL, *mesh_ply = NULL, *mesh_eet = NULL, *mesh_md2 = NULL;
static float obj_animation_parameter = 1.0;
static float ply_animation_parameter = 180.0;
static float eet_animation_parameter = 0.0;
static float md2_animation_parameter = 0.0;
static float obj_animation_velocity = 1.0;
static float ply_animation_velocity = 1.0;
static float eet_animation_velocity = 1.0;
static float md2_animation_velocity = 32.0;
static const float initial_node_data[] =
/*position scale rotation*/
{
/*obj*/
3.0, 3.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0,
/*ply*/
-3.0, 3.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0,
/*eet*/
3.0, -3.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0,
/*md2*/
-3.0, -3.0, 0.0, 0.001, 0.001, 0.001, 180.0, 0.0, 1.0, 0.0
};
static Eina_Bool
_animate_obj(void *data)
{
obj_animation_parameter += obj_animation_velocity;
float oap = obj_animation_parameter/200;
eo_do((Evas_3D_Node *)data,
evas_3d_node_scale_set(oap, oap, pow(obj_animation_parameter, 2) / 2000),
evas_3d_node_orientation_angle_axis_set(obj_animation_parameter, 0.0, 1.0, 0.0));
if (obj_animation_parameter >= 360.0 || obj_animation_parameter <= 0.0)
obj_animation_velocity *= -1.0;
return EINA_TRUE;
}
static Eina_Bool
_animate_eet(void *data)
{
eet_animation_parameter += eet_animation_velocity;
eo_do((Evas_3D_Node *)data,
evas_3d_node_orientation_angle_axis_set(eet_animation_parameter, 1.0, 0.0, 0.0));
eet_animation_velocity = sin(eet_animation_parameter / 180 * M_PI) + 1.1;
return EINA_TRUE;
}
static Eina_Bool
_animate_ply(void *data)
{
ply_animation_parameter += ply_animation_velocity;
eo_do((Evas_3D_Node *)data,
evas_3d_node_orientation_angle_axis_set(ply_animation_parameter, 1.0, 0.0, 0.0));
if (ply_animation_parameter > 360.0) ply_animation_parameter -= 180.0f;
return EINA_TRUE;
}
static Eina_Bool
_animate_md2(void *data)
{
md2_animation_parameter += md2_animation_velocity;
eo_do((Evas_3D_Node *)data,
evas_3d_node_mesh_frame_set(mesh_md2, md2_animation_parameter));
if (md2_animation_parameter > 256 * 100) md2_animation_parameter = 0;
return EINA_TRUE;
}
static void
_on_delete(Ecore_Evas *ee EINA_UNUSED)
{
ecore_main_loop_quit();
}
static void
_on_canvas_resize(Ecore_Evas *ee)
{
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
eo_do(background, evas_obj_size_set(w, h));
eo_do(image, evas_obj_size_set(w, h));
}
int
main(void)
{
Eina_File *obj_file, *ply_file, *eet_file, *md2_file;
//Unless Evas 3D supports Software renderer, we set gl backened forcely.
setenv("ECORE_EVAS_ENGINE", "opengl_x11", 1);
if (!ecore_evas_init()) return 0;
ecore_evas = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL);
if (!ecore_evas) return 0;
ecore_evas_callback_delete_request_set(ecore_evas, _on_delete);
ecore_evas_callback_resize_set(ecore_evas, _on_canvas_resize);
ecore_evas_show(ecore_evas);
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
scene = eo_add(EVAS_3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
root_node = eo_add(EVAS_3D_NODE_CLASS, evas,
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_3d_camera_projection_perspective_set(10.0, 1.0, 1.0, 500.0));
camera_node =
eo_add(EVAS_3D_NODE_CLASS, evas,
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_3d_node_camera_set(camera));
eo_do(root_node,
evas_3d_node_member_add(camera_node));
eo_do(camera_node,
evas_3d_node_position_set(0.0, 0.0, 100.0),
evas_3d_node_look_at_set(EVAS_3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_3D_SPACE_PARENT, 0.0, 1.0, 0.0));
/* Add the light. */
light = eo_add(EVAS_3D_LIGHT_CLASS, evas);
eo_do(light,
evas_3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_3d_light_directional_set(EINA_TRUE));
light_node =
eo_add(EVAS_3D_NODE_CLASS, evas,
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_3d_node_light_set(light),
evas_3d_node_position_set(1.0, 0.0, 100.0),
evas_3d_node_look_at_set(EVAS_3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_3D_SPACE_PARENT, 0.0, 1.0, 0.0));
eo_do(root_node,
evas_3d_node_member_add(light_node));
material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
eo_do(material,
evas_3d_material_enable_set(EVAS_3D_MATERIAL_AMBIENT, EINA_TRUE),
evas_3d_material_enable_set(EVAS_3D_MATERIAL_DIFFUSE, EINA_TRUE),
evas_3d_material_enable_set(EVAS_3D_MATERIAL_SPECULAR, EINA_TRUE),
evas_3d_material_enable_set(EVAS_3D_MATERIAL_NORMAL, EINA_TRUE),
evas_3d_material_color_set(EVAS_3D_MATERIAL_AMBIENT,
0.01, 0.01, 0.01, 1.0),
evas_3d_material_color_set(EVAS_3D_MATERIAL_DIFFUSE,
1.0, 1.0, 0.0, 1.0),
evas_3d_material_color_set(EVAS_3D_MATERIAL_SPECULAR,
0.5, 0.0, 1.0, 1.0),
evas_3d_material_shininess_set(50.0));
/* Add the meshes */
LOAD_AND_ADD_MESH(obj, 0);
LOAD_AND_ADD_MESH(eet, 1);
LOAD_AND_ADD_MESH(ply, 2);
LOAD_AND_ADD_MESH(md2, 3);
/* Set up scene. */
eo_do(scene,
evas_3d_scene_root_node_set(root_node),
evas_3d_scene_camera_node_set(camera_node),
evas_3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
evas_obj_color_set(20, 20, 200, 255),
evas_obj_size_set(WIDTH, HEIGHT),
evas_obj_visibility_set(EINA_TRUE));
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
eo_do(image,
evas_obj_size_set(WIDTH, HEIGHT),
evas_obj_visibility_set(EINA_TRUE));
/* Set the image object as render target for 3D scene. */
eo_do(image, evas_obj_image_scene_set(scene));
/* Enter main loop. */
ecore_main_loop_begin();
ecore_evas_free(ecore_evas);
ecore_evas_shutdown();
eina_file_close(obj_file);
eina_file_close(ply_file);
eina_file_close(eet_file);
eina_file_close(md2_file);
return 0;
}

View File

@ -7,7 +7,7 @@
* and geometry to "saved_man.obj".
*
* @verbatim
* gcc -o evas-3d-obj evas-3d-obj.c `pkg-config --libs --cflags evas ecore ecore-evas`
* gcc -o evas-3d-obj evas-3d-obj.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`
* @endverbatim
*/
@ -134,7 +134,7 @@ main(void)
material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
eo_do(mesh,
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_OBJ, "man_mesh.obj", NULL),
efl_file_set("man_mesh.obj", NULL),
evas_3d_mesh_frame_material_set(0, material),
evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));
@ -159,7 +159,7 @@ main(void)
1.0, 1.0, 1.0, 1.0),
evas_3d_material_shininess_set(50.0));
eo_do(mesh, evas_3d_mesh_save(EVAS_3D_MESH_FILE_TYPE_OBJ, "saved_man", NULL));
eo_do(mesh, efl_file_save("saved_man.obj", NULL, NULL));
mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas,
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH));

View File

@ -7,7 +7,7 @@
* and geometry to "saved_man_all_with_mods.ply", "saved_man_only_geometry.ply" and "saved_man_without_UVs.ply".
*
* @verbatim
* gcc -o evas-3d-ply evas-3d-ply.c `pkg-config --libs --cflags evas ecore ecore-evas eo`
* gcc -o evas-3d-ply evas-3d-ply.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`
* @endverbatim
*/
@ -189,18 +189,20 @@ main(void)
mesh[i] = eo_add(EVAS_3D_MESH_CLASS, evas);
eo_do(mesh[i],
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_PLY, path_file[i % 8], NULL),
efl_file_set(path_file[i % 8], NULL),
evas_3d_mesh_frame_material_set(0, material),
evas_3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8]));
snprintf(buffer, PATH_MAX, "%s/Saved_%s", folder, file_name[i % 8]);
eo_do(mesh[i], evas_3d_mesh_save(EVAS_3D_MESH_FILE_TYPE_PLY, buffer, NULL));
eo_do(mesh[i], efl_file_save(buffer, NULL, NULL));
if (i > 15)
eo_do(mesh[i],
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_PLY, path_file[i % 8], NULL),
evas_3d_mesh_frame_material_set(0, material),
evas_3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8]));
{
eo_do(mesh[i],
efl_file_set(path_file[i % 8], NULL),
evas_3d_mesh_frame_material_set(0, material),
evas_3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8]));
}
mesh_node[i] = eo_add(EVAS_3D_NODE_CLASS, evas,
evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH));
@ -234,7 +236,7 @@ main(void)
/* Set the image object as render target for 3D scene. */
eo_do(image, evas_obj_image_scene_set(scene));
ecore_animator_frametime_set(0.01);
ecore_animator_frametime_set(0.03);
for (i = 0; i < NUMBER_OF_MESHES; i++)
anim = ecore_animator_add(_animate_scene, mesh_node[i]);

View File

@ -3,7 +3,7 @@
*
* @see evas_3d_scene_shadows_enable_set(Eina_Bool _shadows_enabled)
*
* Compile with "gcc -o evas-3d-shadows evas-3d-shadows.c `pkg-config --libs --cflags evas ecore ecore-evas eo` -lm"
* Compile with "gcc -o evas-3d-shadows evas-3d-shadows.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo` -lm"
*/
@ -219,7 +219,7 @@ main(void)
material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
eo_do(mesh,
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_MD2, "sonic.md2", NULL),
efl_file_set("sonic.md2", NULL),
evas_3d_mesh_frame_material_set(0, material),
evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,11 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl Material.001
Ns 90.196078
Ka 0.000000 0.000000 0.000000
Kd 0.124158 0.125842 0.000000
Ks 0.025297 0.000000 1.000000
Ni 1.000000
d 1.000000
illum 2

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
* The warrior isn't passable for camera, neither is wall. There is a possibility to go upstairs
* and break down.
*
* Compile with "gcc -g evas-3d-shooter.c evas-3d-shooter-header.c -o evas-3d-shooter `pkg-config --libs --cflags evas ecore ecore-evas eo` -lm"
* Compile with "gcc -g evas-3d-shooter.c evas-3d-shooter-header.c -o evas-3d-shooter `pkg-config --libs --cflags efl evas ecore ecore-evas eo` -lm"
*/
#include "evas-3d-shooter-header.h"
@ -840,8 +840,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
/* Setup material and texture for eagle. */
data->mesh_eagle = eo_add(EVAS_3D_MESH_CLASS, evas);
eo_do(data->mesh_eagle,
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_OBJ, "shooter/eagle.obj", NULL));
eo_do(data->mesh_eagle, efl_file_set("shooter/eagle.obj", NULL));
data->material_eagle = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
@ -1294,8 +1293,7 @@ _mesh_setup_warrior(Scene_Data *data, int index)
{
data->mesh_level[index] = eo_add(EVAS_3D_MESH_CLASS, evas);
eo_do(data->mesh_level[index],
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_MD2, "shooter/warrior.md2", NULL));
eo_do(data->mesh_level[index], efl_file_set("shooter/warrior.md2", NULL));
data->material_level = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
eo_do(data->mesh_level[index],
@ -1328,8 +1326,7 @@ void
_mesh_setup_snake(Scene_Data *data)
{
data->mesh_snake = eo_add(EVAS_3D_MESH_CLASS, evas);
eo_do(data->mesh_snake,
evas_3d_mesh_file_set(EVAS_3D_MESH_FILE_TYPE_MD2, "shooter/snake.md2", NULL));
eo_do(data->mesh_snake, efl_file_set("shooter/snake.md2", NULL));
data->material_snake = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
eo_do(data->mesh_snake,

BIN
src/examples/evas/sonic.eet Normal file

Binary file not shown.

View File

@ -720,21 +720,6 @@ typedef enum _Evas_3D_Material_Attrib
EVAS_3D_MATERIAL_NORMAL, /**< Normal map term */
} Evas_3D_Material_Attrib;
/**
* Mesh file type
*
* @since 1.10
* @ingroup Evas_3D_Types
*/
typedef enum _Evas_3D_Mesh_File_Type
{
EVAS_3D_MESH_FILE_TYPE_NONE = 0, /**< Noone from read formats */
EVAS_3D_MESH_FILE_TYPE_MD2, /**< Quake's MD2 mesh file format */
EVAS_3D_MESH_FILE_TYPE_OBJ, /**< Wavefront OBJ file format */
EVAS_3D_MESH_FILE_TYPE_EET, /**< EET - own EFL file format */
EVAS_3D_MESH_FILE_TYPE_PLY, /**< Stanford PLY mesh file format */
} Evas_3D_Mesh_File_Type;
#include "canvas/evas_image.eo.h"
#include "canvas/evas_3d_camera.eo.h"

View File

@ -770,62 +770,49 @@ _evas_3d_mesh_fog_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
}
EOLIAN static void
_evas_3d_mesh_file_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Mesh_File_Type type, const char *file, const char *key EINA_UNUSED)
_evas_3d_mesh_mmap_set(Eo *obj, Evas_3D_Mesh_Data *pd,
Eina_File *file, const char *key EINA_UNUSED)
{
_mesh_fini(pd);
_mesh_init(pd);
if (file == NULL) return;
switch (type)
{
case EVAS_3D_MESH_FILE_TYPE_MD2:
evas_3d_mesh_file_md2_set(obj, file);
break;
case EVAS_3D_MESH_FILE_TYPE_OBJ:
evas_3d_mesh_file_obj_set(obj, file);
break;
case EVAS_3D_MESH_FILE_TYPE_EET:
evas_3d_mesh_file_eet_set(obj, file);
break;
case EVAS_3D_MESH_FILE_TYPE_PLY:
evas_3d_mesh_file_ply_set(obj, file);
break;
default:
ERR("Invalid mesh file type.");
break;
}
evas_common_load_model_from_eina_file(obj, file);
}
EOLIAN static void
_evas_3d_mesh_save(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Mesh_File_Type type,
const char *file, const char *key EINA_UNUSED)
EOLIAN static Eina_Bool
_evas_3d_mesh_efl_file_file_set(Eo *obj, Evas_3D_Mesh_Data *pd,
const char *file,
const char *key EINA_UNUSED)
{
if ((file == NULL) || (obj == NULL) || (pd == NULL)) return;
_mesh_fini(pd);
_mesh_init(pd);
if (file == NULL) return EINA_FALSE;
evas_common_load_model_from_file(obj, file);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_evas_3d_mesh_efl_file_save(Eo *obj, Evas_3D_Mesh_Data *pd,
const char *file,
const char *key EINA_UNUSED,
const char *flags EINA_UNUSED)
{
if ((file == NULL) || (obj == NULL) || (pd == NULL)) return EINA_FALSE;
Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, 0);
if (f == NULL)
{
ERR("Not existing mesh frame.");
return;
return EINA_FALSE;
}
switch (type)
{
case EVAS_3D_MESH_FILE_TYPE_OBJ:
evas_3d_mesh_save_obj(obj, file, f);//file without extension!
break;
case EVAS_3D_MESH_FILE_TYPE_EET:
evas_3d_mesh_save_eet(obj, file, f);
break;
case EVAS_3D_MESH_FILE_TYPE_PLY:
evas_3d_mesh_save_ply(obj, file, f);
break;
default:
ERR("Invalid mesh file type.");
break;
}
evas_common_save_model_to_file(obj, file, f);
return EINA_TRUE;
}
static inline void

View File

@ -1,37 +1,20 @@
class Evas_3D_Mesh (Evas_3D_Object, Evas.Common_Interface)
class Evas_3D_Mesh (Evas_3D_Object, Evas.Common_Interface, Efl.File)
{
legacy_prefix: null;
data: Evas_3D_Mesh_Data;
methods {
file_set {
mmap_set {
/**
* Load mesh data from file.
* Load mesh data from Eina_File.
*
* Loading a mesh from existing file is supported. Currently, only MD2, OBJ, PLY and EET file
* formats are supported.
* Loading a mesh from existing Eina_File is supported. Currently, only MD2, OBJ,
* PLY and EET file formats are supported.
*
* @ingroup Evas_3D_Mesh
*/
params {
@in Evas_3D_Mesh_File_Type type; /*@ The type of the mesh file. */
@in const(char)* file; /*@ Path to the mesh file. */
@in const(char)* key; /*@ Key in the mesh file. */
}
}
save {
/**
* Save mesh data to file.
*
* Saving a mesh to file is supported. Currently, only OBJ, PLY and EET file
* format are supported.
*
* @ingroup Evas_3D_Mesh
*/
params {
@in Evas_3D_Mesh_File_Type type; /*@ The type of the mesh file. */
@in const(char)* file; /*@ Path to the mesh file. */
@in Eina_File* file; /*@ Eina_File with mesh data. */
@in const(char)* key; /*@ Key in the mesh file. */
}
}
@ -437,6 +420,8 @@ class Evas_3D_Mesh (Evas_3D_Object, Evas.Common_Interface)
Eo.Base.destructor;
Evas_3D_Object.update_notify;
Evas_3D_Object.change_notify;
Efl.File.file.set;
Efl.File.save;
}
}

View File

@ -0,0 +1,82 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "evas_options.h"
#include "evas_common_private.h"
#include "evas_private.h"
void
_evas_common_load_model(Evas_3D_Mesh *model,
Eina_File *file,
const char *file_path)
{
char *p;
char *loader_type = NULL;
p = strrchr(file_path, '.');
if (p)
{
p++;
#define CHECK_EXTENTION_BY_FILE_NAME(extention) \
if (!strcasecmp(p, #extention)) \
{ \
evas_model_load_file_##extention(model, file); \
loader_type = #extention; \
}
CHECK_EXTENTION_BY_FILE_NAME(eet)
CHECK_EXTENTION_BY_FILE_NAME(md2)
CHECK_EXTENTION_BY_FILE_NAME(obj)
CHECK_EXTENTION_BY_FILE_NAME(ply)
#undef CHECK_EXTENTION_BY_FILE_NAME
}
if (!loader_type) ERR("Invalid mesh file type.");
}
void
evas_common_load_model_from_file(Evas_3D_Mesh *model, const char *file)
{
Eina_File *tmp_file = eina_file_open(file, 0);
if (tmp_file == NULL)
{
ERR("Failed to open file %s\n", file);
ERR("Failed to initialize loader.");
return;
}
Eina_File *e_file = eina_file_dup(tmp_file);
if (e_file == NULL)
{
eina_file_close(tmp_file);
file = NULL;
ERR("Failed to initialize loader.");
return;
}
eina_file_close(tmp_file);
_evas_common_load_model(model, e_file, file);
eina_file_close(e_file);
e_file = NULL;
}
void
evas_common_load_model_from_eina_file(Evas_3D_Mesh *model, Eina_File *file)
{
Eina_File *e_file = eina_file_dup(file);
if (e_file == NULL)
{
ERR("Failed to initialize loader.");
return;
}
_evas_common_load_model(model, e_file, eina_file_filename_get(e_file));
eina_file_close(e_file);
e_file = NULL;
}

View File

@ -0,0 +1,34 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "evas_options.h"
#include "evas_common_private.h"
#include "evas_private.h"
void
evas_common_save_model_to_file(Evas_3D_Mesh *model,
const char *file,
Evas_3D_Mesh_Frame *f)
{
char *p;
char *saver = NULL;
p = strrchr(file, '.');
if (p)
{
p++;
#define CHECK_EXTENTION_BY_FILE_NAME(extention) \
if (!strcasecmp(p, #extention)) \
{ \
evas_model_save_file_##extention(model, file, f); \
saver = #extention; \
}
CHECK_EXTENTION_BY_FILE_NAME(eet)
CHECK_EXTENTION_BY_FILE_NAME(obj)
CHECK_EXTENTION_BY_FILE_NAME(ply)
#undef CHECK_EXTENTION_BY_FILE_NAME
}
if (!saver) ERR("Invalid mesh file type.");
}

View File

@ -439,8 +439,8 @@ evas_module_find_type(Evas_Module_Type type, const char *name)
switch (type)
{
case EVAS_MODULE_TYPE_ENGINE: type_str = "engines"; break;
case EVAS_MODULE_TYPE_IMAGE_LOADER: type_str = "loaders"; break;
case EVAS_MODULE_TYPE_IMAGE_SAVER: type_str = "savers"; break;
case EVAS_MODULE_TYPE_IMAGE_LOADER: type_str = "image_loaders"; break;
case EVAS_MODULE_TYPE_IMAGE_SAVER: type_str = "image_savers"; break;
case EVAS_MODULE_TYPE_OBJECT: type_str = "object"; break;
}

View File

@ -1636,6 +1636,18 @@ void _evas_3d_eet_file_init(void);
void _evas_3d_eet_descriptor_shutdown(void);
void _evas_3d_eet_file_free(void);
/* Temporary save/load functions */
void evas_common_load_model_from_file(Evas_3D_Mesh *model, const char *file);
void evas_common_load_model_from_eina_file(Evas_3D_Mesh *model, Eina_File *file);
void evas_common_save_model_to_file(Evas_3D_Mesh *model, const char *file, Evas_3D_Mesh_Frame *f);
void evas_model_load_file_eet(Evas_3D_Mesh *mesh, Eina_File *file);
void evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file);
void evas_model_load_file_obj(Evas_3D_Mesh *mesh, Eina_File *file);
void evas_model_load_file_ply(Evas_3D_Mesh *mesh, Eina_File *file);
void evas_model_save_file_eet(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f);
void evas_model_save_file_obj(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f);
void evas_model_save_file_ply(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f);
extern int _evas_alloc_error;
extern int _evas_event_counter;
@ -1799,3 +1811,4 @@ struct _Evas_Mempool
}
#endif
#endif

View File

@ -104,12 +104,12 @@ _set_material_to_mesh_from_eet_file(Evas_3D_Mesh *mesh,
}
void
evas_3d_mesh_file_eet_set(Evas_3D_Mesh *mesh, const char *file)
evas_model_load_file_eet(Evas_3D_Mesh *mesh, Eina_File *file)
{
Eet_File *ef;
_evas_3d_eet_file_init();
ef = eet_open(file, EET_FILE_MODE_READ);
ef = eet_mmap(file);
eet_file = eet_data_read(ef,
_file_descriptor,
EVAS_3D_FILE_CACHE_FILE_ENTRY);
@ -129,3 +129,4 @@ evas_3d_mesh_file_eet_set(Evas_3D_Mesh *mesh, const char *file)
_evas_3d_eet_file_free();
}

View File

@ -67,23 +67,22 @@ struct PACKED _MD2_Texcoord
typedef struct _MD2_Loader
{
Eina_File *file;
char *map;
int size;
char *map;
int size;
int skin_width;
int skin_height;
int skin_width;
int skin_height;
int frame_count;
int frame_size;
char *frames;
int frame_count;
int frame_size;
char *frames;
int vertex_count;
int triangle_count;
int texcoord_count;
int vertex_count;
int triangle_count;
int texcoord_count;
MD2_Triangle *triangles;
MD2_Texcoord *texcoords;
MD2_Triangle *triangles;
MD2_Texcoord *texcoords;
} MD2_Loader;
static const float normal_table[162][3] =
@ -252,50 +251,27 @@ static const float normal_table[162][3] =
{-0.688191f, -0.587785f, -0.425325f},
};
static inline void
_md2_loader_fini(MD2_Loader *loader)
{
if (loader->map)
{
eina_file_map_free(loader->file, loader->map);
loader->map = NULL;
}
if (loader->file)
{
eina_file_close(loader->file);
loader->file = NULL;
}
}
static inline Eina_Bool
_md2_loader_init(MD2_Loader *loader, const char *file)
_md2_loader_init(MD2_Loader *loader, Eina_File *file)
{
MD2_Header header;
memset(loader, 0x00, sizeof(MD2_Loader));
/* Open given file. */
loader->file = eina_file_open(file, 0);
loader->map = eina_file_map_all(file, EINA_FILE_SEQUENTIAL);
if (loader->file == NULL)
if (loader->map == NULL)
{
ERR("Failed to open file %s\n", file);
ERR("Failed to create map from file %s\n", eina_file_filename_get(file));
goto error;
}
/* Check file size. We require a file larger than MD2 header size. */
loader->size = eina_file_size_get(loader->file);
loader->size = eina_file_size_get(file);
if (loader->size < (int)sizeof(MD2_Header))
goto error;
/* Map the file. */
loader->map = eina_file_map_all(loader->file, EINA_FILE_SEQUENTIAL);
if (loader->map == NULL)
goto error;
/* Read header. */
memcpy(&header, loader->map, sizeof(MD2_Header));
@ -338,12 +314,11 @@ _md2_loader_init(MD2_Loader *loader, const char *file)
return EINA_TRUE;
error:
_md2_loader_fini(loader);
return EINA_FALSE;
}
void
evas_3d_mesh_file_md2_set(Evas_3D_Mesh *mesh, const char *file)
evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file)
{
MD2_Loader loader;
int i, j, k;
@ -442,5 +417,10 @@ evas_3d_mesh_file_md2_set(Evas_3D_Mesh *mesh, const char *file)
}
}
_md2_loader_fini(&loader);
if (loader.map)
{
eina_file_map_free(file, loader.map);
loader.map = NULL;
}
}

View File

@ -7,17 +7,26 @@
#include "evas_common_private.h"
#include "evas_private.h"
//TODO Increase of stability (reading .obj file saved with any flags).
/* set value to position [x][y] to array name which have. */
#define ARRAY_2D(name, x, y, count_y) (*(name + x * count_y + y))
/* read 3 float values in string and put it in array */
#define PUT_DATA_TO_ARRAY(array_name, name) \
sscanf (current,"%f %f %f", \
#define PUT_DATA_TO_ARRAY(array_name, name) \
sscanf (current,"%f %f %f", \
&ARRAY_2D(_##array_name##_obj, counts.current_##name##_counter, 0, 3), \
&ARRAY_2D(_##array_name##_obj, counts.current_##name##_counter, 1, 3), \
&ARRAY_2D(_##array_name##_obj, counts.current_##name##_counter, 2, 3)); \
counts.current_##name##_counter++;
#define AFTER_NEXT_SPACE(pointer)\
do \
{ \
pointer++; \
i++; \
} \
while (*pointer != ' ');
/* Structures for reading data from file. */
typedef struct _OBJ_Counts OBJ_Counts;
@ -37,31 +46,6 @@ struct _OBJ_Counts
Eina_Bool existence_of_tex_point;
};
static inline char*
_file_to_buf(const char *file, long *length)//prepare text file for reading
{
FILE *file_for_print;
char *buf;
int unused __attribute__((unused));//this variable fixes warning "ignoring return value of fread"
*length = 0;
file_for_print = fopen(file, "rb");
if (!file_for_print) return NULL;
fseek(file_for_print, 0, SEEK_END);//set file_for_print to the end of file
*length = ftell(file_for_print);//set current position of file_for_print
if (*length < 0)
{
fclose(file_for_print);
return NULL;
}
buf = malloc(*length + 1);
fseek(file_for_print, 0, SEEK_SET);//set file_for_print to the begining of file
unused = fread(buf, *length, 1, file_for_print);
fclose(file_for_print);
buf[*length] = '\0';
return buf;
}
/* create new counter */
static inline OBJ_Counts
_new_count_elements()
@ -107,11 +91,11 @@ _analyze_face_line(char * face_analyzer,
}
static inline OBJ_Counts
_count_elements(char *start, long length)//count elements of mesh in .obj
_count_elements(char *map)//count elements of mesh in .obj
{
OBJ_Counts counts = _new_count_elements();
char * current = start;
char *current = map;
int polygon_checker = -2;//polygons with n vertices can be represented as n-2 triangles
Eina_Bool will_check_next_char = EINA_FALSE;
Eina_Bool first_char_is_v = EINA_FALSE;
@ -120,7 +104,7 @@ _count_elements(char *start, long length)//count elements of mesh in .obj
long i = 0;
/* count elements of mesh in .obj */
for (; length > i; i++)
for (; *current != '\00'; i++)
{
if (will_check_next_char)
{
@ -202,18 +186,70 @@ _count_elements(char *start, long length)//count elements of mesh in .obj
}
void
evas_3d_mesh_file_obj_set(Evas_3D_Mesh *mesh, const char *file)
_read_point(int *triangles,
int num,
OBJ_Counts counts,
int num_cur,
char *pointer)
{
long length, i;
char * start = _file_to_buf(file, &length);
OBJ_Counts counts = _count_elements(start, length);//count elements of mesh in .obj
if (counts.existence_of_normal)
{
if (counts.existence_of_tex_point)
{
sscanf(pointer, "%i/%i/%i",
&ARRAY_2D(triangles, num_cur, (num - 1) * 3, 9),
&ARRAY_2D(triangles, num_cur, (num - 1) * 3 + 1, 9),
&ARRAY_2D(triangles, num_cur, (num - 1) * 3 + 2, 9));
}
else
{
sscanf(pointer, "%i//%i",
&ARRAY_2D(triangles, num_cur, (num - 1) * 3, 9),
&ARRAY_2D(triangles, num_cur, (num - 1) * 3 + 2, 9));
ARRAY_2D(triangles, num_cur, (num - 1) * 3 + 1, 9) = 1;
}
}
else
{
if (counts.existence_of_tex_point)
{
sscanf(pointer, "%i/%i",
&ARRAY_2D(triangles, num_cur, (num - 1) * 3, 9),
&ARRAY_2D(triangles, num_cur, (num - 1) * 3 + 1, 9));
ARRAY_2D(triangles, num_cur, (num - 1) * 3 + 2, 9) = 1;
}
else
{
sscanf(pointer, "%i",
&ARRAY_2D(triangles, num_cur, (num - 1) * 3, 9));
ARRAY_2D(triangles, num_cur, (num - 1) * 3 + 1, 9) = 1;
ARRAY_2D(triangles, num_cur, (num - 1) * 3 + 2, 9) = 1;
}
}
}
void
evas_model_load_file_obj(Evas_3D_Mesh *mesh, Eina_File *file)
{
long i;
OBJ_Counts counts;//count elements of mesh in .obj
Eina_Bool will_check_next_char = EINA_FALSE;
Eina_Bool first_char_is_v = EINA_FALSE;
Eina_Bool first_char_is_f = EINA_FALSE;
float *pos, *nor, *tex;
int stride_pos, stride_nor, stride_tex;
int j, k;
char * current;
char *current, *map;
map = eina_file_map_all(file, EINA_FILE_SEQUENTIAL);
if (map == NULL)
{
ERR("Failed to create map from file %s\n", eina_file_filename_get(file));
return;
}
counts = _count_elements(map);
float *_vertices_obj = malloc(counts._vertex_counter * 3 * sizeof(float));
float *_normales_obj = malloc(counts._normal_counter * 3 * sizeof(float));
@ -221,11 +257,10 @@ evas_3d_mesh_file_obj_set(Evas_3D_Mesh *mesh, const char *file)
/* triangle has 3 points, every point has 3(vertix, texture and normal) coord */
int *_triangles = malloc(counts._triangles_counter * 9 * sizeof(int));
if ((start == NULL) || (_vertices_obj == NULL) ||
if ((map == NULL) || (_vertices_obj == NULL) ||
(_normales_obj == NULL) || (_tex_coords_obj == NULL) || (_triangles == NULL))
{
ERR("Allocate memory is failed.");
free(start);
free(_vertices_obj);
free(_normales_obj);
free(_tex_coords_obj);
@ -233,11 +268,16 @@ evas_3d_mesh_file_obj_set(Evas_3D_Mesh *mesh, const char *file)
return;
}
current = start;
current = map;
i = 0;
ARRAY_2D(_tex_coords_obj, 0, 0, 3) = 0.0;
ARRAY_2D(_tex_coords_obj, 0, 1, 3) = 0.0;
ARRAY_2D(_tex_coords_obj, 0, 2, 3) = 0.0;
ARRAY_2D(_normales_obj, 0, 0, 3) = 1.0;
ARRAY_2D(_normales_obj, 0, 1, 3) = 0.0;
ARRAY_2D(_normales_obj, 0, 2, 3) = 0.0;
/* put data to arrays */
for (; length > i; i++)
for (; *current != '\00'; i++)
{
if (will_check_next_char)
{
@ -265,49 +305,42 @@ evas_3d_mesh_file_obj_set(Evas_3D_Mesh *mesh, const char *file)
}
else if (first_char_is_f)
{
char * auxiliary_pointer = current;
char *auxiliary_pointer = current;
int count_of_triangles_in_line;
int the_first_point = counts.current_triangles_counter;
_analyze_face_line(auxiliary_pointer,
&count_of_triangles_in_line);
current++;
i++;
int first_pos, first_tex, first_norm;
sscanf (current,"%i/%i/%i",
&first_pos,
&first_tex,
&first_norm);
_read_point(_triangles, 1, counts,
the_first_point,
current);
do
{
current++;
i++;
}
while (*current != ' ');
current++;
i++;
AFTER_NEXT_SPACE(current)
for (j = 0; j < count_of_triangles_in_line; j++)
{
auxiliary_pointer = current;
ARRAY_2D(_triangles, counts.current_triangles_counter, 0, 9) = first_pos;
ARRAY_2D(_triangles, counts.current_triangles_counter, 1, 9) = first_tex;
ARRAY_2D(_triangles, counts.current_triangles_counter, 2, 9) = first_norm;
sscanf (auxiliary_pointer,"%i/%i/%i %i/%i/%i",
&ARRAY_2D(_triangles, counts.current_triangles_counter, 3, 9),
&ARRAY_2D(_triangles, counts.current_triangles_counter, 4, 9),
&ARRAY_2D(_triangles, counts.current_triangles_counter, 5, 9),
&ARRAY_2D(_triangles, counts.current_triangles_counter, 6, 9),
&ARRAY_2D(_triangles, counts.current_triangles_counter, 7, 9),
&ARRAY_2D(_triangles, counts.current_triangles_counter, 8, 9));
while (*current != ' ')
if (counts.current_triangles_counter != the_first_point)
{
current++;
i++;
ARRAY_2D(_triangles, counts.current_triangles_counter, 0, 9) = \
ARRAY_2D(_triangles, the_first_point, 0, 9);
ARRAY_2D(_triangles, counts.current_triangles_counter, 1, 9) = \
ARRAY_2D(_triangles, the_first_point, 1, 9);
ARRAY_2D(_triangles, counts.current_triangles_counter, 2, 9) = \
ARRAY_2D(_triangles, the_first_point, 2, 9);
}
_read_point(_triangles, 2, counts,
counts.current_triangles_counter,
auxiliary_pointer);
AFTER_NEXT_SPACE(auxiliary_pointer);
_read_point(_triangles, 3, counts,
counts.current_triangles_counter,
auxiliary_pointer);
AFTER_NEXT_SPACE(current);
counts.current_triangles_counter++;
}
first_char_is_f = EINA_FALSE;
@ -337,7 +370,6 @@ evas_3d_mesh_file_obj_set(Evas_3D_Mesh *mesh, const char *file)
}
current++;
}
free(start);
/* prepare of mesh and take pointers to data which must be read */
eo_do(mesh,
@ -398,4 +430,10 @@ evas_3d_mesh_file_obj_set(Evas_3D_Mesh *mesh, const char *file)
{
ERR("Axis-Aligned Bounding Box wan't added in frame %d ", 0);
}
if (map)
{
eina_file_map_free(file, map);
map = NULL;
}
}

View File

@ -24,26 +24,6 @@ struct _PLY_Header
Eina_Bool existence_of_colors;
};
static inline char*
_file_to_buf(const char *file, long *length)//prepare text file for reading
{
FILE *file_for_print;
char *buf;
int unused __attribute__((unused));//this variable fixes warning "ignoring return value of fread"
*length = 0;
file_for_print = fopen(file, "rb");
if (!file_for_print) return NULL;
fseek(file_for_print, 0, SEEK_END);//set file_for_print to the end of file
*length = ftell(file_for_print);//set current position of file_for_print
buf = malloc(*length + 1);
fseek(file_for_print, 0, SEEK_SET);//set file_for_print to the begining of file
unused = fread(buf, *length, 1, file_for_print);
fclose(file_for_print);
buf[*length] = '\0';
return buf;
}
/* create new header */
static inline PLY_Header
_new_ply_header()
@ -102,7 +82,7 @@ _read_data(float *array, int place, int count, char *current, float divider)
}
static inline PLY_Header
_read_header(char *start)//Check properties of mesh in .ply file.
_read_header(char *map)//Check properties of mesh in .ply file.
{
eina_init();
@ -113,7 +93,7 @@ _read_header(char *start)//Check properties of mesh in .ply file.
PLY_Header header;
header = _new_ply_header();
helping_pointer = eina_str_split(start, "vertex ", 0);
helping_pointer = eina_str_split(map, "vertex ", 0);
if (helping_pointer == NULL)
{
@ -124,7 +104,7 @@ _read_header(char *start)//Check properties of mesh in .ply file.
sscanf(helping_pointer[1], "%d", &header.vertices_count);
free(helping_pointer);
helping_pointer = eina_str_split(start, "end_header\n", 0);
helping_pointer = eina_str_split(map, "end_header\n", 0);
if (helping_pointer == NULL)
{
@ -164,7 +144,7 @@ _read_header(char *start)//Check properties of mesh in .ply file.
free(helping_pointer);
/* analyse flags used when file was saved in blender */
helping_pointer = eina_str_split(start, "property float ", 0);
helping_pointer = eina_str_split(map, "property float ", 0);
if ((helping_pointer[1] != NULL) && (*helping_pointer[1] == 'x') &&
(helping_pointer[2] != NULL) && (*helping_pointer[2] == 'y') &&
@ -185,7 +165,7 @@ _read_header(char *start)//Check properties of mesh in .ply file.
(helping_pointer[5] != NULL) && (*helping_pointer[5] == 't'))))
header.existence_of_texcoords = EINA_TRUE;
helping_pointer = eina_str_split(start, "property uchar ", 0);
helping_pointer = eina_str_split(map, "property uchar ", 0);
if ((helping_pointer[1] != NULL) && (*helping_pointer[1] == 'r') &&
(helping_pointer[2] != NULL) && (*helping_pointer[2] == 'g') &&
@ -198,27 +178,27 @@ _read_header(char *start)//Check properties of mesh in .ply file.
}
void
evas_3d_mesh_file_ply_set(Evas_3D_Mesh *mesh, const char *file)
evas_model_load_file_ply(Evas_3D_Mesh *mesh, Eina_File *file)
{
long length;
Evas_3D_Mesh_Data *pd;
int i = 0, j = 0, k = 0, count_of_triangles_in_line = 0;
float *pos, *nor, *tex, *col;
int stride_pos, stride_nor, stride_tex, stride_col;
char *start, *current;
char *current, *map;
PLY_Header header;
float *_vertices_ply = NULL, *_normals_ply = NULL, *_tex_coords_ply = NULL, *_colors_ply = NULL;
float *_vertices_ply = NULL, *_normals_ply = NULL;
float *_tex_coords_ply = NULL, *_colors_ply = NULL;
char **helping_pointer;
start = _file_to_buf(file, &length);
map = eina_file_map_all(file, EINA_FILE_SEQUENTIAL);
if (start == NULL)
if (map == NULL)
{
ERR("Buffer is empty after preparation file for reading.");
ERR("Failed to create map from file %s\n", eina_file_filename_get(file));
return;
}
header = _read_header(start);
header = _read_header(map);
if (!header.existence_of_geometries)
{
@ -226,7 +206,7 @@ evas_3d_mesh_file_ply_set(Evas_3D_Mesh *mesh, const char *file)
return;
}
helping_pointer = eina_str_split(start, "end_header\n", 0);
helping_pointer = eina_str_split(map, "end_header\n", 0);
if (helping_pointer == NULL)
{
@ -252,7 +232,6 @@ evas_3d_mesh_file_ply_set(Evas_3D_Mesh *mesh, const char *file)
(_triangles == NULL))
{
ERR("Allocate memory is failed.");
free(start);
free(_vertices_ply);
free(_normals_ply);
free(_tex_coords_ply);
@ -398,4 +377,11 @@ evas_3d_mesh_file_ply_set(Evas_3D_Mesh *mesh, const char *file)
{
ERR("Axis-Aligned Bounding Box wan't added in frame %d ", 0);
}
if (map)
{
eina_file_map_free(file, map);
map = NULL;
}
}

View File

@ -148,9 +148,9 @@ _set_frame_to_eet_file_from_mesh(Evas_3D_Mesh_Eet *eet_mesh)
}
void
evas_3d_mesh_save_eet(Evas_3D_Mesh *mesh,
const char *file,
Evas_3D_Mesh_Frame *f)
evas_model_save_file_eet(Evas_3D_Mesh *mesh,
const char *file,
Evas_3D_Mesh_Frame *f)
{
Evas_3D_Mesh_Data *pd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS);
Eet_File *ef = eet_open(file, EET_FILE_MODE_WRITE);

View File

@ -9,17 +9,11 @@
#include "evas_private.h"
#define OPEN_FILE(extension)\
int length=strlen(file);\
char * extension = "."#extension;\
char * _##extension##_file_name = (char *)malloc(length+4);\
strcpy(_##extension##_file_name,file);\
strcpy(_##extension##_file_name+length,extension);\
FILE * _##extension##_file = fopen(_##extension##_file_name, "w+");\
free(_##extension##_file_name);
#define SAVE_GEOMETRICS(a, format)\
vb = &f->vertices[a];\
fprintf(_obj_file, "o %s\n",file);\
fprintf(_obj_file, "o %s\n",_obj_file_name);\
if (vb->data == NULL)\
{\
ERR("Reading of geometrics is failed.");\
@ -34,7 +28,7 @@
}
static void
_save_mesh(Evas_3D_Mesh_Data *pd, const char *file, Evas_3D_Mesh_Frame *f)
_save_mesh(Evas_3D_Mesh_Data *pd, const char *_obj_file_name, Evas_3D_Mesh_Frame *f)
{
Evas_3D_Vertex_Buffer *vb;
time_t current_time;
@ -45,7 +39,7 @@ _save_mesh(Evas_3D_Mesh_Data *pd, const char *file, Evas_3D_Mesh_Frame *f)
OPEN_FILE(obj)
if (!_obj_file)
{
ERR("File open '%s' for save failed", file);
ERR("File open '%s' for save failed", _obj_file_name);
return;
}
fprintf(_obj_file, "# Evas_3D saver OBJ v0.03 \n");//_obj_file created in macro
@ -69,7 +63,7 @@ _save_mesh(Evas_3D_Mesh_Data *pd, const char *file, Evas_3D_Mesh_Frame *f)
}
fprintf(_obj_file,"# Current time is %s \n", c_time_string);
fprintf(_obj_file,"mtllib %s.mtl \n\n", file);
fprintf(_obj_file,"mtllib %s.mtl \n\n", _obj_file_name);
/* Adding geometrics to file. */
if (f == NULL)
@ -95,14 +89,14 @@ _save_mesh(Evas_3D_Mesh_Data *pd, const char *file, Evas_3D_Mesh_Frame *f)
}
static void
_save_material(Evas_3D_Mesh_Data *pd EINA_UNUSED, const char *file, Evas_3D_Mesh_Frame *f)
_save_material(Evas_3D_Mesh_Data *pd EINA_UNUSED, const char *_mtl_file_name, Evas_3D_Mesh_Frame *f)
{
Evas_3D_Material_Data *mat = eo_data_scope_get(f->material, EVAS_3D_MATERIAL_CLASS);
OPEN_FILE(mtl)
if (!_mtl_file)
{
ERR("File open '%s' for save failed", file);
ERR("File open '%s' for save failed", _mtl_file_name);
return;
}
fprintf(_mtl_file, "# Evas_3D saver OBJ v0.03 \n");//_mtl_file created in macro
@ -129,9 +123,24 @@ _save_material(Evas_3D_Mesh_Data *pd EINA_UNUSED, const char *file, Evas_3D_Mesh
}
void
evas_3d_mesh_save_obj(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f)
evas_model_save_file_obj(Evas_3D_Mesh *mesh, const char *_obj_file_name, Evas_3D_Mesh_Frame *f)
{
int len;
char *without_extention, *_mtl_extension, *_mtl_file_name;
len = strlen(_obj_file_name);
without_extention = (char*)malloc((len - 4) * sizeof(char));
_mtl_extension = ".mtl";
_mtl_file_name = (char *)malloc(len * sizeof(char));
memcpy(without_extention, _obj_file_name, len-4);
strcpy(_mtl_file_name, without_extention);
strcpy(_mtl_file_name + len - 4, _mtl_extension);
Evas_3D_Mesh_Data *pd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS);
_save_mesh(pd, file, f);
_save_material(pd, file, f);
_save_mesh(pd, _obj_file_name, f);
_save_material(pd, _mtl_file_name, f);
free(without_extention);
free(_mtl_file_name);
}

View File

@ -10,7 +10,7 @@
#include "evas_private.h"
void
evas_3d_mesh_save_ply(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f)
evas_model_save_file_ply(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f)
{
float *src_pos, *src_nor, *src_tex, *src_col;
int i;

View File

@ -34,7 +34,7 @@
src2 += f2->vertices[a].element_count; \
}
#define CHECK_MESHES_IN_FOLDER(folder, type, type_to_check) \
#define CHECK_MESHES_IN_FOLDER(folder, ext) \
it = eina_file_direct_ls(folder); \
EINA_ITERATOR_FOREACH(it, file) \
{ \
@ -42,9 +42,15 @@
mesh2 = eo_add(EVAS_3D_MESH_CLASS, e); \
fail_if(mesh == NULL); \
fail_if(mesh2 == NULL); \
eo_do(mesh, evas_3d_mesh_file_set(type, file->path, NULL)); \
eo_do(mesh, evas_3d_mesh_save(type_to_check, buffer, NULL)); \
eo_do(mesh2, evas_3d_mesh_file_set(type_to_check, buffer, NULL)); \
snprintf(buffer, PATH_MAX, "%s", ext); \
eo_do(mesh, efl_file_set(file->path, NULL), \
efl_file_save(buffer, NULL, NULL)); \
eo_do(mesh2, efl_file_set(buffer, NULL)); \
res = _compare_meshes(mesh, mesh2); \
fail_if(res == 1); \
eo_do(mesh, evas_3d_mesh_mmap_set(eina_file_open(file->path, 0), NULL), \
efl_file_save(buffer, NULL, NULL)); \
eo_do(mesh2, evas_3d_mesh_mmap_set(eina_file_open(buffer, 0), NULL)); \
res = _compare_meshes(mesh, mesh2); \
fail_if(res == 1); \
eo_del(mesh2); \
@ -111,10 +117,10 @@ START_TEST(evas_object_mesh_loader_saver)
snprintf(buffer, PATH_MAX, "%s", tmp);
CHECK_MESHES_IN_FOLDER(TESTS_OBJ_MESH_DIR, EVAS_3D_MESH_FILE_TYPE_OBJ, EVAS_3D_MESH_FILE_TYPE_EET)
CHECK_MESHES_IN_FOLDER(TESTS_MD2_MESH_DIR, EVAS_3D_MESH_FILE_TYPE_MD2, EVAS_3D_MESH_FILE_TYPE_EET)
CHECK_MESHES_IN_FOLDER(TESTS_PLY_MESH_DIR, EVAS_3D_MESH_FILE_TYPE_PLY, EVAS_3D_MESH_FILE_TYPE_EET)
CHECK_MESHES_IN_FOLDER(TESTS_PLY_MESH_DIR, EVAS_3D_MESH_FILE_TYPE_PLY, EVAS_3D_MESH_FILE_TYPE_PLY)
CHECK_MESHES_IN_FOLDER(TESTS_OBJ_MESH_DIR, ".eet")
CHECK_MESHES_IN_FOLDER(TESTS_MD2_MESH_DIR, ".eet")
CHECK_MESHES_IN_FOLDER(TESTS_PLY_MESH_DIR, ".eet")
CHECK_MESHES_IN_FOLDER(TESTS_PLY_MESH_DIR, ".ply")
eina_iterator_free(it);