+
+ int bufferSize = width * height * GetBytesPerPixel(Pixel::RGBA8888);
+ uint8_t* buffer = reinterpret_cast<uint8_t*>(malloc(bufferSize));
+
+ for(uint32_t i = 0; i < width * height; ++i)
+ {
+ buffer[i * 4 + 0] = static_cast<uint8_t>(color.r * 255.0f);
+ buffer[i * 4 + 1] = static_cast<uint8_t>(color.g * 255.0f);
+ buffer[i * 4 + 2] = static_cast<uint8_t>(color.b * 255.0f);
+ buffer[i * 4 + 3] = static_cast<uint8_t>(color.a * 255.0f);
+ }
+
+ PixelData pixelData = PixelData::New(buffer, bufferSize, width, height, Pixel::RGBA8888, PixelData::FREE);
+ texture.Upload(pixelData, 0u, 0u, 0u, 0u, width, height);
+