+int UtcDaliFrameBufferGetColorTexture03(void)
+{ // FrameBuffer::GetColorTexture() and GetColorTexture(0) are equivalent
+ TestApplication application;
+
+ unsigned int width(64);
+ unsigned int height(64);
+ FrameBuffer frameBuffer = FrameBuffer::New( width, height, FrameBuffer::Attachment::NONE );
+ Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height );
+ frameBuffer.AttachColorTexture( texture, 0u, 1u );
+
+ DALI_TEST_EQUALS(frameBuffer.GetColorTexture(), texture, TEST_LOCATION);
+ DALI_TEST_EQUALS(DevelFrameBuffer::GetColorTexture(frameBuffer, 0), texture, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliFrameBufferGetColorTexture04(void)
+{
+ TestApplication application;
+
+ unsigned int width(64);
+ unsigned int height(64);
+ FrameBuffer frameBuffer = FrameBuffer::New( width, height, FrameBuffer::Attachment::NONE );
+ Texture textures[] = {
+ Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height ),
+ Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height ),
+ Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height ),
+ Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height ),
+ Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height ),
+ Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height ),
+ Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height ),
+ Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height ),
+ };
+
+ for (auto& t: textures)
+ {
+ frameBuffer.AttachColorTexture( t, 0u, 1u );
+ }
+
+ for (unsigned int i = 0; i < std::extent<decltype(textures)>::value; ++i)
+ {
+ DALI_TEST_EQUALS(DevelFrameBuffer::GetColorTexture(frameBuffer, i), textures[i], TEST_LOCATION);
+ }
+
+ END_TEST;
+}
+