/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
namespace Internal
{
-FrameBufferPtr FrameBuffer::New( unsigned int width, unsigned int height, unsigned int attachments )
+FrameBufferPtr FrameBuffer::New( uint32_t width, uint32_t height, Mask attachments )
{
FrameBufferPtr frameBuffer( new FrameBuffer( width, height, attachments ) );
frameBuffer->Initialize();
return mRenderObject;
}
-FrameBuffer::FrameBuffer( unsigned int width, unsigned int height, unsigned int attachments )
+FrameBuffer::FrameBuffer( uint32_t width, uint32_t height, Mask attachments )
: mEventThreadServices( *Stage::GetCurrent() ),
mRenderObject( NULL ),
mColor( NULL ),
AddFrameBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject );
}
-void FrameBuffer::AttachColorTexture( NewTexturePtr texture, unsigned int mipmapLevel, unsigned int layer )
+void FrameBuffer::AttachColorTexture( TexturePtr texture, uint32_t mipmapLevel, uint32_t layer )
{
- if( (unsigned int)( texture->GetWidth() / ( 1 << mipmapLevel ) ) == mWidth &&
- (unsigned int)( texture->GetHeight() / ( 1 << mipmapLevel ) ) == mHeight )
+ if( ( texture->GetWidth() / ( 1u << mipmapLevel ) == mWidth ) &&
+ ( texture->GetHeight() / ( 1u << mipmapLevel ) == mHeight ) )
{
mColor = texture;
AttachColorTextureToFrameBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject, texture->GetRenderObject(), mipmapLevel, layer );
}
}
-NewTexture* FrameBuffer::GetColorTexture()
+Texture* FrameBuffer::GetColorTexture()
{
return mColor.Get();
}