/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
for( uint32_t i(textureCount); i<=index; ++i )
{
- mTextures[i] = NULL;
+ mTextures[i] = nullptr;
if( !samplerExist )
{
- mSamplers[i] = NULL;
+ mSamplers[i] = nullptr;
}
}
}
mTextures[index]= texture;
- Render::Texture* renderTexture(0);
+ Render::Texture* renderTexture(nullptr);
if( texture )
{
renderTexture = texture->GetRenderObject();
Texture* TextureSet::GetTexture( uint32_t index ) const
{
- Texture* result(0);
+ Texture* result(nullptr);
if( index < mTextures.size() )
{
result = mTextures[index].Get();
return result;
}
-void TextureSet::SetImage( uint32_t index, ImagePtr image )
-{
- Texture* texture( NULL );
- if( image )
- {
- uint32_t textureCount = static_cast<uint32_t>( mImages.size() );
- if( index >= textureCount )
- {
- mImages.resize(index + 1);
- }
- mImages[index] = image;
-
- texture = image->GetTexture();
- }
-
- SetTexture( index, texture );
-}
-
-Image* TextureSet::GetImage( uint32_t index ) const
-{
- Image* result( NULL );
- if( index < mImages.size() )
- {
- result = mImages[index].Get();
- }
- else
- {
- DALI_LOG_ERROR( "Error: Invalid index to TextureSet::GetImage\n");
- }
-
- return result;
-}
-
void TextureSet::SetSampler( uint32_t index, SamplerPtr sampler )
{
uint32_t samplerCount = static_cast<uint32_t>( mSamplers.size() );
mSamplers.resize( index + 1 );
for( uint32_t i = samplerCount; i<=index; ++i )
{
- mSamplers[i] = NULL;
+ mSamplers[i] = nullptr;
}
}
mSamplers[index] = sampler;
- Render::Sampler* renderSampler(0);
+ Render::Sampler* renderSampler(nullptr);
if( sampler )
{
renderSampler = sampler->GetSamplerRenderObject();
Sampler* TextureSet::GetSampler( uint32_t index ) const
{
- Sampler* result(0);
+ Sampler* result(nullptr);
if( index < mSamplers.size() )
{
result = mSamplers[index].Get();
TextureSet::TextureSet()
:mEventThreadServices( EventThreadServices::Get() ),
- mSceneObject( NULL )
+ mSceneObject( nullptr )
{
}