11 #ifndef _COP2_COMMON_H_
12 #define _COP2_COMMON_H_
16 #define COP2_MASK_PAGE_NAME "Mask"
17 #define COP2_GEN_MASK_COUNT 4
18 #define COP2_GEN_IMAGE_PAGE "Image"
19 #define COP2_GEN_IMAGE_COUNT 16
20 #define COP2_GEN_SEQUENCE_PAGE "Sequence"
21 #define COP2_GEN_SEQUENCE_COUNT 8
22 #define COP2_MULTI_MERGE_PAGE "Merge"
23 #define COP2_MULTI_MERGE_COUNT 5
24 #define COP2_FRAME_PAGE_NAME "Frame Scope"
26 #define TOOL_PARM PRM_Template::PRM_EXPORT_TBX
27 #define POPUP_PARM PRM_Template::PRM_EXPORT_MAX
29 #define COP2_EMPTY_SWITCHER(name) \
30 static PRM_Default switcher[] = { \
31 PRM_Default(0,name), }
33 #define COP2_SWITCHER(count, name) \
34 static PRM_Default switcher[] = { \
35 PRM_Default(count, name) }
37 #define COP2_SWITCHER2(count1, name1, count2, name2) \
38 static PRM_Default switcher[] = { \
39 PRM_Default(count1, name1), \
40 PRM_Default(count2, name2) }
42 #define COP2_SWITCHER3(count1, name1, count2, name2, count3, name3)\
43 static PRM_Default switcher[] = { \
44 PRM_Default(count1, name1), \
45 PRM_Default(count2, name2), \
46 PRM_Default(count3, name3) }
48 #define COP2_SWITCHER4(count1,name1, count2,name2, count3,name3, count4,name4)\
49 static PRM_Default switcher[] = { \
50 PRM_Default(count1, name1), \
51 PRM_Default(count2, name2), \
52 PRM_Default(count3, name3), \
53 PRM_Default(count4, name4) }
55 #define COP2_SWITCHER5(count1,name1, count2,name2, count3,name3, count4,name4, count5, name5)\
56 static PRM_Default switcher[] = { \
57 PRM_Default(count1, name1), \
58 PRM_Default(count2, name2), \
59 PRM_Default(count3, name3), \
60 PRM_Default(count4, name4), \
61 PRM_Default(count5, name5) }
65 #define COP2_GENERATOR_SWITCHER(count, name) \
66 static PRM_Default switcher[] = { \
67 PRM_Default(count, name), \
68 PRM_Default(COP2_GEN_MASK_COUNT, COP2_MASK_PAGE_NAME), \
69 PRM_Default(COP2_GEN_IMAGE_COUNT, COP2_GEN_IMAGE_PAGE), \
70 PRM_Default(COP2_GEN_SEQUENCE_COUNT, COP2_GEN_SEQUENCE_PAGE) }
72 #define COP2_GENERATOR_SWITCHER2(count1, name1, count2, name2) \
73 static PRM_Default switcher[] = { \
74 PRM_Default(count1, name1), \
75 PRM_Default(count2, name2), \
76 PRM_Default(COP2_GEN_MASK_COUNT, COP2_MASK_PAGE_NAME), \
77 PRM_Default(COP2_GEN_IMAGE_COUNT, COP2_GEN_IMAGE_PAGE), \
78 PRM_Default(COP2_GEN_SEQUENCE_COUNT, COP2_GEN_SEQUENCE_PAGE) }
80 #define COP2_GENERATOR_SWITCHER3(count1,name1, count2,name2, count3,name3) \
81 static PRM_Default switcher[] = { \
82 PRM_Default(count1, name1), \
83 PRM_Default(count2, name2), \
84 PRM_Default(count3, name3), \
85 PRM_Default(COP2_GEN_MASK_COUNT, COP2_MASK_PAGE_NAME), \
86 PRM_Default(COP2_GEN_IMAGE_COUNT, COP2_GEN_IMAGE_PAGE), \
87 PRM_Default(COP2_GEN_SEQUENCE_COUNT, COP2_GEN_SEQUENCE_PAGE) }
90 #define COP2_MULTI_SWITCHER(count, name) \
91 static PRM_Default switcher[] = { \
92 PRM_Default(count, name), \
93 PRM_Default(COP2_MULTI_MERGE_COUNT, COP2_MULTI_MERGE_PAGE) }
95 #define COP2_MULTI_SWITCHER2(count1, name1, count2, name2) \
96 static PRM_Default switcher[] = { \
97 PRM_Default(count1, name1), \
98 PRM_Default(count2, name2), \
99 PRM_Default(COP2_MULTI_MERGE_COUNT, COP2_MULTI_MERGE_PAGE) }
102 #define COP2_MULTI_SWITCHER3(count1, name1, count2, name2, count3, name3)\
103 static PRM_Default switcher[] = { \
104 PRM_Default(count1, name1), \
105 PRM_Default(count2, name2), \
106 PRM_Default(count3, name3), \
107 PRM_Default(COP2_MULTI_MERGE_COUNT, COP2_MULTI_MERGE_PAGE) }
110 #define COP2_PIXEL_EXTRAS 11
111 #define COP2_PIXEL_FIRST_EXTRAS 2
112 #define COP2_PIXEL_FRAME_EXTRAS 9
114 #define COP2_PIXEL_SWITCHER(count, name) \
115 static PRM_Default switcher[] = { \
116 PRM_Default(count+COP2_PIXEL_FIRST_EXTRAS, name),\
117 PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
119 #define COP2_PIXEL_SWITCHER2(count1, name1, count2, name2) \
120 static PRM_Default switcher[] = { \
121 PRM_Default(count1, name1), \
122 PRM_Default(count2+COP2_PIXEL_FIRST_EXTRAS, name2),\
123 PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
126 #define COP2_MASK_EXTRAS (COP2_PIXEL_FIRST_EXTRAS+5)
128 #define COP2_MASK_SWITCHER(count, name) \
129 static PRM_Default switcher[] = { \
130 PRM_Default(count, name), \
131 PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
132 PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
134 #define COP2_MASK_SWITCHER2(count1, name1, count2, name2) \
135 static PRM_Default switcher[] = { \
136 PRM_Default(count1, name1), \
137 PRM_Default(count2, name2), \
138 PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
139 PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
141 #define COP2_MASK_SWITCHER3(count1, name1, count2, name2, count3, name3) \
142 static PRM_Default switcher[] = { \
143 PRM_Default(count1, name1), \
144 PRM_Default(count2, name2), \
145 PRM_Default(count3, name3), \
146 PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
147 PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
150 #define COP2_PIXEL_OP_EXTRAS 2
152 #define COP2_PIXEL_OP_SWITCHER(count, name) \
153 static PRM_Default switcher[] = { \
154 PRM_Default(count+COP2_PIXEL_OP_EXTRAS, name), \
155 PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
156 PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
158 #define COP2_PIXEL_OP_SWITCHER2(count1, name1, count2, name2) \
159 static PRM_Default switcher[] = { \
160 PRM_Default(count1, name1), \
161 PRM_Default(count2+COP2_PIXEL_OP_EXTRAS, name2), \
162 PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
163 PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
165 #define DEFAULT_COLOR_NAME "C"
166 #define DEFAULT_RED_NAME "R"
167 #define DEFAULT_GREEN_NAME "G"
168 #define DEFAULT_BLUE_NAME "B"
170 #define DEFAULT_ALPHA_NAME "A"
171 #define DEFAULT_LUMINANCE_NAME "Y"
172 #define DEFAULT_DEPTH_NAME "Z"
173 #define DEFAULT_STENCIL_NAME "S"
176 #define IMAGE_UNIT_UV 0
177 #define IMAGE_UNIT_PIXEL 1
180 #define PLANE_MERGE_ALL 0
181 #define PLANE_MERGE_COMMON 1
182 #define PLANE_MERGE_FIRST 2
185 #define PLANE_DEPTH_PROMOTE 0
186 #define PLANE_DEPTH_DEMOTE 1
187 #define PLANE_DEPTH_FIRST 2
188 #define PLANE_DEPTH_MISMATCH_ERROR 3
191 #define SEQUENCE_RANGE_TRIM_FIRST 0
192 #define SEQUENCE_RANGE_SHIFT_FIRST 1
193 #define SEQUENCE_RANGE_EXTEND_MAX 2
194 #define SEQUENCE_RANGE_TRIM_MIN 3
197 #define SEQUENCE_RATE_FIRST 0
198 #define SEQUENCE_RATE_HIGHEST 1
199 #define SEQUENCE_RATE_LOWEST 2
200 #define SEQUENCE_RATE_MISMATCH_ERROR 3
203 #define SEQUENCE_FRAME_NEAREST 0
204 #define SEQUENCE_FRAME_PREVIOUS 1
205 #define SEQUENCE_FRAME_NEXT 2
208 #define ICON_PREVIEW_RGB 0
209 #define ICON_PREVIEW_ALPHA 1
210 #define ICON_PREVIEW_DEPTH 2
211 #define ICON_PREVIEW_LUM 3
214 #define COP2_MULTITHREADED 0
215 #define COP2_SINGLE_THREAD 1
216 #define COP2_EXCLUSIVE_THREAD 2
219 #define COP2_PARM_NONVOLATILE 0
220 #define COP2_PARM_IMAGE 1
221 #define COP2_PARM_TIMING 2
222 #define COP2_PARM_ALL_VOLATILE 3
225 #define SHIFT_ALIGN_START_START 0
226 #define SHIFT_ALIGN_END_END 1
227 #define SHIFT_ALIGN_END_START 2
228 #define SHIFT_ALIGN_START_END 3
230 #define SHIFT_REL_TO_START 0
231 #define SHIFT_ABS_START 1
232 #define SHIFT_ABS_END 2
237 #define TRIM_SINGLE 2
238 #define TRIM_SINGLE_START 3
239 #define TRIM_SINGLE_END 4
280 static int hash(
const char *name);
static int hash(const char *name)
cop2LockInfo(const char *name, int num)
GLuint const GLchar * name