MCPcopy Create free account
hub / github.com/axmolengine/axmol / loadMaterials

Method loadMaterials

core/3d/Bundle3D.cpp:889–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

887 return true;
888}
889bool Bundle3D::loadMaterials(MaterialDatas& materialdatas)
890{
891 materialdatas.resetData();
892 if (_isBinary)
893 {
894 if (_version == "0.1")
895 {
896 return loadMaterialsBinary_0_1(materialdatas);
897 }
898 else if (_version == "0.2")
899 {
900 return loadMaterialsBinary_0_2(materialdatas);
901 }
902 else
903 {
904 return loadMaterialsBinary(materialdatas);
905 }
906 }
907 else
908 {
909 if (_version == "1.2")
910 {
911 return loadMaterialDataJson_0_1(materialdatas);
912 }
913 else if (_version == "0.2")
914 {
915 return loadMaterialDataJson_0_2(materialdatas);
916 }
917 else
918 {
919 return loadMaterialsJson(materialdatas);
920 }
921 }
922 return true;
923}
924bool Bundle3D::loadMaterialsBinary(MaterialDatas& materialdatas)
925{
926 if (!seekToFirstType(BUNDLE_TYPE_MATERIAL))

Callers 1

loadFromFileMethod · 0.45

Calls 3

loadMaterialDataJson_0_1Function · 0.85
loadMaterialDataJson_0_2Function · 0.85
resetDataMethod · 0.45

Tested by

no test coverage detected