e816dce3 |
1 | puts "========" |
2 | puts "0032086: Visualization - support deferred data loading" |
3 | puts "========" |
4 | |
5 | # glTF file content |
6 | set cubeWithoutIndicesGltf { |
7 | { |
8 | "asset": {"generator": "","version": "2.0"}, |
9 | "scene": "defaultScene", |
10 | "scenes": {"defaultScene": {"nodes": ["rootNode"]}}, |
11 | "nodes": {"rootNode": { |
12 | "children": [],"meshes": ["Geometry-mesh002"], "matrix": |
13 | [1.0,0.0,0.0,0.0,0.0,0.0,-1.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0]}}, |
14 | "meshes": {"Geometry-mesh002": {"name": "Mesh", "primitives": |
15 | [{"attributes": {"NORMAL": "accessor_20","POSITION": "accessor_18"}, |
16 | "material": 0,"mode": 4}]}}, |
17 | "accessors": { |
18 | "accessor_18": {"bufferView": "bufferView_0","byteOffset": 0,"byteStride": 0,"componentType": 5126,"count": 36,"max": [0.5,0.5,0.5],"min": [-0.5,-0.5,-0.5],"type": "VEC3"}, |
19 | "accessor_20": {"bufferView": "bufferView_0","byteOffset": 432,"byteStride": 0,"componentType": 5126,"count": 36,"max": [1.0,1.0,1.0],"min": [-1.0,-1.0,-1.0],"type": "VEC3"}}, |
20 | "materials": { |
21 | "Effect-Red": {"name": "Red","technique": "technique0","values": |
22 | {"diffuse": [0.8,0.0,0.0,1.0],"shininess": 256,"specular": [0.2,0.2,0.2,1.0]}}}, |
23 | "bufferViews": { |
24 | "bufferView_0": {"buffer": "BoxWithoutIndices","byteOffset": 0,"byteLength": 864,"target": 34962}}, |
25 | "buffers": { |
26 | "BoxWithoutIndices": {"byteLength": 864,"type": "arraybuffer","uri": "data:application/octet-stream;base64,AAAAvwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAvwAAAD8AAAC/AAAAPwAAAD8AAAC/AAAAvwAAAD8AAAC/AAAAPwAAAD8AAAA/AAAAvwAAAL8AAAC/AAAAPwAAAL8AAAA/AAAAvwAAAL8AAAA/AAAAPwAAAL8AAAA/AAAAv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
31 | fconfigure $fd -translation lf |
32 | puts $fd $cubeWithoutIndicesGltf |
33 | close $fd |
34 | |
35 | ReadGltf D ${imagedir}/${casename}.gltf -skiplateloading 1 |
36 | XGetOneShape s D |
37 | trinfo s -lods |
38 | |
39 | vclear |
40 | vinit View1 |
41 | XDisplay D -explore -dispMode 1 -outdisplist prsList |
42 | vfit |
43 | |
44 | vdump ${imagedir}/${casename}_empty.png |
45 | |
46 | trlateload s -load |
47 | checktrinfo s -tri 12 -nod 36 |
48 | vdisplay {*}$prsList -redisplay -noecho |
49 | vfit |
50 | |
51 | vdump ${imagedir}/${casename}_loaded.png |