Add constructors to VkClearColorValue
authorPyry Haulos <phaulos@google.com>
Tue, 30 Jun 2015 23:20:31 +0000 (16:20 -0700)
committerPyry Haulos <phaulos@google.com>
Wed, 1 Jul 2015 15:37:10 +0000 (08:37 -0700)
Change-Id: Ie2418210e93de6cc5569d34b9884e998a1c6429b

framework/vulkan/vkDefs.hpp

index d0236e3..0c2f9e8 100644 (file)
@@ -100,6 +100,22 @@ union VkClearColorValue
 {
        float           floatColor[4];
        deUint32        rawColor[4];
+
+       VkClearColorValue (float r, float g, float b, float a)
+       {
+               floatColor[0] = r;
+               floatColor[1] = g;
+               floatColor[2] = b;
+               floatColor[3] = a;
+       }
+
+       VkClearColorValue (deUint32 r, deUint32 g, deUint32 b, deUint32 a)
+       {
+               rawColor[0] = r;
+               rawColor[1] = g;
+               rawColor[2] = b;
+               rawColor[3] = a;
+       }
 };
 
 #include "vkStructTypes.inl"