1 #ifndef DALI_INTERNAL_RENDER_TEXTURE_H
2 #define DALI_INTERNAL_RENDER_TEXTURE_H
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #include <dali/devel-api/rendering/sampler.h>
21 #include <dali/integration-api/resource-declarations.h>
42 mTextureId(Integration::InvalidResourceId)
48 Texture( const std::string& samplerName, Integration::ResourceId textureId, Render::Sampler* sampler )
49 :mUniformName( samplerName ),
51 mTextureId( textureId)
61 * Get the Render::Sampler used by the texture
62 * @Return The Render::Sampler being used or 0 if using the default
64 inline const Render::Sampler* GetSampler() const
69 public: // called from RenderThread
72 * Get the texture unit uniform name
73 * @return the name of the texture unit uniform
75 inline const std::string& GetUniformName() const
82 * @param[in] bufferIndex The buffer index to use
83 * @return the identity of the associated texture
85 inline Integration::ResourceId GetTextureId() const
91 std::string mUniformName;
92 Render::Sampler* mSampler;
93 Integration::ResourceId mTextureId;
96 } // namespace SceneGraph
98 } // namespace Internal
102 #endif // DALI_INTERNAL_RENDER_TEXTURE_H