Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 170 vs 171 for /trunk/Source Code/Hardware/Video/OpenGL/glEnumTable.cpp

Diff revisions: vs.
  @@ -15,128 +15,128 @@
15 15 GLuint glTextureFilterTable[TextureFilter_PLACEHOLDER];
16 16
17 17 namespace GL_ENUM_TABLE {
18 - void fill(){
19 - glBlendTable[BLEND_PROPERTY_ZERO] = GL_ZERO;
20 - glBlendTable[BLEND_PROPERTY_ONE] = GL_ONE;
21 - glBlendTable[BLEND_PROPERTY_SRC_COLOR] = GL_SRC_COLOR;
22 - glBlendTable[BLEND_PROPERTY_INV_SRC_COLOR] = GL_ONE_MINUS_SRC_COLOR;
23 - glBlendTable[BLEND_PROPERTY_SRC_ALPHA] = GL_SRC_ALPHA;
24 - glBlendTable[BLEND_PROPERTY_INV_SRC_ALPHA] = GL_ONE_MINUS_SRC_ALPHA;
25 - glBlendTable[BLEND_PROPERTY_DEST_ALPHA] = GL_DST_ALPHA;
26 - glBlendTable[BLEND_PROPERTY_INV_DEST_ALPHA] = GL_ONE_MINUS_DST_ALPHA;
27 - glBlendTable[BLEND_PROPERTY_DEST_COLOR] = GL_DST_COLOR;
28 - glBlendTable[BLEND_PROPERTY_INV_DEST_COLOR] = GL_ONE_MINUS_DST_COLOR;
29 - glBlendTable[BLEND_PROPERTY_SRC_ALPHA_SAT] = GL_SRC_ALPHA_SATURATE;
30 -
31 - glBlendOpTable[BLEND_OPERATION_ADD] = GL_FUNC_ADD;
32 - glBlendOpTable[BLEND_OPERATION_SUBTRACT] = GL_FUNC_SUBTRACT;
33 - glBlendOpTable[BLEND_OPERATION_REV_SUBTRACT] = GL_FUNC_REVERSE_SUBTRACT;
34 - glBlendOpTable[BLEND_OPERATION_MIN] = GL_MIN;
35 - glBlendOpTable[BLEND_OPERATION_MAX] = GL_MAX;
36 -
37 - glCompareFuncTable[CMP_FUNC_NEVER] = GL_NEVER;
38 - glCompareFuncTable[CMP_FUNC_LESS] = GL_LESS;
39 - glCompareFuncTable[CMP_FUNC_EQUAL] = GL_EQUAL;
40 - glCompareFuncTable[CMP_FUNC_LEQUAL] = GL_LEQUAL;
41 - glCompareFuncTable[CMP_FUNC_GREATER] = GL_GREATER;
42 - glCompareFuncTable[CMP_FUNC_NEQUAL] = GL_NOTEQUAL;
43 - glCompareFuncTable[CMP_FUNC_GEQUAL] = GL_GEQUAL;
44 - glCompareFuncTable[CMP_FUNC_ALWAYS] = GL_ALWAYS;
45 -
46 - glStencilOpTable[STENCIL_OPERATION_KEEP] = GL_KEEP;
47 - glStencilOpTable[STENCIL_OPERATION_ZERO] = GL_ZERO;
48 - glStencilOpTable[STENCIL_OPERATION_REPLACE] = GL_REPLACE;
49 - glStencilOpTable[STENCIL_OPERATION_INCR] = GL_INCR;
50 - glStencilOpTable[STENCIL_OPERATION_DECR] = GL_DECR;
51 - glStencilOpTable[STENCIL_OPERATION_INV] = GL_INVERT;
52 - glStencilOpTable[STENCIL_OPERATION_INCR_WRAP] = GL_INCR_WRAP;
53 - glStencilOpTable[STENCIL_OPERATION_DECR_WRAP] = GL_DECR_WRAP;
54 -
55 - glCullModeTable[CULL_MODE_NONE] = GL_BACK;
56 - glCullModeTable[CULL_MODE_CW] = GL_BACK;
57 - glCullModeTable[CULL_MODE_CCW] = GL_FRONT;
58 - glCullModeTable[CULL_MODE_ALL] = GL_FRONT_AND_BACK;
59 -
60 - glFillModeTable[FILL_MODE_POINT] = GL_POINT;
61 - glFillModeTable[FILL_MODE_WIREFRAME] = GL_LINE;
62 - glFillModeTable[FILL_MODE_SOLID] = GL_FILL;
63 -
64 - glTextureTypeTable[TEXTURE_1D] = GL_TEXTURE_1D;
65 - glTextureTypeTable[TEXTURE_2D] = GL_TEXTURE_2D;
66 - glTextureTypeTable[TEXTURE_3D] = GL_TEXTURE_3D;
67 - glTextureTypeTable[TEXTURE_CUBE_MAP] = GL_TEXTURE_CUBE_MAP;
68 - glTextureTypeTable[TEXTURE_2D_ARRAY] = GL_TEXTURE_2D_ARRAY_EXT;
69 - glTextureTypeTable[TEXTURE_CUBE_ARRAY] = GL_TEXTURE_CUBE_MAP_ARRAY;
70 - glTextureTypeTable[TEXTURE_2D_MS] = GL_TEXTURE_2D_MULTISAMPLE;
71 - glTextureTypeTable[TEXTURE_2D_ARRAY_MS] = GL_TEXTURE_2D_MULTISAMPLE_ARRAY;
72 -
73 - glImageFormatTable[LUMINANCE] = GL_LUMINANCE;
74 - glImageFormatTable[LUMINANCE_ALPHA] = GL_LUMINANCE_ALPHA;
75 - glImageFormatTable[INTENSITY] = GL_INTENSITY;
76 - glImageFormatTable[ALPHA] = GL_ALPHA;
77 - glImageFormatTable[RED] = GL_RED;
78 - glImageFormatTable[RED8] = GL_R8;
79 - glImageFormatTable[RED16] = GL_R16;
80 - glImageFormatTable[RED16F] = GL_R16F;
81 - glImageFormatTable[RED32] = GL_R32UI;
82 - glImageFormatTable[RED32F ] = GL_R32F;
83 - glImageFormatTable[BLUE] = GL_BLUE;
84 - glImageFormatTable[GREEN] = GL_GREEN;
85 - glImageFormatTable[RG] = GL_RG;
86 - glImageFormatTable[RG8] = GL_RG8;
87 - glImageFormatTable[RG16] = GL_RG16;
88 - glImageFormatTable[RG16F] = GL_RG16F;
89 - glImageFormatTable[RG32] = GL_RG32UI;
90 - glImageFormatTable[RG32F] = GL_RG32F;
91 - glImageFormatTable[RGB] = GL_RGB;
92 - glImageFormatTable[BGR] = GL_BGR;
93 - glImageFormatTable[RGB8] = GL_RGB8;
94 - glImageFormatTable[RGB8I] = GL_RGB8I;
95 - glImageFormatTable[RGB16] = GL_RGB16;
96 - glImageFormatTable[RGB16F] = GL_RGB16F;
97 - glImageFormatTable[BGRA] = GL_BGRA;
98 - glImageFormatTable[RGBA] = GL_RGBA;
99 - glImageFormatTable[RGBA4] = GL_RGBA4;
100 - glImageFormatTable[RGBA8] = GL_RGBA8;
101 - glImageFormatTable[RGBA8I] = GL_RGBA8I;
102 - glImageFormatTable[RGBA16F] = GL_RGBA16F;
103 - glImageFormatTable[RGBA32F] = GL_RGBA32F;
104 - glImageFormatTable[DEPTH_COMPONENT] = GL_DEPTH_COMPONENT;
18 + void fill(){
19 + glBlendTable[BLEND_PROPERTY_ZERO] = GL_ZERO;
20 + glBlendTable[BLEND_PROPERTY_ONE] = GL_ONE;
21 + glBlendTable[BLEND_PROPERTY_SRC_COLOR] = GL_SRC_COLOR;
22 + glBlendTable[BLEND_PROPERTY_INV_SRC_COLOR] = GL_ONE_MINUS_SRC_COLOR;
23 + glBlendTable[BLEND_PROPERTY_SRC_ALPHA] = GL_SRC_ALPHA;
24 + glBlendTable[BLEND_PROPERTY_INV_SRC_ALPHA] = GL_ONE_MINUS_SRC_ALPHA;
25 + glBlendTable[BLEND_PROPERTY_DEST_ALPHA] = GL_DST_ALPHA;
26 + glBlendTable[BLEND_PROPERTY_INV_DEST_ALPHA] = GL_ONE_MINUS_DST_ALPHA;
27 + glBlendTable[BLEND_PROPERTY_DEST_COLOR] = GL_DST_COLOR;
28 + glBlendTable[BLEND_PROPERTY_INV_DEST_COLOR] = GL_ONE_MINUS_DST_COLOR;
29 + glBlendTable[BLEND_PROPERTY_SRC_ALPHA_SAT] = GL_SRC_ALPHA_SATURATE;
30 +
31 + glBlendOpTable[BLEND_OPERATION_ADD] = GL_FUNC_ADD;
32 + glBlendOpTable[BLEND_OPERATION_SUBTRACT] = GL_FUNC_SUBTRACT;
33 + glBlendOpTable[BLEND_OPERATION_REV_SUBTRACT] = GL_FUNC_REVERSE_SUBTRACT;
34 + glBlendOpTable[BLEND_OPERATION_MIN] = GL_MIN;
35 + glBlendOpTable[BLEND_OPERATION_MAX] = GL_MAX;
36 +
37 + glCompareFuncTable[CMP_FUNC_NEVER] = GL_NEVER;
38 + glCompareFuncTable[CMP_FUNC_LESS] = GL_LESS;
39 + glCompareFuncTable[CMP_FUNC_EQUAL] = GL_EQUAL;
40 + glCompareFuncTable[CMP_FUNC_LEQUAL] = GL_LEQUAL;
41 + glCompareFuncTable[CMP_FUNC_GREATER] = GL_GREATER;
42 + glCompareFuncTable[CMP_FUNC_NEQUAL] = GL_NOTEQUAL;
43 + glCompareFuncTable[CMP_FUNC_GEQUAL] = GL_GEQUAL;
44 + glCompareFuncTable[CMP_FUNC_ALWAYS] = GL_ALWAYS;
45 +
46 + glStencilOpTable[STENCIL_OPERATION_KEEP] = GL_KEEP;
47 + glStencilOpTable[STENCIL_OPERATION_ZERO] = GL_ZERO;
48 + glStencilOpTable[STENCIL_OPERATION_REPLACE] = GL_REPLACE;
49 + glStencilOpTable[STENCIL_OPERATION_INCR] = GL_INCR;
50 + glStencilOpTable[STENCIL_OPERATION_DECR] = GL_DECR;
51 + glStencilOpTable[STENCIL_OPERATION_INV] = GL_INVERT;
52 + glStencilOpTable[STENCIL_OPERATION_INCR_WRAP] = GL_INCR_WRAP;
53 + glStencilOpTable[STENCIL_OPERATION_DECR_WRAP] = GL_DECR_WRAP;
54 +
55 + glCullModeTable[CULL_MODE_NONE] = GL_BACK;
56 + glCullModeTable[CULL_MODE_CW] = GL_BACK;
57 + glCullModeTable[CULL_MODE_CCW] = GL_FRONT;
58 + glCullModeTable[CULL_MODE_ALL] = GL_FRONT_AND_BACK;
59 +
60 + glFillModeTable[FILL_MODE_POINT] = GL_POINT;
61 + glFillModeTable[FILL_MODE_WIREFRAME] = GL_LINE;
62 + glFillModeTable[FILL_MODE_SOLID] = GL_FILL;
63 +
64 + glTextureTypeTable[TEXTURE_1D] = GL_TEXTURE_1D;
65 + glTextureTypeTable[TEXTURE_2D] = GL_TEXTURE_2D;
66 + glTextureTypeTable[TEXTURE_3D] = GL_TEXTURE_3D;
67 + glTextureTypeTable[TEXTURE_CUBE_MAP] = GL_TEXTURE_CUBE_MAP;
68 + glTextureTypeTable[TEXTURE_2D_ARRAY] = GL_TEXTURE_2D_ARRAY_EXT;
69 + glTextureTypeTable[TEXTURE_CUBE_ARRAY] = GL_TEXTURE_CUBE_MAP_ARRAY;
70 + glTextureTypeTable[TEXTURE_2D_MS] = GL_TEXTURE_2D_MULTISAMPLE;
71 + glTextureTypeTable[TEXTURE_2D_ARRAY_MS] = GL_TEXTURE_2D_MULTISAMPLE_ARRAY;
72 +
73 + glImageFormatTable[LUMINANCE] = GL_LUMINANCE;
74 + glImageFormatTable[LUMINANCE_ALPHA] = GL_LUMINANCE_ALPHA;
75 + glImageFormatTable[INTENSITY] = GL_INTENSITY;
76 + glImageFormatTable[ALPHA] = GL_ALPHA;
77 + glImageFormatTable[RED] = GL_RED;
78 + glImageFormatTable[RED8] = GL_R8;
79 + glImageFormatTable[RED16] = GL_R16;
80 + glImageFormatTable[RED16F] = GL_R16F;
81 + glImageFormatTable[RED32] = GL_R32UI;
82 + glImageFormatTable[RED32F ] = GL_R32F;
83 + glImageFormatTable[BLUE] = GL_BLUE;
84 + glImageFormatTable[GREEN] = GL_GREEN;
85 + glImageFormatTable[RG] = GL_RG;
86 + glImageFormatTable[RG8] = GL_RG8;
87 + glImageFormatTable[RG16] = GL_RG16;
88 + glImageFormatTable[RG16F] = GL_RG16F;
89 + glImageFormatTable[RG32] = GL_RG32UI;
90 + glImageFormatTable[RG32F] = GL_RG32F;
91 + glImageFormatTable[RGB] = GL_RGB;
92 + glImageFormatTable[BGR] = GL_BGR;
93 + glImageFormatTable[RGB8] = GL_RGB8;
94 + glImageFormatTable[RGB8I] = GL_RGB8I;
95 + glImageFormatTable[RGB16] = GL_RGB16;
96 + glImageFormatTable[RGB16F] = GL_RGB16F;
97 + glImageFormatTable[BGRA] = GL_BGRA;
98 + glImageFormatTable[RGBA] = GL_RGBA;
99 + glImageFormatTable[RGBA4] = GL_RGBA4;
100 + glImageFormatTable[RGBA8] = GL_RGBA8;
101 + glImageFormatTable[RGBA8I] = GL_RGBA8I;
102 + glImageFormatTable[RGBA16F] = GL_RGBA16F;
103 + glImageFormatTable[RGBA32F] = GL_RGBA32F;
104 + glImageFormatTable[DEPTH_COMPONENT] = GL_DEPTH_COMPONENT;
105 105 glImageFormatTable[DEPTH_COMPONENT16] = GL_DEPTH_COMPONENT16;
106 - glImageFormatTable[DEPTH_COMPONENT24] = GL_DEPTH_COMPONENT24;
106 + glImageFormatTable[DEPTH_COMPONENT24] = GL_DEPTH_COMPONENT24;
107 107 glImageFormatTable[DEPTH_COMPONENT32] = GL_DEPTH_COMPONENT32;
108 108
109 - glPrimitiveTypeTable[API_POINTS] = GL_POINTS;
110 - glPrimitiveTypeTable[LINES] = GL_LINES;
111 - glPrimitiveTypeTable[LINE_LOOP] = GL_LINE_LOOP;
112 - glPrimitiveTypeTable[LINE_STRIP] = GL_LINE_STRIP;
113 - glPrimitiveTypeTable[TRIANGLES] = GL_TRIANGLES;
114 - glPrimitiveTypeTable[TRIANGLE_STRIP] = GL_TRIANGLE_STRIP;
115 - glPrimitiveTypeTable[TRIANGLE_FAN] = GL_TRIANGLE_FAN;
116 - glPrimitiveTypeTable[QUADS] = GL_QUADS;
117 - glPrimitiveTypeTable[QUAD_STRIP] = GL_QUAD_STRIP;
118 - glPrimitiveTypeTable[POLYGON] = GL_POLYGON;
119 -
120 - glDataFormat[UNSIGNED_BYTE] = GL_UNSIGNED_BYTE;
121 - glDataFormat[UNSIGNED_SHORT] = GL_UNSIGNED_SHORT;
122 - glDataFormat[UNSIGNED_INT] = GL_UNSIGNED_INT;
123 - glDataFormat[SIGNED_BYTE] = GL_BYTE;
124 - glDataFormat[SIGNED_SHORT] = GL_SHORT;
125 - glDataFormat[SIGNED_INT] = GL_INT;
126 - glDataFormat[FLOAT_16] = GL_HALF_FLOAT_ARB;
127 - glDataFormat[FLOAT_32] = GL_FLOAT;
128 -
129 - glWrapTable[TEXTURE_REPEAT] = GL_REPEAT;
130 - glWrapTable[TEXTURE_CLAMP] = GL_CLAMP;
131 - glWrapTable[TEXTURE_CLAMP_TO_EDGE] = GL_CLAMP_TO_EDGE;
132 - glWrapTable[TEXTURE_CLAMP_TO_BORDER] = GL_CLAMP_TO_BORDER;
133 - glWrapTable[TEXTURE_DECAL] = GL_DECAL;
134 -
135 - glTextureFilterTable[TEXTURE_FILTER_LINEAR] = GL_LINEAR;
136 - glTextureFilterTable[TEXTURE_FILTER_NEAREST] = GL_NEAREST;
137 - glTextureFilterTable[TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST] = GL_NEAREST_MIPMAP_NEAREST;
138 - glTextureFilterTable[TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST] = GL_LINEAR_MIPMAP_NEAREST;
139 - glTextureFilterTable[TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR] = GL_NEAREST_MIPMAP_LINEAR;
140 - glTextureFilterTable[TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR] = GL_LINEAR_MIPMAP_LINEAR;
141 - }
109 + glPrimitiveTypeTable[API_POINTS] = GL_POINTS;
110 + glPrimitiveTypeTable[LINES] = GL_LINES;
111 + glPrimitiveTypeTable[LINE_LOOP] = GL_LINE_LOOP;
112 + glPrimitiveTypeTable[LINE_STRIP] = GL_LINE_STRIP;
113 + glPrimitiveTypeTable[TRIANGLES] = GL_TRIANGLES;
114 + glPrimitiveTypeTable[TRIANGLE_STRIP] = GL_TRIANGLE_STRIP;
115 + glPrimitiveTypeTable[TRIANGLE_FAN] = GL_TRIANGLE_FAN;
116 + glPrimitiveTypeTable[QUADS] = GL_QUADS;
117 + glPrimitiveTypeTable[QUAD_STRIP] = GL_QUAD_STRIP;
118 + glPrimitiveTypeTable[POLYGON] = GL_POLYGON;
119 +
120 + glDataFormat[UNSIGNED_BYTE] = GL_UNSIGNED_BYTE;
121 + glDataFormat[UNSIGNED_SHORT] = GL_UNSIGNED_SHORT;
122 + glDataFormat[UNSIGNED_INT] = GL_UNSIGNED_INT;
123 + glDataFormat[SIGNED_BYTE] = GL_BYTE;
124 + glDataFormat[SIGNED_SHORT] = GL_SHORT;
125 + glDataFormat[SIGNED_INT] = GL_INT;
126 + glDataFormat[FLOAT_16] = GL_HALF_FLOAT_ARB;
127 + glDataFormat[FLOAT_32] = GL_FLOAT;
128 +
129 + glWrapTable[TEXTURE_REPEAT] = GL_REPEAT;
130 + glWrapTable[TEXTURE_CLAMP] = GL_CLAMP;
131 + glWrapTable[TEXTURE_CLAMP_TO_EDGE] = GL_CLAMP_TO_EDGE;
132 + glWrapTable[TEXTURE_CLAMP_TO_BORDER] = GL_CLAMP_TO_BORDER;
133 + glWrapTable[TEXTURE_DECAL] = GL_DECAL;
134 +
135 + glTextureFilterTable[TEXTURE_FILTER_LINEAR] = GL_LINEAR;
136 + glTextureFilterTable[TEXTURE_FILTER_NEAREST] = GL_NEAREST;
137 + glTextureFilterTable[TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST] = GL_NEAREST_MIPMAP_NEAREST;
138 + glTextureFilterTable[TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST] = GL_LINEAR_MIPMAP_NEAREST;
139 + glTextureFilterTable[TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR] = GL_NEAREST_MIPMAP_LINEAR;
140 + glTextureFilterTable[TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR] = GL_LINEAR_MIPMAP_LINEAR;
141 + }
142 142 }