Add AICL example: 01_blue_square.aicl
Browse files
data/aicl/examples/01_blue_square.aicl
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AICL Example: Blue Square
|
| 2 |
+
# A simple graphical application that displays a blue square
|
| 3 |
+
|
| 4 |
+
Goal:
|
| 5 |
+
Display a blue square on screen
|
| 6 |
+
|
| 7 |
+
Constraint:
|
| 8 |
+
Must use hardware acceleration when available
|
| 9 |
+
|
| 10 |
+
Risk:
|
| 11 |
+
Graphics device unavailable
|
| 12 |
+
|
| 13 |
+
Recovery:
|
| 14 |
+
Use software renderer
|
| 15 |
+
|
| 16 |
+
Risk:
|
| 17 |
+
Shader compilation failure
|
| 18 |
+
|
| 19 |
+
Recovery:
|
| 20 |
+
Load fallback shader
|
| 21 |
+
|
| 22 |
+
Layer:
|
| 23 |
+
Application Window
|
| 24 |
+
|
| 25 |
+
Layer:
|
| 26 |
+
Renderer
|
| 27 |
+
Sublayer:
|
| 28 |
+
Device creation
|
| 29 |
+
Sublayer:
|
| 30 |
+
Resource management
|
| 31 |
+
Sublayer:
|
| 32 |
+
Shader system
|
| 33 |
+
|
| 34 |
+
Layer:
|
| 35 |
+
Blue Square
|
| 36 |
+
|
| 37 |
+
Layer:
|
| 38 |
+
Blue Shader
|
| 39 |
+
|
| 40 |
+
Validation:
|
| 41 |
+
Blue square is visible on screen
|
| 42 |
+
|
| 43 |
+
Validation:
|
| 44 |
+
Application remains responsive for 60 seconds
|