X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fmodel3d-view%2Fmodel3d-view-impl.cpp;h=9c2298295888c0e611c856ef14cd8dbd318a88cc;hb=db152116b8c7de79b206d7d361c9d3875d05d0ac;hp=e1e4b6f26f4c2e7cef4b1313096b4ec64e4d9a12;hpb=34f1c102c367acc11a4bf793600acc2815ee201d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp b/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp index e1e4b6f..9c22982 100644 --- a/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp +++ b/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -278,7 +278,7 @@ const char* NRMMAP_FRAGMENT_SHADER = MAKE_SHADER( using namespace Dali; Model3dView::Model3dView() - : Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ) +: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ) { mIlluminationType = Toolkit::Model3dView::DIFFUSE_WITH_NORMAL_MAP; @@ -328,6 +328,7 @@ void Model3dView::SetProperty( BaseObject* object, Property::Index index, const { impl.LoadMaterial(); impl.CreateMaterial(); + impl.LoadTextures(); } break; } @@ -427,8 +428,6 @@ Property::Value Model3dView::GetProperty( BaseObject* object, Property::Index in void Model3dView::OnStageConnection( int depth ) { - Control::OnStageConnection( depth ); - CustomActor self = Self(); self.AddRenderer( mRenderer ); @@ -448,6 +447,8 @@ void Model3dView::OnStageConnection( int depth ) constraint.AddSource( Source( self, Toolkit::Model3dView::Property::LIGHT_POSITION ) ); constraint.Apply(); } + + Control::OnStageConnection( depth ); } /////////////////////////////////////////////////////////// @@ -535,6 +536,7 @@ void Model3dView::CreateGeometry() { mRenderer.SetGeometry( mMesh ); mRenderer.SetProperty( Renderer::Property::DEPTH_WRITE_MODE, DepthWriteMode::ON ); + mRenderer.SetProperty( Renderer::Property::DEPTH_TEST_MODE, DepthTestMode::ON ); } } }