blob: 4bcf7f55d9c3731eab45c528f7832f446f115402 [file] [log] [blame]
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -07001// Copyright (C) 2009 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma version(1)
16
17#pragma rs java_package_name(com.android.samples)
18
19#include "rs_graphics.rsh"
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070020#include "shader_def.rsh"
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -070021
22rs_program_vertex gProgVertex;
23rs_program_fragment gProgFragmentColor;
24rs_program_fragment gProgFragmentTexture;
25
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -070026rs_program_store gProgStoreBlendNoneDepth;
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -070027rs_program_store gProgStoreBlendNone;
28rs_program_store gProgStoreBlendAlpha;
29rs_program_store gProgStoreBlendAdd;
30
31rs_allocation gTexOpaque;
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -070032rs_allocation gTexTorus;
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -070033rs_allocation gTexTransparent;
34
35rs_mesh gMbyNMesh;
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -070036rs_mesh gTorusMesh;
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -070037
38rs_font gFontSans;
39rs_font gFontSerif;
40rs_font gFontSerifBold;
41rs_font gFontSerifItalic;
42rs_font gFontSerifBoldItalic;
43rs_font gFontMono;
44
45int gDisplayMode;
46
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -070047rs_sampler gLinearClamp;
48rs_sampler gLinearWrap;
49rs_sampler gMipLinearWrap;
50rs_sampler gNearestClamp;
51
52rs_program_raster gCullBack;
53rs_program_raster gCullFront;
54
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070055// Custom vertex shader compunents
56VertexShaderConstants *gVSConstants;
57FragentShaderConstants *gFSConstants;
58// Export these out to easily set the inputs to shader
59VertexShaderInputs *gVSInputs;
60// Custom shaders we use for lighting
61rs_program_vertex gProgVertexCustom;
62rs_program_fragment gProgFragmentCustom;
63
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -070064#pragma rs export_var(gProgVertex, gProgFragmentColor, gProgFragmentTexture)
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -070065#pragma rs export_var(gProgStoreBlendNoneDepth, gProgStoreBlendNone, gProgStoreBlendAlpha, gProgStoreBlendAdd)
66#pragma rs export_var(gTexOpaque, gTexTorus, gTexTransparent)
67#pragma rs export_var(gMbyNMesh, gTorusMesh)
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -070068#pragma rs export_var(gFontSans, gFontSerif, gFontSerifBold, gFontSerifItalic, gFontSerifBoldItalic, gFontMono)
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -070069#pragma rs export_var(gLinearClamp, gLinearWrap, gMipLinearWrap, gNearestClamp)
70#pragma rs export_var(gCullBack, gCullFront)
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070071#pragma rs export_var(gVSConstants, gFSConstants, gVSInputs, gProgVertexCustom, gProgFragmentCustom)
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -070072
73//What we are showing
74#pragma rs export_var(gDisplayMode)
75
Alex Sakhartchouk6e934212010-08-31 12:02:01 -070076float gDt = 0;
77
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -070078void init() {
79}
80
81void displayFontSamples() {
82 rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
83 int yPos = 30;
84 rsgBindFont(gFontSans);
85 rsgDrawText("Sans font sample", 30, yPos);
86 yPos += 30;
87 rsgFontColor(0.5f, 0.9f, 0.5f, 1.0f);
88 rsgBindFont(gFontSerif);
89 rsgDrawText("Serif font sample", 30, yPos);
90 yPos += 30;
91 rsgFontColor(0.7f, 0.7f, 0.7f, 1.0f);
92 rsgBindFont(gFontSerifBold);
93 rsgDrawText("Serif Bold font sample", 30, yPos);
94 yPos += 30;
95 rsgFontColor(0.5f, 0.5f, 0.9f, 1.0f);
96 rsgBindFont(gFontSerifItalic);
97 rsgDrawText("Serif Italic font sample", 30, yPos);
98 yPos += 30;
99 rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
100 rsgBindFont(gFontSerifBoldItalic);
101 rsgDrawText("Serif Bold Italic font sample", 30, yPos);
102 yPos += 30;
103 rsgBindFont(gFontMono);
104 rsgDrawText("Monospace font sample", 30, yPos);
105}
106
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700107void bindProgramVertexOrtho() {
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700108 // Default vertex sahder
109 rsgBindProgramVertex(gProgVertex);
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700110 // Setup the projectioni matrix
111 rs_matrix4x4 proj;
112 rsMatrixLoadOrtho(&proj, 0, rsgGetWidth(), rsgGetHeight(), 0, -1,1);
113 rsgProgramVertexLoadProjectionMatrix(&proj);
114}
115
116void displayShaderSamples() {
117 bindProgramVertexOrtho();
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700118 rs_matrix4x4 matrix;
119 rsMatrixLoadIdentity(&matrix);
120 rsgProgramVertexLoadModelMatrix(&matrix);
121
122 // Fragment shader with texture
123 rsgBindProgramStore(gProgStoreBlendNone);
124 rsgBindProgramFragment(gProgFragmentTexture);
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700125 rsgBindSampler(gProgFragmentTexture, 0, gLinearClamp);
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700126 rsgBindTexture(gProgFragmentTexture, 0, gTexOpaque);
127
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700128 float startX = 0, startY = 0;
129 float width = 256, height = 256;
130 rsgDrawQuadTexCoords(startX, startY, 0, 0, 0,
131 startX, startY + height, 0, 0, 1,
132 startX + width, startY + height, 0, 1, 1,
133 startX + width, startY, 0, 1, 0);
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700134
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700135 startX = 200; startY = 0;
136 width = 128; height = 128;
137 rsgDrawQuadTexCoords(startX, startY, 0, 0, 0,
138 startX, startY + height, 0, 0, 1,
139 startX + width, startY + height, 0, 1, 1,
140 startX + width, startY, 0, 1, 0);
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700141
142 rsgBindProgramStore(gProgStoreBlendAlpha);
143 rsgBindTexture(gProgFragmentTexture, 0, gTexTransparent);
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700144 startX = 0; startY = 200;
145 width = 128; height = 128;
146 rsgDrawQuadTexCoords(startX, startY, 0, 0, 0,
147 startX, startY + height, 0, 0, 1,
148 startX + width, startY + height, 0, 1, 1,
149 startX + width, startY, 0, 1, 0);
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700150
151 // Fragment program with simple color
152 rsgBindProgramFragment(gProgFragmentColor);
153 rsgProgramFragmentConstantColor(gProgFragmentColor, 0.9, 0.3, 0.3, 1);
154 rsgDrawRect(200, 300, 350, 450, 0);
155 rsgProgramFragmentConstantColor(gProgFragmentColor, 0.3, 0.9, 0.3, 1);
156 rsgDrawRect(50, 400, 400, 600, 0);
157
158 rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
159 rsgBindFont(gFontMono);
160 rsgDrawText("Texture shader", 10, 50);
161 rsgDrawText("Alpha-blended texture shader", 10, 280);
162 rsgDrawText("Flat color shader", 100, 450);
163}
164
165void displayBlendingSamples() {
166 int i;
167
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700168 bindProgramVertexOrtho();
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700169 rs_matrix4x4 matrix;
170 rsMatrixLoadIdentity(&matrix);
171 rsgProgramVertexLoadModelMatrix(&matrix);
172
173 rsgBindProgramFragment(gProgFragmentColor);
174
175 rsgBindProgramStore(gProgStoreBlendNone);
176 for(i = 0; i < 3; i ++) {
177 float iPlusOne = (float)(i + 1);
178 rsgProgramFragmentConstantColor(gProgFragmentColor,
179 0.1f*iPlusOne, 0.2f*iPlusOne, 0.3f*iPlusOne, 1);
180 float yPos = 150 * (float)i;
181 rsgDrawRect(0, yPos, 200, yPos + 200, 0);
182 }
183
184 rsgBindProgramStore(gProgStoreBlendAlpha);
185 for(i = 0; i < 3; i ++) {
186 float iPlusOne = (float)(i + 1);
187 rsgProgramFragmentConstantColor(gProgFragmentColor,
188 0.2f*iPlusOne, 0.3f*iPlusOne, 0.1f*iPlusOne, 0.5);
189 float yPos = 150 * (float)i;
190 rsgDrawRect(150, yPos, 350, yPos + 200, 0);
191 }
192
193 rsgBindProgramStore(gProgStoreBlendAdd);
194 for(i = 0; i < 3; i ++) {
195 float iPlusOne = (float)(i + 1);
196 rsgProgramFragmentConstantColor(gProgFragmentColor,
197 0.3f*iPlusOne, 0.1f*iPlusOne, 0.2f*iPlusOne, 0.5);
198 float yPos = 150 * (float)i;
199 rsgDrawRect(300, yPos, 500, yPos + 200, 0);
200 }
201
202
203 rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
204 rsgBindFont(gFontMono);
205 rsgDrawText("No Blending", 10, 50);
206 rsgDrawText("Alpha Blending", 160, 150);
207 rsgDrawText("Additive Blending", 320, 250);
208
209}
210
211void displayMeshSamples() {
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700212
213 bindProgramVertexOrtho();
214 rs_matrix4x4 matrix;
215 rsMatrixLoadTranslate(&matrix, 128, 128, 0);
216 rsgProgramVertexLoadModelMatrix(&matrix);
217
218 // Fragment shader with texture
219 rsgBindProgramStore(gProgStoreBlendNone);
220 rsgBindProgramFragment(gProgFragmentTexture);
221 rsgBindSampler(gProgFragmentTexture, 0, gLinearClamp);
222 rsgBindTexture(gProgFragmentTexture, 0, gTexOpaque);
223
224 rsgDrawMesh(gMbyNMesh);
225
226 rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
227 rsgBindFont(gFontMono);
228 rsgDrawText("User gen 10 by 10 grid mesh", 10, 250);
229}
230
231void displayTextureSamplers() {
232
233 bindProgramVertexOrtho();
234 rs_matrix4x4 matrix;
235 rsMatrixLoadIdentity(&matrix);
236 rsgProgramVertexLoadModelMatrix(&matrix);
237
238 // Fragment shader with texture
239 rsgBindProgramStore(gProgStoreBlendNone);
240 rsgBindProgramFragment(gProgFragmentTexture);
241 rsgBindTexture(gProgFragmentTexture, 0, gTexOpaque);
242
243 // Linear clamp
244 rsgBindSampler(gProgFragmentTexture, 0, gLinearClamp);
245 float startX = 0, startY = 0;
246 float width = 300, height = 300;
247 rsgDrawQuadTexCoords(startX, startY, 0, 0, 0,
248 startX, startY + height, 0, 0, 1.1,
249 startX + width, startY + height, 0, 1.1, 1.1,
250 startX + width, startY, 0, 1.1, 0);
251
252 // Linear Wrap
253 rsgBindSampler(gProgFragmentTexture, 0, gLinearWrap);
254 startX = 0; startY = 300;
255 width = 300; height = 300;
256 rsgDrawQuadTexCoords(startX, startY, 0, 0, 0,
257 startX, startY + height, 0, 0, 1.1,
258 startX + width, startY + height, 0, 1.1, 1.1,
259 startX + width, startY, 0, 1.1, 0);
260
261 // Nearest
262 rsgBindSampler(gProgFragmentTexture, 0, gNearestClamp);
263 startX = 300; startY = 0;
264 width = 300; height = 300;
265 rsgDrawQuadTexCoords(startX, startY, 0, 0, 0,
266 startX, startY + height, 0, 0, 1.1,
267 startX + width, startY + height, 0, 1.1, 1.1,
268 startX + width, startY, 0, 1.1, 0);
269
270 rsgBindSampler(gProgFragmentTexture, 0, gMipLinearWrap);
271 startX = 300; startY = 300;
272 width = 300; height = 300;
273 rsgDrawQuadTexCoords(startX, startY, 0, 0, 0,
274 startX, startY + height, 0, 0, 1.5,
275 startX + width, startY + height, 0, 1.5, 1.5,
276 startX + width, startY, 0, 1.5, 0);
277
278
279 rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
280 rsgBindFont(gFontMono);
281 rsgDrawText("Filtering: linear clamp", 10, 290);
282 rsgDrawText("Filtering: linear wrap", 10, 590);
283 rsgDrawText("Filtering: nearest clamp", 310, 290);
284 rsgDrawText("Filtering: miplinear wrap", 310, 590);
285
286}
287
288float gTorusRotation = 0;
289
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700290void displayCullingSamples() {
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700291 rsgBindProgramVertex(gProgVertex);
292 // Setup the projectioni matrix with 60 degree field of view
293 rs_matrix4x4 proj;
294 float aspect = (float)rsgGetWidth() / (float)rsgGetHeight();
295 rsMatrixLoadPerspective(&proj, 30.0f, aspect, 0.1f, 100.0f);
296 rsgProgramVertexLoadProjectionMatrix(&proj);
297
298 // Fragment shader with texture
299 rsgBindProgramStore(gProgStoreBlendNoneDepth);
300 rsgBindProgramFragment(gProgFragmentTexture);
301 rsgBindSampler(gProgFragmentTexture, 0, gLinearClamp);
302 rsgBindTexture(gProgFragmentTexture, 0, gTexTorus);
303
304 // Aplly a rotation to our mesh
Alex Sakhartchouk6e934212010-08-31 12:02:01 -0700305 gTorusRotation += 50.0f * gDt;
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700306 if(gTorusRotation > 360.0f) {
307 gTorusRotation -= 360.0f;
308 }
309
310 rs_matrix4x4 matrix;
311 // Position our model on the screen
312 rsMatrixLoadTranslate(&matrix, -2.0f, 0.0f, -10.0f);
313 rsMatrixRotate(&matrix, gTorusRotation, 1.0f, 0.0f, 0.0f);
314 rsgProgramVertexLoadModelMatrix(&matrix);
315 // Use front face culling
316 rsgBindProgramRaster(gCullFront);
317 rsgDrawMesh(gTorusMesh);
318
319 rsMatrixLoadTranslate(&matrix, 2.0f, 0.0f, -10.0f);
320 rsMatrixRotate(&matrix, gTorusRotation, 1.0f, 0.0f, 0.0f);
321 rsgProgramVertexLoadModelMatrix(&matrix);
322 // Use back face culling
323 rsgBindProgramRaster(gCullBack);
324 rsgDrawMesh(gTorusMesh);
325
326 rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
327 rsgBindFont(gFontMono);
328 rsgDrawText("Displaying mesh front/back face culling", 10, rsgGetHeight() - 10);
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700329}
330
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700331float gLight0Rotation = 0;
332float gLight1Rotation = 0;
333
334void setupCustomShaderLights() {
335 float4 light0Pos = {-5.0f, 5.0f, -10.0f, 1.0f};
336 float4 light1Pos = {2.0f, 5.0f, 15.0f, 1.0f};
337 float3 light0DiffCol = {0.9f, 0.7f, 0.7f};
Alex Sakhartchouk6e934212010-08-31 12:02:01 -0700338 float3 light0SpecCol = {0.9f, 0.6f, 0.6f};
339 float3 light1DiffCol = {0.5f, 0.5f, 0.9f};
340 float3 light1SpecCol = {0.5f, 0.5f, 0.9f};
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700341
Alex Sakhartchouk6e934212010-08-31 12:02:01 -0700342 gLight0Rotation += 50.0f * gDt;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700343 if(gLight0Rotation > 360.0f) {
344 gLight0Rotation -= 360.0f;
345 }
Alex Sakhartchouk6e934212010-08-31 12:02:01 -0700346 gLight1Rotation -= 50.0f * gDt;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700347 if(gLight1Rotation > 360.0f) {
348 gLight1Rotation -= 360.0f;
349 }
350
351 rs_matrix4x4 l0Mat;
352 rsMatrixLoadRotate(&l0Mat, gLight0Rotation, 1.0f, 0.0f, 0.0f);
353 light0Pos = rsMatrixMultiply(&l0Mat, light0Pos);
354 rs_matrix4x4 l1Mat;
355 rsMatrixLoadRotate(&l1Mat, gLight1Rotation, 0.0f, 0.0f, 1.0f);
356 light1Pos = rsMatrixMultiply(&l1Mat, light1Pos);
357
358 // Set light 0 properties
359 gVSConstants->light0_Posision.x = light0Pos.x;
360 gVSConstants->light0_Posision.y = light0Pos.y;
361 gVSConstants->light0_Posision.z = light0Pos.z;
362 gVSConstants->light0_Diffuse = 1.0f;
363 gVSConstants->light0_Specular = 0.5f;
Alex Sakhartchouk6e934212010-08-31 12:02:01 -0700364 gVSConstants->light0_CosinePower = 40.0f;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700365 // Set light 1 properties
366 gVSConstants->light1_Posision.x = light1Pos.x;
367 gVSConstants->light1_Posision.y = light1Pos.y;
368 gVSConstants->light1_Posision.z = light1Pos.z;
369 gVSConstants->light1_Diffuse = 1.0f;
370 gVSConstants->light1_Specular = 0.7f;
371 gVSConstants->light1_CosinePower = 50.0f;
Alex Sakhartchouk1e5168d2010-09-01 16:34:48 -0700372 rsAllocationMarkDirty(rsGetAllocation(gVSConstants));
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700373
374 // Update fragmetn shader constants
375 // Set light 0 colors
376 gFSConstants->light0_DiffuseColor = light0DiffCol;
377 gFSConstants->light0_SpecularColor = light0SpecCol;
378 // Set light 1 colors
379 gFSConstants->light1_DiffuseColor = light1DiffCol;
380 gFSConstants->light1_SpecularColor = light1SpecCol;
Alex Sakhartchouk1e5168d2010-09-01 16:34:48 -0700381 rsAllocationMarkDirty(rsGetAllocation(gFSConstants));
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700382}
383
384void displayCustomShaderSamples() {
385
386 // Update vertex shader constants
387 // Load model matrix
388 // Aplly a rotation to our mesh
Alex Sakhartchouk6e934212010-08-31 12:02:01 -0700389 gTorusRotation += 50.0f * gDt;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700390 if(gTorusRotation > 360.0f) {
391 gTorusRotation -= 360.0f;
392 }
393
394 // Position our model on the screen
395 rsMatrixLoadTranslate(&gVSConstants->model, 0.0f, 0.0f, -10.0f);
396 rsMatrixRotate(&gVSConstants->model, gTorusRotation, 1.0f, 0.0f, 0.0f);
Alex Sakhartchouk6e934212010-08-31 12:02:01 -0700397 rsMatrixRotate(&gVSConstants->model, gTorusRotation, 0.0f, 0.0f, 1.0f);
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700398 setupCustomShaderLights();
399
400 rsgBindProgramVertex(gProgVertexCustom);
401 // Setup the projectioni matrix with 60 degree field of view
402 rs_matrix4x4 proj;
403 float aspect = (float)rsgGetWidth() / (float)rsgGetHeight();
404 rsMatrixLoadPerspective(&proj, 30.0f, aspect, 0.1f, 100.0f);
405 rsgProgramVertexLoadProjectionMatrix(&proj);
406
407 // Fragment shader with texture
408 rsgBindProgramStore(gProgStoreBlendNoneDepth);
409 rsgBindProgramFragment(gProgFragmentCustom);
410 rsgBindSampler(gProgFragmentCustom, 0, gLinearClamp);
411 rsgBindTexture(gProgFragmentCustom, 0, gTexTorus);
412
413 // Use back face culling
414 rsgBindProgramRaster(gCullBack);
415 rsgDrawMesh(gTorusMesh);
416
417 rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
418 rsgBindFont(gFontMono);
419 rsgDrawText("Custom shader sample", 10, rsgGetHeight() - 10);
420}
421
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700422int root(int launchID) {
423
Alex Sakhartchouk6e934212010-08-31 12:02:01 -0700424 gDt = rsGetDt();
425
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700426 rsgClearColor(0.2f, 0.2f, 0.2f, 0.0f);
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700427 rsgClearDepth(1.0f);
428
429 switch(gDisplayMode) {
430 case 0:
431 displayFontSamples();
432 break;
433 case 1:
434 displayShaderSamples();
435 break;
436 case 2:
437 displayBlendingSamples();
438 break;
439 case 3:
440 displayMeshSamples();
441 break;
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700442 case 4:
443 displayTextureSamplers();
444 break;
445 case 5:
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -0700446 displayCullingSamples();
447 break;
448 case 6:
449 displayCustomShaderSamples();
Alex Sakhartchouk6e657c32010-08-24 11:37:33 -0700450 break;
Alex Sakhartchoukc8dc45c2010-08-23 10:24:10 -0700451 }
452
453 return 10;
454}