mirror of https://github.com/axmolengine/axmol.git
fxi model bug
This commit is contained in:
parent
8d546828f4
commit
6e1f38fdc4
|
@ -364,6 +364,13 @@ Sprite3D* Sprite3D::createSprite3DNode(NodeData* nodedata,ModelData* modeldata,c
|
||||||
{
|
{
|
||||||
sprite->setName(nodedata->id);
|
sprite->setName(nodedata->id);
|
||||||
auto mesh = Mesh::create(nodedata->id, getMeshIndexData(modeldata->subMeshId));
|
auto mesh = Mesh::create(nodedata->id, getMeshIndexData(modeldata->subMeshId));
|
||||||
|
|
||||||
|
if (_skeleton && modeldata->bones.size())
|
||||||
|
{
|
||||||
|
auto skin = MeshSkin::create(_skeleton, modeldata->bones, modeldata->invBindPose);
|
||||||
|
mesh->setSkin(skin);
|
||||||
|
}
|
||||||
|
|
||||||
if (modeldata->matrialId == "" && materialdatas.materials.size())
|
if (modeldata->matrialId == "" && materialdatas.materials.size())
|
||||||
{
|
{
|
||||||
const NTextureData* textureData = materialdatas.materials[0].getTextureData(NTextureData::Usage::Diffuse);
|
const NTextureData* textureData = materialdatas.materials[0].getTextureData(NTextureData::Usage::Diffuse);
|
||||||
|
@ -748,7 +755,7 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
||||||
{
|
{
|
||||||
#if CC_USE_CULLING
|
#if CC_USE_CULLING
|
||||||
// camera clipping
|
// camera clipping
|
||||||
if(Camera::getVisitingCamera() && !Camera::getVisitingCamera()->isVisibleInFrustum(&this->getAABB()))
|
if(_children.size() == 0 && Camera::getVisitingCamera() && !Camera::getVisitingCamera()->isVisibleInFrustum(&getAABB()))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue