Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __MYGUI_RENDER_FORMAT_H__
00024 #define __MYGUI_RENDER_FORMAT_H__
00025
00026 #include "MyGUI_Macros.h"
00027
00028 namespace MyGUI
00029 {
00030
00031 struct MYGUI_EXPORT VertexColourType
00032 {
00033 enum Enum
00034 {
00035 ColourARGB,
00036 ColourABGR,
00037 MAX
00038 };
00039
00040 VertexColourType(Enum _value = MAX) : value(_value) { }
00041
00042 friend bool operator == (VertexColourType const& a, VertexColourType const& b) { return a.value == b.value; }
00043 friend bool operator != (VertexColourType const& a, VertexColourType const& b) { return a.value != b.value; }
00044
00045 private:
00046 Enum value;
00047 };
00048
00049 struct MYGUI_EXPORT PixelFormat
00050 {
00051 enum Enum
00052 {
00053 Unknow,
00054 L8,
00055 L8A8,
00056 R8G8B8,
00057 R8G8B8A8
00058 };
00059
00060 PixelFormat(Enum _value = Unknow) : value(_value) { }
00061
00062 friend bool operator == (PixelFormat const& a, PixelFormat const& b) { return a.value == b.value; }
00063 friend bool operator != (PixelFormat const& a, PixelFormat const& b) { return a.value != b.value; }
00064
00065 private:
00066 Enum value;
00067 };
00068
00069 struct MYGUI_EXPORT TextureUsage
00070 {
00071 enum Enum
00072 {
00073 Default = MYGUI_FLAG_NONE,
00074 Static = MYGUI_FLAG(0),
00075 Dynamic = MYGUI_FLAG(1),
00076 Stream = MYGUI_FLAG(2),
00077 Read = MYGUI_FLAG(3),
00078 Write = MYGUI_FLAG(4),
00079 RenderTarget = MYGUI_FLAG(5),
00080 };
00081
00082 TextureUsage(Enum _value = Default) : value(_value) { }
00083
00084 friend bool operator == (TextureUsage const& a, TextureUsage const& b) { return a.value == b.value; }
00085 friend bool operator != (TextureUsage const& a, TextureUsage const& b) { return a.value != b.value; }
00086
00087 TextureUsage& operator |= (TextureUsage const& _other) { value = Enum(int(value) | int(_other.value)); return *this; }
00088 friend TextureUsage operator | (Enum const& a, Enum const& b) { return TextureUsage(Enum(int(a) | int(b))); }
00089 friend TextureUsage operator | (TextureUsage const& a, TextureUsage const& b) { return TextureUsage(Enum(int(a.value) | int(b.value))); }
00090
00091 bool isValue(Enum _value) { return 0 != (value & _value); }
00092
00093 private:
00094 Enum value;
00095 };
00096
00097 }
00098
00099
00100 #endif // __MYGUI_RENDER_FORMAT_H__