2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "scene-graph-sampler.h"
30 Sampler::Sampler( const std::string& samplerName )
31 : mUniformName( samplerName ),
33 mMinFilter( Dali::Sampler::DEFAULT ),
34 mMagFilter( Dali::Sampler::DEFAULT ),
35 mUWrapMode( Dali::Sampler::CLAMP_TO_EDGE ),
36 mVWrapMode( Dali::Sampler::CLAMP_TO_EDGE )
44 void Sampler::SetUniformName( const std::string& samplerName )
48 void Sampler::SetTextureId( ResourceId textureId )
50 mTextureId = textureId;
53 void Sampler::SetFilterMode( BufferIndex bufferIndex, FilterMode minFilter, FilterMode magFilter )
55 mMinFilter[bufferIndex] = minFilter;
56 mMagFilter[bufferIndex] = magFilter;
59 void Sampler::SetWrapMode( BufferIndex bufferIndex, WrapMode uWrap, WrapMode vWrap )
63 const std::string& Sampler::GetUniformName()
69 Integration::ResourceId Sampler::GetTextureId()
75 Sampler::FilterMode Sampler::GetMinifyFilterMode( BufferIndex bufferIndex )
78 return mMinFilter[bufferIndex];
81 Sampler::FilterMode Sampler::GetMagnifyFilterMode( BufferIndex bufferIndex )
84 return mMagFilter[bufferIndex];
87 Sampler::WrapMode Sampler::GetUWrapMode( BufferIndex bufferIndex )
90 return mUWrapMode[bufferIndex];
93 Sampler::WrapMode Sampler::GetVWrapMode( BufferIndex bufferIndex )
96 return mVWrapMode[bufferIndex];
99 bool Sampler::IsFullyOpaque()
101 return true; // @todo MESH_REWORK - check the actual image. For the moment, pretend it's opaque
104 } // namespace SceneGraph
105 } // namespace Internal