166 Triangles, |
166 Triangles, |
167 Quads, |
167 Quads, |
168 ConditionalLines |
168 ConditionalLines |
169 }; |
169 }; |
170 |
170 |
|
171 constexpr ArrayClass ARRAY_CLASSES[] = {ArrayClass::Lines, ArrayClass::Triangles, ArrayClass::Quads, ArrayClass::ConditionalLines}; |
|
172 constexpr int NUM_ARRAY_CLASSES = countof(ARRAY_CLASSES); |
|
173 |
|
174 // Different ways to render the scene |
171 enum class RenderStyle |
175 enum class RenderStyle |
172 { |
176 { |
|
177 // Normal rendering style |
173 Normal, |
178 Normal, |
|
179 // Render all polygons as lines |
174 Wireframe, |
180 Wireframe, |
|
181 // Use green colour for front faces and red colour for back faces |
175 BfcRedGreen, |
182 BfcRedGreen, |
|
183 // Use a different colour for each object |
176 RandomColors, |
184 RandomColors, |
|
185 // Render so that the colour of an object has an one to one correspondence with its id |
177 PickScene |
186 PickScene |
178 }; |
187 }; |
179 |
188 |
|
189 // Different ways to render fragments. |
180 // These are also defined in shaders |
190 // These are also defined in shaders |
181 enum class FragmentStyle |
191 enum class FragmentStyle |
182 { |
192 { |
|
193 // Use normal colours |
183 Normal = 0, |
194 Normal = 0, |
|
195 // Use a distinctive green colour for BFC red/green view |
184 BfcGreen = 1, |
196 BfcGreen = 1, |
|
197 // Use a distinctive red colour for BFC red/green view |
185 BfcRed = 2, |
198 BfcRed = 2, |
|
199 // Use a colour based on the object to distinguish objects |
186 RandomColors = 3, |
200 RandomColors = 3, |
|
201 // Use a colour that codes the object's id |
187 Id = 4, |
202 Id = 4, |
188 }; |
203 }; |
189 |
204 |
190 // User options for rendering |
205 // User options for rendering |
191 struct RenderPreferences |
206 struct RenderPreferences |