7#ifndef MYGUI_RENDER_FORMAT_H_
8#define MYGUI_RENDER_FORMAT_H_
25 VertexColourType(Enum _value = MAX) :
30 friend bool operator==(VertexColourType
const& a, VertexColourType
const& b)
32 return a.mValue == b.mValue;
35 friend bool operator!=(VertexColourType
const& a, VertexColourType
const& b)
37 return a.mValue != b.mValue;
60 PixelFormat(Enum _value = Unknow) :
65 friend bool operator==(PixelFormat
const& a, PixelFormat
const& b)
67 return a.mValue == b.mValue;
70 friend bool operator!=(PixelFormat
const& a, PixelFormat
const& b)
72 return a.mValue != b.mValue;
80 int getBytesPerPixel()
const
86 case R8G8B8:
return 3;
87 case R8G8B8A8:
return 4;
88 case Unknow:
return 0;
110 TextureUsage(Enum _value = Default) :
115 friend bool operator==(TextureUsage
const& a, TextureUsage
const& b)
117 return a.mValue == b.mValue;
120 friend bool operator!=(TextureUsage
const& a, TextureUsage
const& b)
122 return a.mValue != b.mValue;
125 TextureUsage& operator|=(TextureUsage
const& _other)
127 mValue = (mValue | _other.mValue).mValue;
131 friend TextureUsage operator|(Enum
const& a, Enum
const& b)
133 return {
Enum((
unsigned int)a | (
unsigned int)b)};
136 friend TextureUsage operator|(TextureUsage
const& a, TextureUsage
const& b)
138 return a.mValue | b.mValue;
141 bool isValue(Enum _value)
const
143 return 0 != (mValue & _value);
constexpr unsigned int MYGUI_FLAG(uint8_t num)
constexpr unsigned int MYGUI_FLAG_NONE