├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── bgfx.nimble ├── bgfx ├── bgfx.nim ├── bgfx_amalgamated.cpp ├── bgfx_amalgamated.mm ├── bx_amalgamated.cpp ├── defines.nim ├── platform.nim └── types.nim └── examples ├── 00-HelloWorld ├── .gitignore ├── HelloWorld.nim ├── HelloWorld.nim.cfg ├── HelloWorld.nimble └── Logo.nim ├── 01-Cubes ├── .gitignore ├── Cubes.nim ├── Cubes.nim.cfg ├── Cubes.nimble └── shaders │ ├── dx11 │ ├── fs_cubes.bin │ └── vs_cubes.bin │ ├── dx9 │ ├── fs_cubes.bin │ └── vs_cubes.bin │ ├── gles │ ├── fs_cubes.bin │ └── vs_cubes.bin │ ├── glsl │ ├── fs_cubes.bin │ └── vs_cubes.bin │ ├── metal │ ├── fs_cubes.bin │ └── vs_cubes.bin │ └── spirv │ ├── fs_cubes.bin │ └── vs_cubes.bin ├── 02-metaballs ├── Metaballs ├── Metaballs.nim ├── Metaballs.nim.cfg ├── Metaballs.nimble ├── fs_metaballs.nim └── vs_metaballs.nim ├── bgfx_utils.nim ├── fpu_math.nim ├── glfw_platform.nim └── sdl_platform.nim /.gitignore: -------------------------------------------------------------------------------- 1 | nimcache/ 2 | nimsuggest.log 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "bgfx"] 2 | path = bgfx 3 | url = https://github.com/bkaradzic/bgfx.git 4 | [submodule "bx"] 5 | path = bx 6 | url = https://github.com/bkaradzic/bx.git 7 | [submodule "embed/bgfx"] 8 | path = embed/bgfx 9 | url = https://github.com/bkaradzic/bgfx.git 10 | [submodule "embed/bx"] 11 | path = embed/bx 12 | url = https://github.com/bkaradzic/bx.git 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017, Cory Null(Noll) Crimmins - Golden 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nim-bgfx 2 | > [bgfx](https://github.com/bkaradzic/bgfx) graphics library binding and wrapper for the nim programming language. [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=96STXBG8HMW2E) 3 | 4 | [bgfx](https://github.com/bkaradzic/bgfx) is a rendering library that has a variety of graphics backends supported and a bunch of other neat features. 5 | * Supported backends; Direct3D 9, Direct3D 11, Direct3D 12 (WIP), Metal (WIP), Vulkan(WIP) OpenGL 2.1, OpenGL 3.1+, OpenGL ES 2, OpenGL ES 3.1, WebGL 1.0, and WebGL 2.0 6 | * Other features include occlusion querying, compute shader programs, draw and compute bucket sorting, conversion to compressed formats, and more. 7 | 8 | bgfx's original and primary maintainer is [Branimir Karadzic](https://github.com/bkaradzic). 9 | 10 | nim-bgfx's is original and primary maintainer is [Cory Noll Crimmins - Golden](https://github.com/Halsys). 11 | 12 | You may contact me([Cory](https://github.com/Halsys)), if you ever face a problem related to this library. However all problems relating to features and internal issues that are a part of bgfx should be taken up with bgfx's community and [Branimir](https://github.com/bkaradzic) 13 | 14 | ## Notes: 15 | 1. This needs to be beta tested, but is known to work(examples included). 16 | 2. This package has all of the C functions, macros, and types 17 | 3. Compiles bgfx right out of the box (provided it is supported). 18 | 4. Because the bgfx library was programmed with specific types in mind **(i.e. uint8/16/32/64_t and float)**. You have to be incredibly specific because of nims type system (**42'u16**, **100'i32**, **1.0'f32**) 19 | 5. This package does include nim examples. 20 | 6. This package has the same license as bgfx... for your information. 21 | 7. You are free to send improvements but you should; 22 | * Make sure it matches how things operate on the C++ or C of the library. 23 | * Make sure that the code is readable. 24 | * Documentation is optional, but would be nice. 25 | * Make sure it works on the latest version of nim. 26 | 8. Currently two window managing libraries work with this package; [nimrod-glfw](https://github.com/rafaelvasco/nimrod-glfw) and [sdl2_nim](https://github.com/Vladar4/sdl2_nim) (with varying results). 27 | 9. Compiling bgfx so far works on Linux and OSX... maybe untested on other platforms. 28 | 10. Building bgfx on Windows is untested. 29 | 11. Building bgfx in Javascript is untested. 30 | 12. Works on amd64, untested on other architechures. 31 | -------------------------------------------------------------------------------- /bgfx.nimble: -------------------------------------------------------------------------------- 1 | # Package 2 | version = "0.2.2" 3 | author = "Cory Noll Crimmins - Golden" 4 | description = "Wrapper for the graphics library; BGFX." 5 | license = "BSD" 6 | skipDirs = @["examples"] 7 | 8 | # Dependencies 9 | requires "nim >= 0.16.1" 10 | -------------------------------------------------------------------------------- /bgfx/bgfx_amalgamated.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Cory Noll Crimmins - Golden 3 | * License: BSD-2 4 | * Amalgamated bgfx 5 | */ 6 | 7 | //BGFX 8 | #include "../embed/bgfx/src/bgfx.cpp" 9 | #include "../embed/bgfx/src/glcontext_egl.cpp" 10 | #include "../embed/bgfx/src/glcontext_glx.cpp" 11 | #include "../embed/bgfx/src/glcontext_ppapi.cpp" 12 | #include "../embed/bgfx/src/glcontext_wgl.cpp" 13 | #include "../embed/bgfx/src/image.cpp" 14 | #include "../embed/bgfx/src/hmd.cpp" 15 | #include "../embed/bgfx/src/hmd_ovr.cpp" 16 | #include "../embed/bgfx/src/hmd_openvr.cpp" 17 | #include "../embed/bgfx/src/debug_renderdoc.cpp" 18 | #include "../embed/bgfx/src/renderer_d3d9.cpp" 19 | #include "../embed/bgfx/src/renderer_d3d11.cpp" 20 | #include "../embed/bgfx/src/renderer_d3d12.cpp" 21 | #include "../embed/bgfx/src/renderer_noop.cpp" 22 | #include "../embed/bgfx/src/renderer_gl.cpp" 23 | #include "../embed/bgfx/src/renderer_vk.cpp" 24 | #include "../embed/bgfx/src/renderer_gnm.cpp" 25 | #include "../embed/bgfx/src/shader_dxbc.cpp" 26 | #include "../embed/bgfx/src/shader_dx9bc.cpp" 27 | #include "../embed/bgfx/src/shader_spirv.cpp" 28 | #include "../embed/bgfx/src/topology.cpp" 29 | #include "../embed/bgfx/src/vertexdecl.cpp" 30 | -------------------------------------------------------------------------------- /bgfx/bgfx_amalgamated.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Cory Noll Crimmins - Golden 3 | * License: BSD-2 4 | * Amalgamated bgfx for objc 5 | */ 6 | 7 | //BGFX C++ 8 | #include "bgfx_amalgamated.cpp" 9 | 10 | //BGFX Obj-C++ 11 | #include "../embed/bgfx/src/glcontext_eagl.mm" 12 | #include "../embed/bgfx/src/glcontext_nsgl.mm" 13 | #include "../embed/bgfx/src/renderer_mtl.mm" 14 | -------------------------------------------------------------------------------- /bgfx/bx_amalgamated.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Cory Noll Crimmins - Golden 3 | * License: BSD-2 4 | * Amalgamated bx 5 | */ 6 | 7 | #include "../embed/bx/src/commandline.cpp" 8 | #include "../embed/bx/src/crt.cpp" 9 | #include "../embed/bx/src/crtimpl.cpp" 10 | #include "../embed/bx/src/debug.cpp" 11 | #include "../embed/bx/src/dtoa.cpp" 12 | #include "../embed/bx/src/fpumath.cpp" 13 | #include "../embed/bx/src/mutex.cpp" 14 | #include "../embed/bx/src/os.cpp" 15 | #include "../embed/bx/src/sem.cpp" 16 | #include "../embed/bx/src/sort.cpp" 17 | #include "../embed/bx/src/string.cpp" 18 | #include "../embed/bx/src/thread.cpp" 19 | #include "../embed/bx/src/timer.cpp" 20 | -------------------------------------------------------------------------------- /bgfx/defines.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Port for bgfx defines 4 | 5 | const BGFX_API_VERSION* = 35'u32 6 | 7 | const 8 | BGFX_STATE_RGB_WRITE* = 0x0000000000000001'u64 # Enable RGB write. 9 | BGFX_STATE_ALPHA_WRITE* = 0x0000000000000002'u64 # Enable alpha write. 10 | BGFX_STATE_DEPTH_WRITE* = 0x0000000000000004'u64 # Enable depth write. 11 | BGFX_STATE_DEPTH_TEST_LESS* = 0x0000000000000010'u64 # Enable depth test, less. 12 | BGFX_STATE_DEPTH_TEST_LEQUAL* = 0x0000000000000020'u64 # Enable depth test, less equal. 13 | BGFX_STATE_DEPTH_TEST_EQUAL* = 0x0000000000000030'u64 # Enable depth test, equal. 14 | BGFX_STATE_DEPTH_TEST_GEQUAL* = 0x0000000000000040'u64 # Enable depth test, greater equal. 15 | BGFX_STATE_DEPTH_TEST_GREATER* = 0x0000000000000050'u64 # Enable depth test, greater. 16 | BGFX_STATE_DEPTH_TEST_NOTEQUAL* = 0x0000000000000060'u64 # Enable depth test, not equal. 17 | BGFX_STATE_DEPTH_TEST_NEVER* = 0x0000000000000070'u64 # Enable depth test, never. 18 | BGFX_STATE_DEPTH_TEST_ALWAYS* = 0x0000000000000080'u64 # Enable depth test, always. 19 | BGFX_STATE_DEPTH_TEST_SHIFT* = 4'u64 20 | BGFX_STATE_DEPTH_TEST_MASK* = 0x00000000000000F0'u64 # Depth test state bit mask. 21 | BGFX_STATE_BLEND_ZERO* = 0x0000000000001000'u64 # 22 | BGFX_STATE_BLEND_ONE* = 0x0000000000002000'u64 # 23 | BGFX_STATE_BLEND_SRC_COLOR* = 0x0000000000003000'u64 # 24 | BGFX_STATE_BLEND_INV_SRC_COLOR* = 0x0000000000004000'u64 # 25 | BGFX_STATE_BLEND_SRC_ALPHA* = 0x0000000000005000'u64 # 26 | BGFX_STATE_BLEND_INV_SRC_ALPHA* = 0x0000000000006000'u64 # 27 | BGFX_STATE_BLEND_DST_ALPHA* = 0x0000000000007000'u64 # 28 | BGFX_STATE_BLEND_INV_DST_ALPHA* = 0x0000000000008000'u64 # 29 | BGFX_STATE_BLEND_DST_COLOR* = 0x0000000000009000'u64 # 30 | BGFX_STATE_BLEND_INV_DST_COLOR* = 0x000000000000A000'u64 # 31 | BGFX_STATE_BLEND_SRC_ALPHA_SAT* = 0x000000000000B000'u64 # 32 | BGFX_STATE_BLEND_FACTOR* = 0x000000000000C000'u64 # 33 | BGFX_STATE_BLEND_INV_FACTOR* = 0x000000000000D000'u64 # 34 | BGFX_STATE_BLEND_SHIFT* = 12'u64 35 | BGFX_STATE_BLEND_MASK* = 0x000000000FFFF000'u64 # Blend state bit mask. 36 | BGFX_STATE_BLEND_EQUATION_ADD* = 0x0000000000000000'u64 # 37 | BGFX_STATE_BLEND_EQUATION_SUB* = 0x0000000010000000'u64 # 38 | BGFX_STATE_BLEND_EQUATION_REVSUB* = 0x0000000020000000'u64 # 39 | BGFX_STATE_BLEND_EQUATION_MIN* = 0x0000000030000000'u64 # 40 | BGFX_STATE_BLEND_EQUATION_MAX* = 0x0000000040000000'u64 # 41 | BGFX_STATE_BLEND_EQUATION_SHIFT* = 28'u64 42 | BGFX_STATE_BLEND_EQUATION_MASK* = 0x00000003F0000000'u64 # Blend equation bit mask. 43 | BGFX_STATE_BLEND_INDEPENDENT* = 0x0000000400000000'u64 # Enable blend independent. 44 | BGFX_STATE_BLEND_ALPHA_TO_COVERAGE* = 0x0000000800000000'u64 # Enable alpha to coverage. 45 | BGFX_STATE_CULL_CW* = 0x0000001000000000'u64 # Cull clockwise triangles. 46 | BGFX_STATE_CULL_CCW* = 0x0000002000000000'u64 # Cull counter-clockwise triangles. 47 | BGFX_STATE_CULL_SHIFT* = 36'u64 48 | BGFX_STATE_CULL_MASK* = 0x0000003000000000'u64 # Culling mode bit mask. 49 | 50 | const 51 | BGFX_STATE_ALPHA_REF_SHIFT* = 40'u64 52 | BGFX_STATE_ALPHA_REF_MASK* = 0x0000FF0000000000'u64 # Alpha reference bit mask. 53 | BGFX_STATE_PT_TRISTRIP* = 0x0001000000000000'u64 # Tristrip. 54 | BGFX_STATE_PT_LINES* = 0x0002000000000000'u64 # Lines. 55 | BGFX_STATE_PT_LINESTRIP* = 0x0003000000000000'u64 # Line strip. 56 | BGFX_STATE_PT_POINTS* = 0x0004000000000000'u64 # Points. 57 | BGFX_STATE_PT_SHIFT* = 48'u64 58 | BGFX_STATE_PT_MASK* = 0x0007000000000000'u64 # Primitive type bit mask. 59 | BGFX_STATE_POINT_SIZE_SHIFT* = 52'u64 60 | BGFX_STATE_POINT_SIZE_MASK* = 0x00F0000000000000'u64 # Point size bit mask. 61 | 62 | const 63 | BGFX_STATE_MSAA* = 0x0100000000000000'u64 # Enable MSAA rasterization. 64 | BGFX_STATE_LINEAA* = 0x0200000000000000'u64 # Enable line AA rasterization. 65 | BGFX_STATE_CONSERVATIVE_RASTER* = 0x0400000000000000'u64 # Enable conservative rasterization. 66 | 67 | const 68 | BGFX_STATE_RESERVED_SHIFT* = 61'u64 69 | BGFX_STATE_RESERVED_MASK* = 0xE000000000000000'u64 # Internal bits mask. 70 | 71 | const 72 | BGFX_STATE_NONE* = 0x0000000000000000'u64 # No state. 73 | BGFX_STATE_MASK* = 0xFFFFFFFFFFFFFFFF'u64 # State mask. 74 | 75 | const BGFX_STATE_DEFAULT* = (0'u64 or BGFX_STATE_RGB_WRITE or BGFX_STATE_ALPHA_WRITE or BGFX_STATE_DEPTH_TEST_LESS or BGFX_STATE_DEPTH_WRITE or BGFX_STATE_CULL_CW or BGFX_STATE_MSAA) 76 | 77 | template BGFX_STATE_ALPHA_REF*(refer: untyped): untyped = (((refer) shl BGFX_STATE_ALPHA_REF_SHIFT) and BGFX_STATE_ALPHA_REF_MASK) 78 | 79 | template BGFX_STATE_POINT_SIZE*(size: untyped): untyped = (((size) shl BGFX_STATE_POINT_SIZE_SHIFT) and BGFX_STATE_POINT_SIZE_MASK) 80 | 81 | template BGFX_STATE_BLEND_FUNC_SEPARATE*(srcRGB, dstRGB, srcA, dstA: untyped): untyped = (0'u64) or (((srcRGB) or ((dstRGB) shl 4)) or (((srcA) or ((dstA) shl 4)) shl 8)) 82 | 83 | template BGFX_STATE_BLEND_EQUATION_SEPARATE*(rgb, a: untyped): untyped = ((rgb) or ((a) shl 3)) 84 | 85 | template BGFX_STATE_BLEND_FUNC*(src, dst: untyped): untyped = BGFX_STATE_BLEND_FUNC_SEPARATE(src, dst, src, dst) 86 | 87 | template BGFX_STATE_BLEND_EQUATION*(equation: untyped): untyped = BGFX_STATE_BLEND_EQUATION_SEPARATE(equation, equation) 88 | 89 | const 90 | BGFX_STATE_BLEND_ADD* = (BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE)) 91 | BGFX_STATE_BLEND_ALPHA* = (BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA)) 92 | BGFX_STATE_BLEND_DARKEN* = (BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE) or BGFX_STATE_BLEND_EQUATION(BGFX_STATE_BLEND_EQUATION_MIN)) 93 | BGFX_STATE_BLEND_LIGHTEN* = (BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE) or BGFX_STATE_BLEND_EQUATION(BGFX_STATE_BLEND_EQUATION_MAX)) 94 | BGFX_STATE_BLEND_MULTIPLY* = (BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_DST_COLOR, BGFX_STATE_BLEND_ZERO)) 95 | BGFX_STATE_BLEND_NORMAL* = (BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_INV_SRC_ALPHA)) 96 | BGFX_STATE_BLEND_SCREEN* = (BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_INV_SRC_COLOR)) 97 | BGFX_STATE_BLEND_LINEAR_BURN* = (BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_DST_COLOR, BGFX_STATE_BLEND_INV_DST_COLOR) or BGFX_STATE_BLEND_EQUATION(BGFX_STATE_BLEND_EQUATION_SUB)) 98 | 99 | template BGFX_STATE_BLEND_FUNC_RT_x*(src, dst: untyped): untyped = (0'u64 or (uint32((src) shr BGFX_STATE_BLEND_SHIFT) or (uint32((dst) shr BGFX_STATE_BLEND_SHIFT) shl 4))) 100 | 101 | template BGFX_STATE_BLEND_FUNC_RT_xE*(src, dst, equation: untyped): untyped = (0'u64 or BGFX_STATE_BLEND_FUNC_RT_x(src, dst) or (uint32((equation) shr BGFX_STATE_BLEND_EQUATION_SHIFT) shl 8)) 102 | 103 | template BGFX_STATE_BLEND_FUNC_RT_1*(src, dst: untyped): untyped = (BGFX_STATE_BLEND_FUNC_RT_x(src, dst) shl 0) 104 | 105 | template BGFX_STATE_BLEND_FUNC_RT_2*(src, dst: untyped): untyped = (BGFX_STATE_BLEND_FUNC_RT_x(src, dst) shl 11) 106 | 107 | template BGFX_STATE_BLEND_FUNC_RT_3*(src, dst: untyped): untyped = (BGFX_STATE_BLEND_FUNC_RT_x(src, dst) shl 22) 108 | 109 | template BGFX_STATE_BLEND_FUNC_RT_1E*(src, dst, equation: untyped): untyped = (BGFX_STATE_BLEND_FUNC_RT_xE(src, dst, equation) shl 0) 110 | 111 | template BGFX_STATE_BLEND_FUNC_RT_2E*(src, dst, equation: untyped): untyped = (BGFX_STATE_BLEND_FUNC_RT_xE(src, dst, equation) shl 11) 112 | 113 | template BGFX_STATE_BLEND_FUNC_RT_3E*(src, dst, equation: untyped): untyped = (BGFX_STATE_BLEND_FUNC_RT_xE(src, dst, equation) shl 22) 114 | 115 | const 116 | BGFX_STENCIL_FUNC_REF_SHIFT* = 0'u32 117 | BGFX_STENCIL_FUNC_REF_MASK* = 0x000000FF'u32 # 118 | BGFX_STENCIL_FUNC_RMASK_SHIFT* = 8'u32 119 | BGFX_STENCIL_FUNC_RMASK_MASK* = 0x0000FF00'u32 # 120 | BGFX_STENCIL_TEST_LESS* = 0x00010000'u32 # Enable stencil test, less. 121 | BGFX_STENCIL_TEST_LEQUAL* = 0x00020000'u32 # 122 | BGFX_STENCIL_TEST_EQUAL* = 0x00030000'u32 # 123 | BGFX_STENCIL_TEST_GEQUAL* = 0x00040000'u32 # 124 | BGFX_STENCIL_TEST_GREATER* = 0x00050000'u32 # 125 | BGFX_STENCIL_TEST_NOTEQUAL* = 0x00060000'u32 # 126 | BGFX_STENCIL_TEST_NEVER* = 0x00070000'u32 # 127 | BGFX_STENCIL_TEST_ALWAYS* = 0x00080000'u32 # 128 | BGFX_STENCIL_TEST_SHIFT* = 16'u32 129 | BGFX_STENCIL_TEST_MASK* = 0x000F0000'u32 # Stencil test bit mask. 130 | BGFX_STENCIL_OP_FAIL_S_ZERO* = 0x00000000'u32 # Zero. 131 | BGFX_STENCIL_OP_FAIL_S_KEEP* = 0x00100000'u32 # Keep. 132 | BGFX_STENCIL_OP_FAIL_S_REPLACE* = 0x00200000'u32 # Replace. 133 | BGFX_STENCIL_OP_FAIL_S_INCR* = 0x00300000'u32 # Increment and wrap. 134 | BGFX_STENCIL_OP_FAIL_S_INCRSAT* = 0x00400000'u32 # Increment and clamp. 135 | BGFX_STENCIL_OP_FAIL_S_DECR* = 0x00500000'u32 # Decrement and wrap. 136 | BGFX_STENCIL_OP_FAIL_S_DECRSAT* = 0x00600000'u32 # Decrement and clamp. 137 | BGFX_STENCIL_OP_FAIL_S_INVERT* = 0x00700000'u32 # Invert. 138 | BGFX_STENCIL_OP_FAIL_S_SHIFT* = 20'u32 139 | BGFX_STENCIL_OP_FAIL_S_MASK* = 0x00F00000'u32 # Stencil operation fail bit mask. 140 | BGFX_STENCIL_OP_FAIL_Z_ZERO* = 0x00000000'u32 # 141 | BGFX_STENCIL_OP_FAIL_Z_KEEP* = 0x01000000'u32 # 142 | BGFX_STENCIL_OP_FAIL_Z_REPLACE* = 0x02000000'u32 # 143 | BGFX_STENCIL_OP_FAIL_Z_INCR* = 0x03000000'u32 # 144 | BGFX_STENCIL_OP_FAIL_Z_INCRSAT* = 0x04000000'u32 # 145 | BGFX_STENCIL_OP_FAIL_Z_DECR* = 0x05000000'u32 # 146 | BGFX_STENCIL_OP_FAIL_Z_DECRSAT* = 0x06000000'u32 # 147 | BGFX_STENCIL_OP_FAIL_Z_INVERT* = 0x07000000'u32 # 148 | BGFX_STENCIL_OP_FAIL_Z_SHIFT* = 24'u32 149 | BGFX_STENCIL_OP_FAIL_Z_MASK* = 0x0F000000'u32 # Stencil operation fail depth bit mask. 150 | BGFX_STENCIL_OP_PASS_Z_ZERO* = 0x00000000'u32 # 151 | BGFX_STENCIL_OP_PASS_Z_KEEP* = 0x10000000'u32 # 152 | BGFX_STENCIL_OP_PASS_Z_REPLACE* = 0x20000000'u32 # 153 | BGFX_STENCIL_OP_PASS_Z_INCR* = 0x30000000'u32 # 154 | BGFX_STENCIL_OP_PASS_Z_INCRSAT* = 0x40000000'u32 # 155 | BGFX_STENCIL_OP_PASS_Z_DECR* = 0x50000000'u32 # 156 | BGFX_STENCIL_OP_PASS_Z_DECRSAT* = 0x60000000'u32 # 157 | BGFX_STENCIL_OP_PASS_Z_INVERT* = 0x70000000'u32 # 158 | BGFX_STENCIL_OP_PASS_Z_SHIFT* = 28'u32 159 | BGFX_STENCIL_OP_PASS_Z_MASK* = 0xF0000000'u32 # Stencil operation pass depth bit mask. 160 | BGFX_STENCIL_NONE* = 0x00000000'u32 # 161 | BGFX_STENCIL_MASK* = 0xFFFFFFFF'u32 # 162 | BGFX_STENCIL_DEFAULT* = 0x00000000'u32 # 163 | 164 | template BGFX_STENCIL_FUNC_REF*(refer: untyped): untyped = ((uint32(refer) shl BGFX_STENCIL_FUNC_REF_SHIFT) and BGFX_STENCIL_FUNC_REF_MASK) 165 | 166 | template BGFX_STENCIL_FUNC_RMASK*(mask: untyped): untyped = ((uint32(mask) shl BGFX_STENCIL_FUNC_RMASK_SHIFT) and BGFX_STENCIL_FUNC_RMASK_MASK) 167 | 168 | const 169 | BGFX_CLEAR_NONE* = 0x0000'u16 # No clear flags. 170 | BGFX_CLEAR_COLOR* = 0x0001'u16 # Clear color. 171 | BGFX_CLEAR_DEPTH* = 0x0002'u16 # Clear depth. 172 | BGFX_CLEAR_STENCIL* = 0x0004'u16 # Clear stencil. 173 | BGFX_CLEAR_DISCARD_COLOR_0* = 0x0008'u16 # Discard frame buffer attachment 0. 174 | BGFX_CLEAR_DISCARD_COLOR_1* = 0x0010'u16 # Discard frame buffer attachment 1. 175 | BGFX_CLEAR_DISCARD_COLOR_2* = 0x0020'u16 # Discard frame buffer attachment 2. 176 | BGFX_CLEAR_DISCARD_COLOR_3* = 0x0040'u16 # Discard frame buffer attachment 3. 177 | BGFX_CLEAR_DISCARD_COLOR_4* = 0x0080'u16 # Discard frame buffer attachment 4. 178 | BGFX_CLEAR_DISCARD_COLOR_5* = 0x0100'u16 # Discard frame buffer attachment 5. 179 | BGFX_CLEAR_DISCARD_COLOR_6* = 0x0200'u16 # Discard frame buffer attachment 6. 180 | BGFX_CLEAR_DISCARD_COLOR_7* = 0x0400'u16 # Discard frame buffer attachment 7. 181 | BGFX_CLEAR_DISCARD_DEPTH* = 0x0800'u16 # Discard frame buffer depth attachment. 182 | BGFX_CLEAR_DISCARD_STENCIL* = 0x1000'u16 # Discard frame buffer stencil attachment. 183 | BGFX_CLEAR_DISCARD_COLOR_MASK* = (0'u16 or BGFX_CLEAR_DISCARD_COLOR_0 or BGFX_CLEAR_DISCARD_COLOR_1 or BGFX_CLEAR_DISCARD_COLOR_2 or BGFX_CLEAR_DISCARD_COLOR_3 or BGFX_CLEAR_DISCARD_COLOR_4 or BGFX_CLEAR_DISCARD_COLOR_5 or BGFX_CLEAR_DISCARD_COLOR_6 or BGFX_CLEAR_DISCARD_COLOR_7) 184 | BGFX_CLEAR_DISCARD_MASK* = (0'u16 or BGFX_CLEAR_DISCARD_COLOR_MASK or BGFX_CLEAR_DISCARD_DEPTH or BGFX_CLEAR_DISCARD_STENCIL) 185 | BGFX_DEBUG_NONE* = 0x0000'u16 # No debug. 186 | BGFX_DEBUG_WIREFRAME* = 0x0001'u16 # Enable wireframe for all primitives. 187 | BGFX_DEBUG_IFH* = 0x0002'u16 # Enable infinitely fast hardware test. No draw calls will be submitted to driver. It’s useful when profiling to quickly assess bottleneck between CPU and GPU. 188 | BGFX_DEBUG_STATS* = 0x0004'u16 # Enable statistics display. 189 | BGFX_DEBUG_TEXT* = 0x0008'u16 # Enable debug text display. 190 | 191 | const 192 | BGFX_BUFFER_NONE* = 0x0000'u16 # 193 | BGFX_BUFFER_COMPUTE_FORMAT_8x1* = 0x0001'u16 # 194 | BGFX_BUFFER_COMPUTE_FORMAT_8x2* = 0x0002'u16 # 195 | BGFX_BUFFER_COMPUTE_FORMAT_8x4* = 0x0003'u16 # 196 | BGFX_BUFFER_COMPUTE_FORMAT_16x1* = 0x0004'u16 # 197 | BGFX_BUFFER_COMPUTE_FORMAT_16x2* = 0x0005'u16 # 198 | BGFX_BUFFER_COMPUTE_FORMAT_16x4* = 0x0006'u16 # 199 | BGFX_BUFFER_COMPUTE_FORMAT_32x1* = 0x0007'u16 # 200 | BGFX_BUFFER_COMPUTE_FORMAT_32x2* = 0x0008'u16 # 201 | BGFX_BUFFER_COMPUTE_FORMAT_32x4* = 0x0009'u16 # 202 | BGFX_BUFFER_COMPUTE_FORMAT_SHIFT* = 0'u16 203 | BGFX_BUFFER_COMPUTE_FORMAT_MASK* = 0x000F'u16 # 204 | BGFX_BUFFER_COMPUTE_TYPE_UINT* = 0x0010'u16 # 205 | BGFX_BUFFER_COMPUTE_TYPE_INT* = 0x0020'u16 # 206 | BGFX_BUFFER_COMPUTE_TYPE_FLOAT* = 0x0030'u16 # 207 | BGFX_BUFFER_COMPUTE_TYPE_SHIFT* = 4'u16 208 | BGFX_BUFFER_COMPUTE_TYPE_MASK* = 0x0030'u16 # 209 | BGFX_BUFFER_COMPUTE_READ* = 0x0100'u16 # Buffer will be read by shader. 210 | BGFX_BUFFER_COMPUTE_WRITE* = 0x0200'u16 # Buffer will be used for writing. 211 | BGFX_BUFFER_DRAW_INDIRECT* = 0x0400'u16 # Buffer will be used for storing draw indirect commands. 212 | BGFX_BUFFER_ALLOW_RESIZE* = 0x0800'u16 # 213 | BGFX_BUFFER_INDEX32* = 0x1000'u16 # 214 | BGFX_BUFFER_COMPUTE_READ_WRITE* = (0'u16 or BGFX_BUFFER_COMPUTE_READ or BGFX_BUFFER_COMPUTE_WRITE) 215 | 216 | const 217 | BGFX_TEXTURE_NONE* = 0x00000000'u32 # 218 | BGFX_TEXTURE_U_MIRROR* = 0x00000001'u32 # 219 | BGFX_TEXTURE_U_CLAMP* = 0x00000002'u32 # 220 | BGFX_TEXTURE_U_BORDER* = 0x00000003'u32 # 221 | BGFX_TEXTURE_U_SHIFT* = 0'u32 222 | BGFX_TEXTURE_U_MASK* = 0x00000003'u32 # 223 | BGFX_TEXTURE_V_MIRROR* = 0x00000004'u32 # 224 | BGFX_TEXTURE_V_CLAMP* = 0x00000008'u32 # 225 | BGFX_TEXTURE_V_BORDER* = 0x0000000C'u32 # 226 | BGFX_TEXTURE_V_SHIFT* = 2'u32 227 | BGFX_TEXTURE_V_MASK* = 0x0000000C'u32 # 228 | BGFX_TEXTURE_W_MIRROR* = 0x00000010'u32 # 229 | BGFX_TEXTURE_W_CLAMP* = 0x00000020'u32 # 230 | BGFX_TEXTURE_W_BORDER* = 0x00000030'u32 # 231 | BGFX_TEXTURE_W_SHIFT* = 4'u32 232 | BGFX_TEXTURE_W_MASK* = 0x00000030'u32 # 233 | BGFX_TEXTURE_MIN_POINT* = 0x00000040'u32 # 234 | BGFX_TEXTURE_MIN_ANISOTROPIC* = 0x00000080'u32 # 235 | BGFX_TEXTURE_MIN_SHIFT* = 6'u32 236 | BGFX_TEXTURE_MIN_MASK* = 0x000000C0'u32 # 237 | BGFX_TEXTURE_MAG_POINT* = 0x00000100'u32 # 238 | BGFX_TEXTURE_MAG_ANISOTROPIC* = 0x00000200'u32 # 239 | BGFX_TEXTURE_MAG_SHIFT* = 8'u32 240 | BGFX_TEXTURE_MAG_MASK* = 0x00000300'u32 # 241 | BGFX_TEXTURE_MIP_POINT* = 0x00000400'u32 # 242 | BGFX_TEXTURE_MIP_SHIFT* = 10'u32 243 | BGFX_TEXTURE_MIP_MASK* = 0x00000400'u32 # 244 | BGFX_TEXTURE_MSAA_SAMPLE* = 0x00000800'u32 # 245 | BGFX_TEXTURE_RT* = 0x00001000'u32 # 246 | BGFX_TEXTURE_RT_MSAA_X2* = 0x00002000'u32 # 247 | BGFX_TEXTURE_RT_MSAA_X4* = 0x00003000'u32 # 248 | BGFX_TEXTURE_RT_MSAA_X8* = 0x00004000'u32 # 249 | BGFX_TEXTURE_RT_MSAA_X16* = 0x00005000'u32 # 250 | BGFX_TEXTURE_RT_MSAA_SHIFT* = 12'u32 251 | BGFX_TEXTURE_RT_MSAA_MASK* = 0x00007000'u32 # 252 | BGFX_TEXTURE_RT_WRITE_ONLY* = 0x00008000'u32 # 253 | BGFX_TEXTURE_RT_MASK* = 0x0000F000'u32 # 254 | BGFX_TEXTURE_COMPARE_LESS* = 0x00010000'u32 # 255 | BGFX_TEXTURE_COMPARE_LEQUAL* = 0x00020000'u32 # 256 | BGFX_TEXTURE_COMPARE_EQUAL* = 0x00030000'u32 # 257 | BGFX_TEXTURE_COMPARE_GEQUAL* = 0x00040000'u32 # 258 | BGFX_TEXTURE_COMPARE_GREATER* = 0x00050000'u32 # 259 | BGFX_TEXTURE_COMPARE_NOTEQUAL* = 0x00060000'u32 # 260 | BGFX_TEXTURE_COMPARE_NEVER* = 0x00070000'u32 # 261 | BGFX_TEXTURE_COMPARE_ALWAYS* = 0x00080000'u32 # 262 | BGFX_TEXTURE_COMPARE_SHIFT* = 16'u32 263 | BGFX_TEXTURE_COMPARE_MASK* = 0x000F0000'u32 # 264 | BGFX_TEXTURE_COMPUTE_WRITE* = 0x00100000'u32 # 265 | BGFX_TEXTURE_SRGB* = 0x00200000'u32 # 266 | BGFX_TEXTURE_BLIT_DST* = 0x00400000'u32 # 267 | BGFX_TEXTURE_READ_BACK* = 0x00800000'u32 # 268 | BGFX_TEXTURE_BORDER_COLOR_SHIFT* = 24'u32 269 | BGFX_TEXTURE_BORDER_COLOR_MASK* = 0x0F000000'u32 # 270 | BGFX_TEXTURE_RESERVED_SHIFT* = 28'u32 271 | BGFX_TEXTURE_RESERVED_MASK* = 0xF0000000'u32 # 272 | 273 | template BGFX_TEXTURE_BORDER_COLOR*(index: untyped): untyped = ((index shl BGFX_TEXTURE_BORDER_COLOR_SHIFT) and BGFX_TEXTURE_BORDER_COLOR_MASK) 274 | 275 | const BGFX_TEXTURE_SAMPLER_BITS_MASK* = (0'u32 or BGFX_TEXTURE_U_MASK or BGFX_TEXTURE_V_MASK or BGFX_TEXTURE_W_MASK or BGFX_TEXTURE_MIN_MASK or BGFX_TEXTURE_MAG_MASK or BGFX_TEXTURE_MIP_MASK or BGFX_TEXTURE_COMPARE_MASK) 276 | 277 | const 278 | BGFX_RESET_NONE* = 0x00000000'u32 # No reset flags. 279 | BGFX_RESET_FULLSCREEN* = 0x00000001'u32 # Not supported yet. 280 | BGFX_RESET_FULLSCREEN_SHIFT* = 0'u32 281 | BGFX_RESET_FULLSCREEN_MASK* = 0x00000001'u32 # Fullscreen bit mask. 282 | BGFX_RESET_MSAA_X2* = 0x00000010'u32 # Enable 2x MSAA. 283 | BGFX_RESET_MSAA_X4* = 0x00000020'u32 # Enable 4x MSAA. 284 | BGFX_RESET_MSAA_X8* = 0x00000030'u32 # Enable 8x MSAA. 285 | BGFX_RESET_MSAA_X16* = 0x00000040'u32 # Enable 16x MSAA. 286 | BGFX_RESET_MSAA_SHIFT* = 4'u32 287 | BGFX_RESET_MSAA_MASK* = 0x00000070'u32 # MSAA mode bit mask. 288 | BGFX_RESET_VSYNC* = 0x00000080'u32 # Enable V-Sync. 289 | BGFX_RESET_MAXANISOTROPY* = 0x00000100'u32 # Turn on/off max anisotropy. 290 | BGFX_RESET_CAPTURE* = 0x00000200'u32 # Begin screen capture. 291 | BGFX_RESET_HMD* = 0x00000400'u32 # HMD stereo rendering. 292 | BGFX_RESET_HMD_DEBUG* = 0x00000800'u32 # HMD stereo rendering debug mode. 293 | BGFX_RESET_HMD_RECENTER* = 0x00001000'u32 # HMD calibration. 294 | BGFX_RESET_FLUSH_AFTER_RENDER* = 0x00002000'u32 # Flush rendering after submitting to GPU. 295 | BGFX_RESET_FLIP_AFTER_RENDER* = 0x00004000'u32 # This flag specifies where flip occurs. Default behavior is that flip occurs before rendering new frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`. 296 | BGFX_RESET_SRGB_BACKBUFFER* = 0x00008000'u32 # Enable sRGB backbuffer. 297 | BGFX_RESET_HIDPI* = 0x00010000'u32 # Enable HiDPI rendering. 298 | BGFX_RESET_DEPTH_CLAMP* = 0x00020000'u32 # Enable depth clamp. 299 | BGFX_RESET_SUSPEND* = 0x00040000'u32 # Suspend rendering. 300 | BGFX_RESET_RESERVED_SHIFT* = 31'u32 301 | BGFX_RESET_RESERVED_MASK* = 0x80000000'u32 # Internal bits mask. 302 | 303 | const 304 | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL* = 0x0000000000000001'u64 # Texture compare less equal mode is supported. 305 | BGFX_CAPS_TEXTURE_COMPARE_ALL* = 0x0000000000000003'u64 # All texture compare modes are supported. 306 | BGFX_CAPS_TEXTURE_3D* = 0x0000000000000004'u64 # 3D textures are supported. 307 | BGFX_CAPS_VERTEX_ATTRIB_HALF* = 0x0000000000000008'u64 # Vertex attribute half-float is supported. 308 | BGFX_CAPS_VERTEX_ATTRIB_UINT10* = 0x0000000000000010'u64 # Vertex attribute 10_10_10_2 is supported. 309 | BGFX_CAPS_INSTANCING* = 0x0000000000000020'u64 # Instancing is supported. 310 | BGFX_CAPS_RENDERER_MULTITHREADED* = 0x0000000000000040'u64 # Renderer is on separate thread. 311 | BGFX_CAPS_FRAGMENT_DEPTH* = 0x0000000000000080'u64 # Fragment depth is accessible in fragment shader. 312 | BGFX_CAPS_BLEND_INDEPENDENT* = 0x0000000000000100'u64 # Blend independent is supported. 313 | BGFX_CAPS_COMPUTE* = 0x0000000000000200'u64 # Compute shaders are supported. 314 | BGFX_CAPS_FRAGMENT_ORDERING* = 0x0000000000000400'u64 # Fragment ordering is available in fragment shader. 315 | BGFX_CAPS_SWAP_CHAIN* = 0x0000000000000800'u64 # Multiple windows are supported. 316 | BGFX_CAPS_HMD* = 0x0000000000001000'u64 # Head Mounted Display is available. 317 | BGFX_CAPS_INDEX32* = 0x0000000000002000'u64 # 32-bit indices are supported. 318 | BGFX_CAPS_DRAW_INDIRECT* = 0x0000000000004000'u64 # Draw indirect is supported. 319 | BGFX_CAPS_HIDPI* = 0x0000000000008000'u64 # HiDPI rendering is supported. 320 | BGFX_CAPS_TEXTURE_BLIT* = 0x0000000000010000'u64 # Texture blit is supported. 321 | BGFX_CAPS_TEXTURE_READ_BACK* = 0x0000000000020000'u64 # Read-back texture is supported. 322 | BGFX_CAPS_OCCLUSION_QUERY* = 0x0000000000040000'u64 # Occlusion query is supported. 323 | BGFX_CAPS_ALPHA_TO_COVERAGE* = 0x0000000000080000'u64 # Alpha to coverage is supported. 324 | BGFX_CAPS_CONSERVATIVE_RASTER* = 0x0000000000100000'u64 # Conservative rasterization is supported. 325 | BGFX_CAPS_TEXTURE_2D_ARRAY* = 0x0000000000200000'u64 # 2D texture array is supported. 326 | BGFX_CAPS_TEXTURE_CUBE_ARRAY* = 0x0000000000400000'u64 # Cubemap texture array is supported. 327 | 328 | const 329 | BGFX_CAPS_FORMAT_TEXTURE_NONE* = 0x0000'u16 # Texture format is not supported. 330 | BGFX_CAPS_FORMAT_TEXTURE_2D* = 0x0001'u16 # Texture format is supported. 331 | BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB* = 0x0002'u16 # Texture as sRGB format is supported. 332 | BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED* = 0x0004'u16 # Texture format is emulated. 333 | BGFX_CAPS_FORMAT_TEXTURE_3D* = 0x0008'u16 # Texture format is supported. 334 | BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB* = 0x0010'u16 # Texture as sRGB format is supported. 335 | BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED* = 0x0020'u16 # Texture format is emulated. 336 | BGFX_CAPS_FORMAT_TEXTURE_CUBE* = 0x0040'u16 # Texture format is supported. 337 | BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB* = 0x0080'u16 # Texture as sRGB format is supported. 338 | BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED* = 0x0100'u16 # Texture format is emulated. 339 | BGFX_CAPS_FORMAT_TEXTURE_VERTEX* = 0x0200'u16 # Texture format can be used from vertex shader. 340 | BGFX_CAPS_FORMAT_TEXTURE_IMAGE* = 0x0400'u16 # Texture format can be used as image from compute shader. 341 | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER* = 0x0800'u16 # Texture format can be used as frame buffer. 342 | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA* = 0x1000'u16 # Texture format can be used as MSAA frame buffer. 343 | BGFX_CAPS_FORMAT_TEXTURE_MSAA* = 0x2000'u16 # Texture can be sampled as MSAA. 344 | BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN* = 0x4000'u16 # Texture format supports auto-generated mips. 345 | 346 | const 347 | BGFX_VIEW_NONE* = 0x00'u8 # 348 | BGFX_VIEW_STEREO* = 0x01'u8 # View will be rendered in stereo mode. 349 | 350 | const 351 | BGFX_SUBMIT_EYE_LEFT* = 0x01'u8 # Submit to left eye. 352 | BGFX_SUBMIT_EYE_RIGHT* = 0x02'u8 # Submit to right eye. 353 | BGFX_SUBMIT_EYE_MASK* = 0x03'u8 # 354 | BGFX_SUBMIT_EYE_FIRST* = BGFX_SUBMIT_EYE_LEFT 355 | BGFX_SUBMIT_RESERVED_SHIFT* = 7'u8 356 | BGFX_SUBMIT_RESERVED_MASK* = 0x80'u8 # Internal bits mask. 357 | 358 | const 359 | BGFX_PCI_ID_NONE* = 0x0000'u16 # Autoselect adapter. 360 | BGFX_PCI_ID_SOFTWARE_RASTERIZER* = 0x0001'u16 # Software rasterizer. 361 | BGFX_PCI_ID_AMD* = 0x1002'u16 # AMD adapter. 362 | BGFX_PCI_ID_INTEL* = 0x8086'u16 # Intel adapter. 363 | BGFX_PCI_ID_NVIDIA* = 0x10DE'u16 # nVidia adapter. 364 | 365 | const 366 | BGFX_HMD_NONE* = 0x00'u8 # None. 367 | BGFX_HMD_DEVICE_RESOLUTION* = 0x01'u8 # Has HMD native resolution. 368 | BGFX_HMD_RENDERING* = 0x02'u8 # Rendering to HMD. 369 | 370 | const 371 | BGFX_CUBE_MAP_POSITIVE_X* = 0x00000000'u32 # Cubemap +x. 372 | BGFX_CUBE_MAP_NEGATIVE_X* = 0x00000001'u32 # Cubemap -x. 373 | BGFX_CUBE_MAP_POSITIVE_Y* = 0x00000002'u32 # Cubemap +y. 374 | BGFX_CUBE_MAP_NEGATIVE_Y* = 0x00000003'u32 # Cubemap -y. 375 | BGFX_CUBE_MAP_POSITIVE_Z* = 0x00000004'u32 # Cubemap +z. 376 | BGFX_CUBE_MAP_NEGATIVE_Z* = 0x00000005'u32 # Cubemap -z. 377 | -------------------------------------------------------------------------------- /bgfx/platform.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Wrapper/binding for bgfx platform 4 | 5 | import types 6 | export types 7 | 8 | {.deadCodeElim: on.} 9 | 10 | when defined(BGFX_SHARED_LIB): 11 | {.pragma: BGFXImport, header: "", cdecl.} 12 | elif defined(BGFX_DYNAMIC_LIB): 13 | when defined(windows): 14 | {.pragma: BGFXImport, dynlib: "bgfx-shared-lib(Debug|Release).dll", cdecl.} 15 | elif defined(macosx): 16 | {.pragma: BGFXImport, dynlib: "libbgfx-shared-lib(Debug|Release).dylib", cdecl.} 17 | elif defined(linux): 18 | {.pragma: BGFXImport, dynlib: "libbgfx-shared-lib(Debug|Release).so", cdecl.} 19 | else: 20 | raise newException("Unsupported platform") 21 | else: 22 | {.pragma: BGFXImport, cdecl.} 23 | 24 | import defines, bgfx 25 | export defines 26 | 27 | type RenderFrameEnum* = enum 28 | RenderFrame_NoContext, 29 | RenderFrame_Render, 30 | RenderFrame_Exiting, 31 | RenderFrame_Count 32 | 33 | 34 | type PlatformData* {.importc: "bgfx_platform_data_t", header: "".} = object 35 | ndt* {.importc: "ndt".}: pointer 36 | nwh* {.importc: "nwh".}: pointer 37 | context* {.importc: "context".}: pointer 38 | backBuffer* {.importc: "backBuffer".}: pointer 39 | backBufferDS* {.importc: "backBufferDS".}: pointer 40 | session* {.importc: "session"}: pointer 41 | 42 | 43 | type InternalData* {.importc: "bgfx_internal_data_t", header: "".} = object 44 | caps* {.importc: "caps".}: ptr Caps 45 | context* {.importc: "context".}: pointer 46 | 47 | when defined(BGFX_SHARED_LIB) or defined(BGFX_BUILD_LIB): 48 | proc Begin*(decl: ptr VertexDecl, renderer: RendererType = RendererType_Noop) = 49 | {.emit: "bgfx_vertex_decl_begin(`decl`, `renderer`);".} 50 | 51 | proc RenderFrame*(): RenderFrameEnum {.discardable.} = 52 | {.emit: "return bgfx_render_frame();".} 53 | proc SetPlatformData*(data: ptr PlatformData) = 54 | {.emit: "bgfx_set_platform_data(`data`);".} 55 | proc GetInternalData*(): ptr InternalData {.BGFXImport.} = 56 | {.emit: "return bgfx_get_internal_data();".} 57 | proc OverrideInternal*(handle: TextureHandle, pntr: pointer): pointer {.BGFXImport.} = 58 | {.emit: "return bgfx_override_internal_texture_ptr(`handle`, `pntr`);".} 59 | proc OverrideInternal*(handle: TextureHandle, width, height: uint16_t, numMips: uint8_t, format: TextureFormat, flags: uint32_t = BGFX_TEXTURE_NONE): pointer {.BGFXImport.} = 60 | {.emit: "return bgfx_override_internal_texture(`handle`, `width`, `height`, `numMips`, `format`, `flags`);".} 61 | else: 62 | proc RenderFrame*(): RenderFrameEnum {.BGFXImport, discardable, importc: "bgfx_render_frame".} 63 | proc SetPlatformData*(data: ptr PlatformData) {.BGFXImport, importc: "bgfx_set_platform_data".} 64 | proc GetInternalData*(): ptr InternalData {.BGFXImport, importc: "bgfx_get_internal_data".} 65 | proc OverrideInternal*(handle: TextureHandle, pntr: pointer): pointer {.BGFXImport, importc: "bgfx_override_internal_texture_ptr".} 66 | proc OverrideInternal*(handle: TextureHandle, width, height: uint16_t, numMips: uint8_t, format: TextureFormat, flags: uint32_t = BGFX_TEXTURE_NONE): pointer {.BGFXImport, importc: "bgfx_override_internal_texture".} 67 | -------------------------------------------------------------------------------- /bgfx/types.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Wrapper/binding for bgfx types 4 | 5 | type va_list* {.importc,header:"".} = object 6 | 7 | type 8 | uint64_t* {.importc,header:"".} = uint64 9 | uint32_t* {.importc,header:"".} = uint32 10 | uint16_t* {.importc,header:"".} = uint16 11 | uint8_t* {.importc,header:"".} = uint8 12 | 13 | int64_t* {.importc,header:"".} = int64 14 | int32_t* {.importc,header:"".} = int32 15 | int16_t* {.importc,header:"".} = int16 16 | int8_t* {.importc,header:"".} = int8 17 | 18 | 19 | type Fatal* {.importc: "bgfx_fatal_t", header: "".} = enum 20 | Fatal_DebugCheck 21 | Fatal_InvalidShader 22 | Fatal_UnableToInitialize 23 | Fatal_UnableToCreateTexture 24 | Fatal_DeviceLost 25 | Fatal_Count 26 | 27 | type RendererType* {.importc: "bgfx_renderer_type_t", header: "".} = enum 28 | RendererType_Noop 29 | RendererType_Direct3D9 30 | RendererType_Direct3D11 31 | RendererType_Direct3D12 32 | RendererType_Gnm 33 | RendererType_Metal 34 | RendererType_OpenGLES 35 | RendererType_OpenGL 36 | RendererType_Vulkan 37 | RendererType_Count 38 | 39 | type Access* {.importc: "bgfx_access_t", header: "".} = enum 40 | Access_Read 41 | Access_Write 42 | Access_ReadWrite 43 | Access_Count 44 | 45 | type Attrib* {.importc: "bgfx_attrib_t", header: "".} = enum 46 | Attrib_Position # a_position 47 | Attrib_Normal # a_normal 48 | Attrib_Tangent # a_tangent 49 | Attrib_Bitangent # a_bitangent 50 | Attrib_Color0 # a_color0 51 | Attrib_Color1 # a_color1 52 | Attrib_Indices # a_indices 53 | Attrib_Weight # a_weight 54 | Attrib_TexCoord0 # a_texcoord0 55 | Attrib_TexCoord1 # a_texcoord1 56 | Attrib_TexCoord2 # a_texcoord2 57 | Attrib_TexCoord3 # a_texcoord3 58 | Attrib_TexCoord4 # a_texcoord4 59 | Attrib_TexCoord5 # a_texcoord5 60 | Attrib_TexCoord6 # a_texcoord6 61 | Attrib_TexCoord7 # a_texcoord7 62 | Attrib_Count 63 | 64 | type AttribType* {.importc: "bgfx_attrib_type_t", header: "".} = enum 65 | AttribType_Uint8 # Uint8 66 | AttribType_Uint10 # Uint10, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_UINT10`. 67 | AttribType_Int16 # Int16 68 | AttribType_Half # Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`. 69 | AttribType_Float # Float 70 | AttribType_Count 71 | 72 | type TextureFormat* {.importc: "bgfx_texture_format_t", header: "".} = enum 73 | TextureFormat_BC1 # DXT1 74 | TextureFormat_BC2 # DXT3 75 | TextureFormat_BC3 # DXT5 76 | TextureFormat_BC4 # LATC1/ATI1 77 | TextureFormat_BC5 # LATC2/ATI2 78 | TextureFormat_BC6H # BC6H 79 | TextureFormat_BC7 # BC7 80 | TextureFormat_ETC1 # ETC1 RGB8 81 | TextureFormat_ETC2 # ETC2 RGB8 82 | TextureFormat_ETC2A # ETC2 RGBA8 83 | TextureFormat_ETC2A1 # ETC2 RGB8A1 84 | TextureFormat_PTC12 # PVRTC1 RGB 2BPP 85 | TextureFormat_PTC14 # PVRTC1 RGB 4BPP 86 | TextureFormat_PTC12A # PVRTC1 RGBA 2BPP 87 | TextureFormat_PTC14A # PVRTC1 RGBA 4BPP 88 | TextureFormat_PTC22 # PVRTC2 RGBA 2BPP 89 | TextureFormat_PTC24 # PVRTC2 RGBA 4BPP 90 | # Compressed formats above. 91 | TextureFormat_Unknown 92 | TextureFormat_R1 93 | TextureFormat_A8 94 | TextureFormat_R8 95 | TextureFormat_R8I 96 | TextureFormat_R8U 97 | TextureFormat_R8S 98 | TextureFormat_R16 99 | TextureFormat_R16I 100 | TextureFormat_R16U 101 | TextureFormat_R16F 102 | TextureFormat_R16S 103 | TextureFormat_R32I 104 | TextureFormat_R32U 105 | TextureFormat_R32F 106 | TextureFormat_RG8 107 | TextureFormat_RG8I 108 | TextureFormat_RG8U 109 | TextureFormat_RG8S 110 | TextureFormat_RG16 111 | TextureFormat_RG16I 112 | TextureFormat_RG16U 113 | TextureFormat_RG16F 114 | TextureFormat_RG16S 115 | TextureFormat_RG32I 116 | TextureFormat_RG32U 117 | TextureFormat_RG32F 118 | TextureFormat_RGB8 119 | TextureFormat_RGB8I 120 | TextureFormat_RGB8U 121 | TextureFormat_RGB8S 122 | TextureFormat_RGB9E5F 123 | TextureFormat_BGRA8 124 | TextureFormat_RGBA8 125 | TextureFormat_RGBA8I 126 | TextureFormat_RGBA8U 127 | TextureFormat_RGBA8S 128 | TextureFormat_RGBA16 129 | TextureFormat_RGBA16I 130 | TextureFormat_RGBA16U 131 | TextureFormat_RGBA16F 132 | TextureFormat_RGBA16S 133 | TextureFormat_RGBA32I 134 | TextureFormat_RGBA32U 135 | TextureFormat_RGBA32F 136 | TextureFormat_R5G6B5 137 | TextureFormat_RGBA4 138 | TextureFormat_RGB5A1 139 | TextureFormat_RGB10A2 140 | TextureFormat_R11G11B10F 141 | TextureFormat_UnknownDepth 142 | # Depth formats below. 143 | TextureFormat_D16 144 | TextureFormat_D24 145 | TextureFormat_D24S8 146 | TextureFormat_D32 147 | TextureFormat_D16F 148 | TextureFormat_D24F 149 | TextureFormat_D32F 150 | TextureFormat_D0S8 151 | TextureFormat_Count 152 | 153 | type UniformType* {.importc: "bgfx_uniform_type_t", header: "".} = enum 154 | UniformType_Int1 155 | UniformType_End 156 | UniformType_Vec4 157 | UniformType_Mat3 158 | UniformType_Mat4 159 | UniformType_Count 160 | 161 | type BackbufferRatio* {.importc: "bgfx_backbuffer_ratio_t", header: "".} = enum 162 | BackbufferRatio_Equal # Equal to backbuffer. 163 | BackbufferRatio_Half # One half size of backbuffer. 164 | BackbufferRatio_Quarter # One quarter size of backbuffer. 165 | BackbufferRatio_Eighth # One eighth size of backbuffer. 166 | BackbufferRatio_Sixteenth # One sixteenth size of backbuffer. 167 | BackbufferRatio_Double # Double size of backbuffer. 168 | BackbufferRatio_Count 169 | 170 | type OcclusionQueryResult* {.importc: "bgfx_occlusion_query_result_t", header: "".} = enum 171 | OcclusionQueryResult_Invisible # Query failed test. 172 | OcclusionQueryResult_Visible # Query passed test. 173 | OcclusionQueryResult_NoResult # Query result is not available yet. 174 | OcclusionQueryResult_Count 175 | 176 | type TopologyConvert* {.importc: "bgfx_topology_convert_t", header: "".} = enum 177 | TopologyConvert_TriListFlipWinding # Flip winding order of triangle list. 178 | TopologyConvert_TriListToLineList # Convert triangle list to line list. 179 | TopologyConvert_TriStripToTriList # Convert triangle strip to triangle list. 180 | TopologyConvert_LineStripToLineList # Convert line strip to line list. 181 | TopologyConvert_Count 182 | 183 | type TopologySort* {.importc: "bgfx_topology_sort_t", header: "".} = enum 184 | TopologySort_DirectionFrontToBackMin # 185 | TopologySort_DirectionFrontToBackAvg # 186 | TopologySort_DirectionFrontToBackMax # 187 | TopologySort_DirectionBackToFrontMin # 188 | TopologySort_DirectionBackToFrontAvg # 189 | TopologySort_DirectionBackToFrontMax # 190 | TopologySort_DistanceFrontToBackMin # 191 | TopologySort_DistanceFrontToBackAvg # 192 | TopologySort_DistanceFrontToBackMax # 193 | TopologySort_DistanceBackToFrontMin # 194 | TopologySort_DistanceBackToFrontAvg # 195 | TopologySort_DistanceBackToFrontMax # 196 | TopologySort_Count 197 | 198 | const invalidHandle* = uint16.high 199 | 200 | type 201 | DynamicIndexBufferHandle* {.importc: "bgfx_dynamic_index_buffer_handle_t", header: "".} = object 202 | idx*: uint16_t 203 | DynamicVertexBufferHandle* {.importc: "bgfx_dynamic_vertex_buffer_handle_t", header: "".} = object 204 | idx*: uint16_t 205 | FrameBufferHandle* {.importc: "bgfx_frame_buffer_handle_t", header: "".} = object 206 | idx*: uint16_t 207 | IndexBufferHandle* {.importc: "bgfx_index_buffer_handle_t", header: "".} = object 208 | idx*: uint16_t 209 | IndirectBufferHandle* {.importc: "bgfx_indirect_buffer_handle_t", header: "".} = object 210 | idx*: uint16_t 211 | OcclusionQueryHandle* {.importc: "bgfx_occlusion_query_handle_t", header: "".} = object 212 | idx*: uint16_t 213 | ProgramHandle* {.importc: "bgfx_program_handle_t", header: "".} = object 214 | idx*: uint16_t 215 | ShaderHandle* {.importc: "bgfx_shader_handle_t", header: "".} = object 216 | idx*: uint16_t 217 | TextureHandle* {.importc: "bgfx_texture_handle_t", header: "".} = object 218 | idx*: uint16_t 219 | UniformHandle* {.importc: "bgfx_uniform_handle_t", header: "".} = object 220 | idx*: uint16_t 221 | VertexBufferHandle* {.importc: "bgfx_vertex_buffer_handle_t", header: "".} = object 222 | idx*: uint16_t 223 | VertexDeclHandle* {.importc: "bgfx_vertex_decl_handle_t", header: "".} = object 224 | idx*: uint16_t 225 | 226 | type 227 | CBFatalProc* = proc (this: ptr CallbackI; code: Fatal; str: cstring) 228 | CBTraceVargsProc* = proc (this: ptr CallbackI; filePath: cstring; line: uint16; format: cstring, argList: va_list) 229 | CBCacheReadSizeProc* = proc (this: ptr CallbackI; id: uint64): uint32 230 | CBCacheReadProc* = proc (this: ptr CallbackI; id: uint64; data: pointer; size: uint32): bool 231 | CBCacheWriteProc* = proc (this: ptr CallbackI; id: uint64; data: pointer; size: uint32) 232 | CBScreenShotProc* = proc (this: ptr CallbackI; filePath: cstring; width: uint32; height: uint32; pitch: uint32; data: pointer; size: uint32; yflip: bool) 233 | CBCaptureBegin* = proc (this: ptr CallbackI; width: uint32; height: uint32; pitch: uint32; format: TextureFormat; yflip: bool) 234 | CBCaptureEnd* = proc (this: ptr CallbackI) 235 | CBCaptureFrame* = proc (this: ptr CallbackI; data: pointer; size: uint32) 236 | CallbackVTable* {.importc: "bgfx_callback_vtbl_t", header: "".} = object 237 | fatal* {.importc: "fatal".}: pointer # CBFatalProc 238 | trace_vargs* {.importc: "trace_vargs".}: pointer # CBTraceVargsProc 239 | cache_read_size* {.importc: "cache_read_size".}: pointer # CBCacheReadSizeProc 240 | cache_read* {.importc: "cache_read".}: pointer # CBCacheReadProc 241 | cache_write* {.importc: "cache_write".}: pointer # CBCacheWriteProc 242 | screen_shot* {.importc: "screen_shot".}: pointer # CBScreenShotProc 243 | capture_begin* {.importc: "capture_begin".}: pointer # CBCaptureBegin 244 | capture_end* {.importc: "capture_end".}: pointer # CBCaptureEnd 245 | capture_frame* {.importc: "capture_frame".}: pointer # CBCaptureFrame 246 | CallbackI* {.importc: "bgfx_callback_interface_t", header: "".} = object 247 | vtbl* {.importc: "vtbl".}: ptr CallbackVTable 248 | 249 | type 250 | AllocatorVTable* {.importc: "bgfx_allocator_vtbl_t", header: "".} = object 251 | realloc* {.importc: "realloc".}: proc (this: ptr CallbackI; pntr: pointer, size: csize, align: csize, file: cstring, line: uint32_t) 252 | AllocatorI* {.importc: "bgfx_allocator_interface_t", header: "".} = object 253 | vtbl* {.importc: "vtbl".}: ptr CallbackVTable 254 | 255 | type ReleaseFn* {.importc: "bgfx_release_fn_t", header: "".} = proc(pointer, userData: pointer) 256 | 257 | type Memory* {.importc: "bgfx_memory_t", header: "".} = object 258 | data* {.importc: "data".}: ptr uint8_t 259 | size* {.importc: "size".}: uint32_t 260 | 261 | type CapsGPU* {.importc: "bgfx_caps_gpu_t", header: "".} = object 262 | vendorId* {.importc: "vendorId".}: uint16_t 263 | deviceId* {.importc: "deviceId".}: uint16_t 264 | 265 | type Limits* {.importc: "bgfx_caps_limits_t", header: "".} = object 266 | maxDrawCalls* {.importc: "maxDrawCalls".}: uint32_t 267 | maxBlits* {.importc: "maxBlits".}: uint32_t 268 | maxTextureSize* {.importc: "maxTextureSize".}: uint32_t 269 | maxViews* {.importc: "maxViews".}: uint32_t 270 | maxFrameBuffers* {.importc: "maxFrameBuffers".}: uint32_t 271 | maxFBAttachments* {.importc: "maxFBAttachments".}: uint32_t 272 | maxPrograms* {.importc: "maxPrograms".}: uint32_t 273 | maxShaders* {.importc: "maxShaders".}: uint32_t 274 | maxTextures* {.importc: "maxTextures".}: uint32_t 275 | maxTextureSamplers* {.importc: "maxTextureSamplers".}: uint32_t 276 | maxVertexDecls* {.importc: "maxVertexDecls".}: uint32_t 277 | maxVertexStreams* {.importc: "maxVertexStreams".}: uint32_t 278 | maxIndexBuffers* {.importc: "maxIndexBuffers".}: uint32_t 279 | maxVertexBuffers* {.importc: "maxVertexBuffers".}: uint32_t 280 | maxDynamicIndexBuffers* {.importc: "maxDynamicIndexBuffers".}: uint32_t 281 | maxDynamicVertexBuffers* {.importc: "maxDynamicVertexBuffers".}: uint32_t 282 | maxUniforms* {.importc: "maxUniforms".}: uint32_t 283 | maxOcclusionQueries* {.importc: "maxOcclusionQueries".}: uint32_t 284 | 285 | type Caps* {.importc: "bgfx_caps_t", header: "".} = object 286 | rendererType* {.importc: "rendererType".}: RendererType 287 | supported* {.importc: "supported".}: uint64_t 288 | vendorId* {.importc: "vendorId".}: uint16_t 289 | deviceId* {.importc: "deviceId".}: uint16_t 290 | homogeneousDepth* {.importc: "homogeneousDepth".}: bool 291 | originBottomLeft* {.importc: "originBottomLeft".}: bool 292 | numGPUs* {.importc: "numGPUs".}: uint8 293 | gpu* {.importc: "gpu".}: array[4, CapsGPU] 294 | limits* {.importc: "limits".}: Limits 295 | formats* {.importc: "formats".}: array[TextureFormat_Count, uint16_t] 296 | 297 | type TransientIndexBuffer* {.importc: "bgfx_transient_index_buffer_t", header: "".} = object 298 | data* {.importc: "data".}: ptr uint8_t 299 | size* {.importc: "size".}: uint32_t 300 | startIndex* {.importc: "startIndex".}: uint32_t 301 | handle* {.importc: "handle".}: IndexBufferHandle 302 | 303 | type TransientVertexBuffer* {.importc: "bgfx_transient_vertex_buffer_t", header: "".} = object 304 | data* {.importc: "data".}: ptr uint8_t 305 | size* {.importc: "size".}: uint32_t 306 | startVertex* {.importc: "startVertex".}: uint32_t 307 | stride* {.importc: "stride".}: uint16_t 308 | handle* {.importc: "handle".}: VertexBufferHandle 309 | decl* {.importc: "decl".}: VertexDeclHandle 310 | 311 | type InstanceDataBuffer* {.importc: "bgfx_instance_data_buffer_t", header: "".} = object 312 | data* {.importc: "data".}: ptr uint8_t 313 | size* {.importc: "size".}: uint32_t 314 | offset* {.importc: "offset".}: uint32_t 315 | num* {.importc: "num".}: uint32_t 316 | stride* {.importc: "stride".}: uint16_t 317 | handle* {.importc: "handle".}: VertexBufferHandle 318 | 319 | type TextureInfo* {.importc: "bgfx_texture_info_t", header: "".} = object 320 | format* {.importc: "format".}: TextureFormat 321 | storageSize* {.importc: "storageSize".}: uint32_t 322 | width* {.importc: "width".}: uint16_t 323 | height* {.importc: "height".}: uint16_t 324 | depth* {.importc: "depth".}: uint16_t 325 | numLayers* {.importc: "numLayers".}: uint16_t 326 | numMips* {.importc: "numMips".}: uint8_t 327 | bitsPerPixel* {.importc: "bitsPerPixel".}: uint8_t 328 | cubeMap* {.importc: "cubeMap".}: bool 329 | 330 | type UniformInfo* {.importc: "bgfx_uniform_info_t", header: "".} = object 331 | name* {.importc: "name".}: array[256, char] 332 | uniformType* {.importc: "type".}: UniformType 333 | size* {.importc: "num".}: uint16_t 334 | 335 | type Attachment* {.importc: "bgfx_attachment_t", header: "".} = object 336 | handle* {.importc: "handle".}: TextureHandle 337 | mip* {.importc: "mip".}: uint16_t 338 | layer* {.importc: "layer".}: uint16_t 339 | 340 | type Transform* {.importc: "bgfx_transform_t", header: "".} = object 341 | data* {.importc: "data".}: ptr cfloat 342 | size* {.importc: "num".}: uint32_t 343 | 344 | type HMDeye* {.importc: "bgfx_hmd_eye_t", header: "".} = object 345 | rotation* {.importc: "rotation".}: array[4, cfloat] 346 | translation* {.importc: "translation".}: array[3, cfloat] 347 | fov* {.importc: "fov".}: array[4, cfloat] 348 | viewOffset* {.importc: "viewOffset".}: array[3, cfloat] 349 | projection* {.importc: "projection".}: array[16, cfloat] 350 | pixelsPerTanAngle* {.importc: "pixelsPerTanAngle".}: array[2, cfloat] 351 | 352 | type HMD* {.importc: "bgfx_hmd_t", header: "".} = object 353 | eye* {.importc: "eye".}: array[2, HMDeye] 354 | width* {.importc: "width".}: uint16_t 355 | height* {.importc: "height".}: uint16_t 356 | deviceWidth* {.importc: "deviceWidth".}: uint32_t 357 | deviceHeight* {.importc: "deviceHeight".}: uint32_t 358 | flags* {.importc: "flags".}: uint8_t 359 | 360 | type Stats* {.importc: "bgfx_stats_t", header: "".} = object 361 | cpuTimeBegin* {.importc: "cpuTimeBegin".}: uint64_t 362 | cpuTimeEnd* {.importc: "cpuTimeEnd".}: uint64_t 363 | cpuTimerFreq* {.importc: "cpuTimerFreq".}: uint64_t 364 | gpuTimeBegin* {.importc: "gpuTimeBegin".}: uint64_t 365 | gpuTimeEnd* {.importc: "gpuTimeEnd".}: uint64_t 366 | gpuTimerFreq* {.importc: "gpuTimerFreq".}: uint64_t 367 | waitRender* {.importc: "waitRender".}: int64_t 368 | waitSubmit* {.importc: "waitSubmit".}: int64_t 369 | numDraw* {.importc: "numDraw"}: uint32_t 370 | numCompute* {.importc: "numCompute"}: uint32_t 371 | maxGpuLatency* {.importc: "maxGpuLatency"}: uint32_t 372 | width* {.importc: "width"}: uint16_t 373 | height* {.importc: "height"}: uint16_t 374 | textWidth* {.importc: "textWidth"}: uint16_t 375 | textHeight* {.importc: "textHeight".}: uint16_t 376 | 377 | type VertexDecl* {.importc: "bgfx_vertex_decl_t", header: "".} = object 378 | hash* {.importc: "hash".}: uint32_t 379 | stride* {.importc: "stride".}: uint16_t 380 | offset* {.importc: "offset".}: array[Attrib_Count, uint16_t] 381 | attributes* {.importc: "attributes".}: array[Attrib_Count, uint16_t] 382 | -------------------------------------------------------------------------------- /examples/00-HelloWorld/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.ndb 3 | *.dll 4 | *.bak 5 | *.so 6 | *.a 7 | *.dylib 8 | <<<<<<< HEAD 9 | *.so.* 10 | ======= 11 | *.a 12 | >>>>>>> 447c676b4a961a33aa3e5d08db914c8eb741e03a 13 | HelloWorld 14 | -------------------------------------------------------------------------------- /examples/00-HelloWorld/HelloWorld.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Port of bgfx helloworld example 00 to nim and nim-bgfx 4 | 5 | import bgfx.bgfx 6 | when defined(useSDL): 7 | import ../sdl_platform 8 | elif defined(useGLFW) or not defined(useSDL): 9 | import ../glfw_platform 10 | import parseopt2 11 | import strutils 12 | import locks 13 | import os 14 | include Logo 15 | 16 | proc `/`(x, y: uint16): uint16 = 17 | x div y 18 | 19 | type ExampleHelloWorld = ref object 20 | m_width*: uint32 21 | m_height*: uint32 22 | m_window_width*: uint32 23 | m_window_height*: uint32 24 | m_debug*: uint32 25 | m_reset*: uint32 26 | 27 | proc Start(self: ExampleHelloWorld) = 28 | 29 | var m_renderer_type = bgfx.RendererType.RendererType_Count 30 | var m_pciID = 0'u16 31 | 32 | self.m_width = 1280 33 | self.m_height = 720 34 | self.m_window_width = 1280 35 | self.m_window_height = 720 36 | self.m_debug = BGFX_DEBUG_TEXT #or BGFX_DEBUG_STATS 37 | self.m_reset = BGFX_RESET_VSYNC 38 | 39 | #Seperate Thread 40 | #bgfxplatform.RenderFrame() 41 | bgfx.Init(m_renderer_type, m_pciID, 0, nil, nil) 42 | bgfx.Reset(self.m_width, self.m_height, self.m_reset) 43 | 44 | # Enable Debug Text 45 | bgfx.SetDebug(self.m_debug) 46 | 47 | # Set view 0 clear state 48 | bgfx.SetViewClear(0, BGFX_CLEAR_COLOR or BGFX_CLEAR_DEPTH, 0x303030ff, 1.0, 0) 49 | 50 | proc CleanUp(self: ExampleHelloWorld) = 51 | bgfx.Shutdown() 52 | 53 | proc Update(self: ExampleHelloWorld) = 54 | # Set view 0 default viewport 55 | bgfx.SetViewRect(0, 0, 0, cast[uint16](self.m_width), cast[uint16](self.m_height)) 56 | 57 | # This dummy draw call is here to make sure that view 0 is cleared 58 | # if no other draw calls are submitted to view 0. 59 | bgfx.Touch(0) 60 | 61 | # Use debug font to print information about this example. 62 | bgfx.DebugTextClear() 63 | bgfx.DebugTextImage(max(cast[uint16](self.m_window_width) / 2'u16 / 8'u16, 20'u16) - 20'u16, 64 | max(cast[uint16](self.m_window_height) / 2'u16 / 16'u16, 6'u16) - 6'u16, 65 | 40, 66 | 12, 67 | s_logo.addr, 68 | 160 69 | ) 70 | bgfx.DebugTextPrintf(0, 1, 0x4f, "nim-bgfx/examples/00-HelloWorld") 71 | bgfx.DebugTextPrintf(0, 2, 0x6f, "Description: Initialization and debug text.") 72 | 73 | bgfx.DebugTextPrintf(0, 4, 0x0f, "Color can be changed with ANSI \x1b[9;me\x1b[10;ms\x1b[11;mc\x1b[12;ma\x1b[13;mp\x1b[14;me\x1b[0m code too.") 74 | 75 | bgfx.Frame() 76 | 77 | StartExample[ExampleHelloWorld]() 78 | -------------------------------------------------------------------------------- /examples/00-HelloWorld/HelloWorld.nim.cfg: -------------------------------------------------------------------------------- 1 | --define:BGFX_BUILD_LIB 2 | --define:useGLFW 3 | --debuginfo 4 | --stackTrace:on 5 | --lineTrace:on 6 | --debugger:native 7 | --clibdir:"/usr/local/lib" 8 | --passC:"-o2" 9 | 10 | -------------------------------------------------------------------------------- /examples/00-HelloWorld/HelloWorld.nimble: -------------------------------------------------------------------------------- 1 | # Package 2 | version = "0.1.0" 3 | author = "Cory Noll Crimmins - Golden" 4 | description = "Hello world example for nim-bgfx" 5 | license = "BSD" 6 | bin = @["HelloWorld"] 7 | backend = "c" 8 | 9 | # Dependencies 10 | requires "bgfx >= 0.1.0" 11 | requires "nim >= 0.14.2" 12 | requires "glfw >= 3.2.0" 13 | requires "sdl2_nim >= 0.96" 14 | requires "x11 >= 1.0" 15 | -------------------------------------------------------------------------------- /examples/00-HelloWorld/Logo.nim: -------------------------------------------------------------------------------- 1 | 2 | var s_logo: array[4000, uint8] = [ 3 | 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # ........ . . . . 4 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 5 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdc'u8, 0x08'u8, # . . . . . . ... 6 | 0xdc'u8, 0x03'u8, 0xdc'u8, 0x07'u8, 0xdc'u8, 0x07'u8, 0xdc'u8, 0x08'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # ........ . . . . 7 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 8 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 9 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 10 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 11 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 12 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 13 | 0xde'u8, 0x03'u8, 0xb0'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb2'u8, 0x3b'u8, 0xdb'u8, 0x3b'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # ...;.;.;.; . . . 14 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 15 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdc'u8, 0x03'u8, 0xb1'u8, 0x3b'u8, 0xb2'u8, 0x3b'u8, # . . . . ....;.; 16 | 0xdb'u8, 0x3b'u8, 0xdf'u8, 0x03'u8, 0xdf'u8, 0x3b'u8, 0xb2'u8, 0x3f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # .;...;.? . . . . 17 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 18 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 19 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 20 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 21 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 22 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 23 | 0x20'u8, 0x0f'u8, 0xb1'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb2'u8, 0x3b'u8, 0xb2'u8, 0x3f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # ..;.;.;.? . . . 24 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 25 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xb1'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb2'u8, 0x3b'u8, # . . . . ..;.;.; 26 | 0xb2'u8, 0x3f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdf'u8, 0x03'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # .? . ... . . . . 27 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 28 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 29 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 30 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 31 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 32 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 33 | 0x20'u8, 0x0f'u8, 0xb1'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb1'u8, 0x3f'u8, 0xdc'u8, 0x0b'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, # ..;.;.;.?...... 34 | 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdc'u8, 0x08'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, # .... . ......... 35 | 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x08'u8, 0x20'u8, 0x0f'u8, 0xb1'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, # ........ ..;.;.; 36 | 0xb1'u8, 0x3f'u8, 0xb1'u8, 0x3f'u8, 0xb2'u8, 0x0b'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, # .?.?.. . ....... 37 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0xdc'u8, 0x03'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x01'u8, 0x20'u8, 0x0f'u8, # . ....... . . . 38 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 39 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 40 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 41 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 42 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 43 | 0x20'u8, 0x0f'u8, 0xb2'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb0'u8, 0x3b'u8, 0xb0'u8, 0x3f'u8, 0x20'u8, 0x0f'u8, 0xde'u8, 0x03'u8, 0xb0'u8, 0x3f'u8, # ..;.;.;.? ....? 44 | 0xb1'u8, 0x3f'u8, 0xb2'u8, 0x3f'u8, 0xdd'u8, 0x03'u8, 0xde'u8, 0x03'u8, 0xdb'u8, 0x03'u8, 0xdb'u8, 0x03'u8, 0xb2'u8, 0x3f'u8, 0x20'u8, 0x0f'u8, # .?.?.........? . 45 | 0x20'u8, 0x0f'u8, 0xb0'u8, 0x3f'u8, 0xb1'u8, 0x3f'u8, 0xb2'u8, 0x3f'u8, 0xde'u8, 0x38'u8, 0xb2'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb0'u8, 0x3b'u8, # ..?.?.?.8.;.;.; 46 | 0xb0'u8, 0x3f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xb0'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb2'u8, 0x3b'u8, 0xb2'u8, 0x3f'u8, # .? . . ..;.;.;.? 47 | 0xdd'u8, 0x03'u8, 0xde'u8, 0x03'u8, 0xb0'u8, 0x3f'u8, 0xb1'u8, 0x3f'u8, 0xb2'u8, 0x3f'u8, 0xdd'u8, 0x03'u8, 0x20'u8, 0x01'u8, 0x20'u8, 0x0f'u8, # .....?.?.?.. . . 48 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 49 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 50 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 51 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 52 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 53 | 0x20'u8, 0x0f'u8, 0xb2'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb0'u8, 0x3b'u8, 0xb0'u8, 0x3f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdb'u8, 0x03'u8, # ..;.;.;.? . ... 54 | 0xb0'u8, 0x3f'u8, 0xb1'u8, 0x3f'u8, 0xdd'u8, 0x03'u8, 0xb1'u8, 0x3b'u8, 0xb0'u8, 0x3b'u8, 0xdb'u8, 0x03'u8, 0xb1'u8, 0x3f'u8, 0x20'u8, 0x0f'u8, # .?.?...;.;...? . 55 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x3f'u8, 0xb0'u8, 0x3f'u8, 0xb1'u8, 0x3f'u8, 0xb0'u8, 0x3b'u8, 0xb2'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb0'u8, 0x3b'u8, # . ?.?.?.;.;.;.; 56 | 0xb0'u8, 0x3f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdc'u8, 0x08'u8, 0xdc'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb1'u8, 0x3f'u8, # .? . . ....;.;.? 57 | 0xb1'u8, 0x3b'u8, 0xb0'u8, 0x3b'u8, 0xb2'u8, 0x3b'u8, 0xb0'u8, 0x3f'u8, 0xdc'u8, 0x03'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x01'u8, 0x20'u8, 0x0f'u8, # .;.;.;.?.. . . . 58 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 59 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 60 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 61 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 62 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 63 | 0x20'u8, 0x0f'u8, 0xb2'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb0'u8, 0x3b'u8, 0xb0'u8, 0x3f'u8, 0xdc'u8, 0x0b'u8, 0xdc'u8, 0x07'u8, 0xdb'u8, 0x03'u8, # ..;.;.;.?...... 64 | 0xdb'u8, 0x03'u8, 0xdc'u8, 0x38'u8, 0x20'u8, 0x0f'u8, 0xdf'u8, 0x03'u8, 0xb1'u8, 0x3b'u8, 0xb0'u8, 0x3b'u8, 0xb0'u8, 0x3f'u8, 0xdc'u8, 0x03'u8, # ...8 ....;.;.?.. 65 | 0xdc'u8, 0x07'u8, 0xb0'u8, 0x3f'u8, 0xb1'u8, 0x3f'u8, 0xb2'u8, 0x3f'u8, 0xdd'u8, 0x3b'u8, 0xb2'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xdc'u8, 0x78'u8, # ...?.?.?.;.;.;.x 66 | 0xdf'u8, 0x08'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xde'u8, 0x08'u8, 0xb2'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xb0'u8, 0x3b'u8, 0xb0'u8, 0x3f'u8, # .. . ....;.;.;.? 67 | 0x20'u8, 0x0f'u8, 0xdf'u8, 0x03'u8, 0xb1'u8, 0x3b'u8, 0xb2'u8, 0x3b'u8, 0xdb'u8, 0x03'u8, 0xdd'u8, 0x03'u8, 0x20'u8, 0x01'u8, 0x20'u8, 0x0f'u8, # ....;.;.... . . 68 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 69 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 70 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 71 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 72 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 73 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 74 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdc'u8, 0x08'u8, 0xdc'u8, 0x08'u8, 0xdc'u8, 0x08'u8, 0x20'u8, 0x0f'u8, # . . . ....... . 75 | 0x20'u8, 0x0f'u8, 0xb0'u8, 0x3f'u8, 0xb0'u8, 0x3f'u8, 0xb1'u8, 0x3f'u8, 0xdd'u8, 0x3b'u8, 0xdb'u8, 0x0b'u8, 0xdf'u8, 0x03'u8, 0x20'u8, 0x0f'u8, # ..?.?.?.;.... . 76 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdf'u8, 0x08'u8, 0xdf'u8, 0x03'u8, 0xdf'u8, 0x03'u8, 0xdf'u8, 0x08'u8, # . . . ......... 77 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdf'u8, 0x08'u8, 0xdf'u8, 0x03'u8, 0xdf'u8, 0x03'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x01'u8, 0x20'u8, 0x0f'u8, # . ....... . . . 78 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 79 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 80 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 81 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 82 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 83 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 84 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0xdb'u8, 0x08'u8, 0xb2'u8, 0x38'u8, 0xb1'u8, 0x38'u8, 0xdc'u8, 0x03'u8, # . . . ....8.8.. 85 | 0xdc'u8, 0x07'u8, 0xb0'u8, 0x3b'u8, 0xb1'u8, 0x3b'u8, 0xdf'u8, 0x3b'u8, 0xdf'u8, 0x08'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # ...;.;.;.. . . . 86 | 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, # . . . . . . . . 87 | 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, # . . . . . . . . 88 | 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, # . . . . . . . . 89 | 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, # . . . . . . . . 90 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 91 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 92 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 93 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, # . . . . . . . . 94 | 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, # . . . . . . . . 95 | 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, # . . . . . . . . 96 | 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, # . . . . . . . . 97 | 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 98 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 99 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 100 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 101 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 102 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 103 | 0x2d'u8, 0x08'u8, 0x3d'u8, 0x08'u8, 0x20'u8, 0x0a'u8, 0x43'u8, 0x0b'u8, 0x72'u8, 0x0b'u8, 0x6f'u8, 0x0b'u8, 0x73'u8, 0x0b'u8, 0x73'u8, 0x0b'u8, # -.=. .C.r.o.s.s. 104 | 0x2d'u8, 0x0b'u8, 0x70'u8, 0x0b'u8, 0x6c'u8, 0x0b'u8, 0x61'u8, 0x0b'u8, 0x74'u8, 0x0b'u8, 0x66'u8, 0x0b'u8, 0x6f'u8, 0x0b'u8, 0x72'u8, 0x0b'u8, # -.p.l.a.t.f.o.r. 105 | 0x6d'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x72'u8, 0x0b'u8, 0x65'u8, 0x0b'u8, 0x6e'u8, 0x0b'u8, 0x64'u8, 0x0b'u8, 0x65'u8, 0x0b'u8, 0x72'u8, 0x0b'u8, # m. .r.e.n.d.e.r. 106 | 0x69'u8, 0x0b'u8, 0x6e'u8, 0x0b'u8, 0x67'u8, 0x0b'u8, 0x20'u8, 0x0b'u8, 0x6c'u8, 0x0b'u8, 0x69'u8, 0x0b'u8, 0x62'u8, 0x0b'u8, 0x72'u8, 0x0b'u8, # i.n.g. .l.i.b.r. 107 | 0x61'u8, 0x0b'u8, 0x72'u8, 0x0b'u8, 0x79'u8, 0x0b'u8, 0x20'u8, 0x0f'u8, 0x3d'u8, 0x08'u8, 0x2d'u8, 0x08'u8, 0x20'u8, 0x01'u8, 0x20'u8, 0x0f'u8, # a.r.y. .=.-. . . 108 | 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, # . . . . . . . . 109 | 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, # . . . . . . . . 110 | 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, # . . . . . . . . 111 | 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, # . . . . . . . . 112 | 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, 0x20'u8, 0x0a'u8, # . . . . . . . . 113 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 114 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 115 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 116 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 117 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 118 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 119 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 120 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 121 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 122 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 123 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 124 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 125 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 126 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 127 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 128 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 129 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 130 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 131 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 132 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 133 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 134 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 135 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 136 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 137 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 138 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 139 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 140 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 141 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 142 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 143 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 144 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 145 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 146 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 147 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 148 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 149 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 150 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 151 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 152 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 153 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 154 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 155 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 156 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 157 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 158 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 159 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 160 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 161 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 162 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 163 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 164 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 165 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 166 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 167 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 168 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 169 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 170 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 171 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 172 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 173 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 174 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 175 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 176 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 177 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 178 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 179 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 180 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 181 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 182 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 183 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 184 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 185 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 186 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 187 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 188 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 189 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 190 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 191 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 192 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 193 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 194 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 195 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 196 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 197 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 198 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 199 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 200 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 201 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 202 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 203 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 204 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 205 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 206 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 207 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 208 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 209 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 210 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 211 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 212 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 213 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 214 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 215 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 216 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 217 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 218 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 219 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 220 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 221 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 222 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 223 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 224 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 225 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 226 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 227 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 228 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 229 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 230 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 231 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 232 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 233 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 234 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 235 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 236 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 237 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 238 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 239 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 240 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 241 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 242 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 243 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 244 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 245 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 246 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 247 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 248 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 249 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 250 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 251 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 252 | 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, 0x20'u8, 0x0f'u8, # . . . . . . . . 253 | ] 254 | -------------------------------------------------------------------------------- /examples/01-Cubes/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.ndb 3 | *.dll 4 | *.bak 5 | *.so 6 | *.a 7 | *.dylib 8 | *.so.* 9 | Cubes 10 | -------------------------------------------------------------------------------- /examples/01-Cubes/Cubes.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Port of bgfx cubes example 01 to nim and nim-bgfx 4 | 5 | import bgfx.bgfx 6 | import ../bgfx_utils 7 | import ../fpu_math 8 | when defined(useSDL): 9 | import ../sdl_platform 10 | elif defined(useGLFW) or not defined(useSDL): 11 | import ../glfw_platform 12 | import parseopt2 13 | import os 14 | 15 | type ExampleCubes = ref object 16 | m_width*: uint32 17 | m_height*: uint32 18 | m_window_width*: uint32 19 | m_window_height*: uint32 20 | m_debug*: uint32 21 | m_reset*: uint32 22 | m_vbh*: bgfx.VertexBufferHandle 23 | m_ibh*: bgfx.IndexBufferHandle 24 | m_program*: bgfx.ProgramHandle 25 | 26 | type PosColorVertex {.packed, pure.} = object 27 | x*, y*, z*: float32 28 | abgr*: uint32 29 | 30 | var s_cubeVertices_Decl: ptr bgfx.VertexDecl 31 | 32 | proc Start(self: ExampleCubes) = 33 | 34 | var m_renderer_type = bgfx.RendererType.RendererType_Count 35 | var m_pciID = 0'u16 36 | 37 | self.m_width = 1280 38 | self.m_height = 1280 39 | self.m_debug = BGFX_DEBUG_TEXT # or BGFX_DEBUG_STATS 40 | self.m_reset = 0'u32 # BGFX_RESET_VSYNC 41 | 42 | # Separate Thread 43 | bgfx.Init(m_renderer_type, m_pciID, 0, nil, nil) 44 | bgfx.Reset(self.m_width, self.m_height, self.m_reset) 45 | 46 | # Enable Debug Text 47 | bgfx.SetDebug(self.m_debug) 48 | 49 | # Set view 0 clear state 50 | bgfx.SetViewClear(0, BGFX_CLEAR_COLOR or BGFX_CLEAR_DEPTH, 0x303030ff, 1.0, 0) 51 | 52 | s_cubeVertices_Decl = createShared(bgfx.VertexDecl) 53 | s_cubeVertices_Decl.Begin() 54 | s_cubeVertices_Decl.Add(bgfx.Attrib_Position, 3, bgfx.AttribType_Float) 55 | s_cubeVertices_Decl.Add(bgfx.Attrib_Color0, 4, bgfx.AttribType_Uint8, true) 56 | s_cubeVertices_Decl.End() 57 | 58 | var vertexdata = [ 59 | PosColorVertex(x: -1.0'f32, y: 1.0'f32, z: 1.0'f32, abgr: 0xff000000'u32 ), 60 | PosColorVertex(x: 1.0'f32, y: 1.0'f32, z: 1.0'f32, abgr: 0xff0000ff'u32 ), 61 | PosColorVertex(x: -1.0'f32, y: -1.0'f32, z: 1.0'f32, abgr: 0xff00ff00'u32 ), 62 | PosColorVertex(x: 1.0'f32, y: -1.0'f32, z: 1.0'f32, abgr: 0xff00ffff'u32 ), 63 | PosColorVertex(x: -1.0'f32, y: 1.0'f32, z: -1.0'f32, abgr: 0xffff0000'u32 ), 64 | PosColorVertex(x: 1.0'f32, y: 1.0'f32, z: -1.0'f32, abgr: 0xffff00ff'u32 ), 65 | PosColorVertex(x: -1.0'f32, y: -1.0'f32, z: -1.0'f32, abgr: 0xffffff00'u32 ), 66 | PosColorVertex(x: 1.0'f32, y: -1.0'f32, z: -1.0'f32, abgr: 0xffffffff'u32 ) 67 | ] 68 | var vertexmem: ptr bgfx.Memory = bgfx.Copy(addr(vertexdata[0]), cast[uint32_t](sizeof(PosColorVertex) * 8)) 69 | 70 | var indexdata = [ 71 | 0'u16, 1'u16, 2'u16, ## 0 72 | 1'u16, 3'u16, 2'u16, 73 | 4'u16, 6'u16, 5'u16, ## 2 74 | 5'u16, 6'u16, 7'u16, 75 | 0'u16, 2'u16, 4'u16, ## 4 76 | 4'u16, 2'u16, 6'u16, 77 | 1'u16, 5'u16, 3'u16, ## 6 78 | 5'u16, 7'u16, 3'u16, 79 | 0'u16, 4'u16, 1'u16, ## 8 80 | 4'u16, 5'u16, 1'u16, 81 | 2'u16, 3'u16, 6'u16, ## 10 82 | 6'u16, 3'u16, 7'u16] 83 | var indexmem: ptr bgfx.Memory = bgfx.Copy(addr(indexdata[0]), cast[uint32_t](sizeof(uint16) * 36)) 84 | 85 | self.m_vbh = bgfx.CreateVertexBuffer(vertexmem, s_cubeVertices_Decl, BGFX_BUFFER_NONE) 86 | 87 | self.m_ibh = bgfx.CreateIndexBuffer(indexmem) 88 | 89 | self.m_program = LoadProgram("vs_cubes", "fs_cubes") 90 | 91 | proc CleanUp(self: ExampleCubes) = 92 | bgfx.DestroyProgram(self.m_program) 93 | bgfx.DestroyVertexBuffer(self.m_vbh) 94 | bgfx.DestroyIndexBuffer(self.m_ibh) 95 | bgfx.Shutdown() 96 | 97 | proc Update(self: ExampleCubes) = 98 | # Set view 0 default viewport 99 | bgfx.SetViewRect(0, 0, 0, cast[uint16](self.m_width), cast[uint16](self.m_height)) 100 | 101 | var now = GetTime() 102 | var last {.global.} = GetTime() 103 | let frameTime: float32 = now - last 104 | let time = GetTime() 105 | last = now 106 | var toMs = 1000.0'f32 107 | 108 | # Use debug font to print information about this example. 109 | bgfx.DebugTextClear() 110 | bgfx.DebugTextPrintf(0, 1, 0x4f, "nim-bgfx/examples/01-Cubes") 111 | bgfx.DebugTextPrintf(0, 2, 0x6f, "Description: Rendering simple static mesh.") 112 | bgfx.DebugTextPrintf(0, 3, 0x0f, "Frame: %7.3f[ms] FPS: %7.3f", cast[float32](frameTime*toMs), cast[float32](1.0'f32 / (frameTime))); 113 | 114 | var at: Vec3 = [0.0'f32, 0.0'f32, 0.0'f32] 115 | var eye: Vec3 = [0.0'f32, 0.0'f32, -35.0'f32] 116 | 117 | var hmd = bgfx.GetHmd() 118 | if not hmd.isNil and (0'u8 != (hmd.flags and BGFX_HMD_RENDERING)): 119 | var view: Mat4 120 | fpumath.mtxQuatTranslationHMD(view, hmd.eye[0].rotation, eye) 121 | bgfx.SetViewTransform(0, unsafeAddr(view[0]), unsafeAddr(hmd.eye[0].projection[0]), BGFX_VIEW_STEREO, unsafeAddr(hmd.eye[1].projection[0])) 122 | 123 | bgfx.SetViewRect(0, 0, 0, hmd.width, hmd.height) 124 | else: 125 | var view: Mat4 126 | fpumath.mtxLookAt(view, eye, at) 127 | var proj: Mat4 128 | fpumath.mtxProj(proj, 60.0'f32, cast[float32](self.m_window_width)/cast[float32](self.m_window_height), 0.1'f32, 100.0'f32) 129 | bgfx.SetViewTransform(0, unsafeAddr(view[0]), unsafeAddr(proj[0])) 130 | 131 | bgfx.SetViewRect(0, 0, 0, cast[uint16](self.m_window_width), cast[uint16](self.m_window_height)) 132 | 133 | bgfx.Touch(0) 134 | 135 | for yy in 0..11: 136 | for xx in 0..11: 137 | var fyy: float32 = yy.toFloat() 138 | var fxx: float32 = xx.toFloat() 139 | var mtx: Mat4 140 | fpumath.mtxRotateXY(mtx, time + fxx * 0.21'f32, time + fyy * 0.37'f32) 141 | mtx[12] = -15.0'f32 + fxx * 3.0'f32 142 | mtx[13] = -15.0'f32 + fyy * 3.0'f32 143 | mtx[14] = 0.0'f32 144 | 145 | bgfx.SetTransform(unsafeAddr(mtx[0])) 146 | 147 | bgfx.SetVertexBuffer(self.m_vbh) 148 | bgfx.SetIndexBuffer(self.m_ibh) 149 | 150 | bgfx.SetState(BGFX_STATE_DEFAULT) 151 | 152 | bgfx.Submit(0, self.m_program) 153 | 154 | bgfx.Frame() 155 | 156 | StartExample[ExampleCubes]() 157 | -------------------------------------------------------------------------------- /examples/01-Cubes/Cubes.nim.cfg: -------------------------------------------------------------------------------- 1 | --define:BGFX_BUILD_LIB 2 | --define:useGLFW 3 | --debuginfo 4 | --stackTrace:on 5 | --lineTrace:on 6 | --debugger:native 7 | --clibdir:"/usr/local/lib" 8 | --passC:"-o2" 9 | -------------------------------------------------------------------------------- /examples/01-Cubes/Cubes.nimble: -------------------------------------------------------------------------------- 1 | # Package 2 | version = "0.1.0" 3 | author = "Cory Noll Crimmins - Golden" 4 | description = "Cubes example for nim-bgfx" 5 | license = "BSD" 6 | bin = @["Cubes"] 7 | backend = "c" 8 | 9 | # Dependencies 10 | requires "bgfx >= 0.1.0" 11 | requires "nim >= 0.14.2" 12 | requires "glfw >= 3.2.0" 13 | -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/dx11/fs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/dx11/fs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/dx11/vs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/dx11/vs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/dx9/fs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/dx9/fs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/dx9/vs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/dx9/vs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/gles/fs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/gles/fs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/gles/vs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/gles/vs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/glsl/fs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/glsl/fs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/glsl/vs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/glsl/vs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/metal/fs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/metal/fs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/metal/vs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/metal/vs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/spirv/fs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/spirv/fs_cubes.bin -------------------------------------------------------------------------------- /examples/01-Cubes/shaders/spirv/vs_cubes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/01-Cubes/shaders/spirv/vs_cubes.bin -------------------------------------------------------------------------------- /examples/02-metaballs/Metaballs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auRose94/nim-bgfx/575797b9a037731ad9e7ff3f12b35a211b7bbfe2/examples/02-metaballs/Metaballs -------------------------------------------------------------------------------- /examples/02-metaballs/Metaballs.nim.cfg: -------------------------------------------------------------------------------- 1 | --define:BGFX_BUILD_LIB 2 | --define:useGLFW 3 | --debuginfo 4 | --stackTrace:on 5 | --lineTrace:on 6 | --debugger:native 7 | --clibdir:"/usr/local/lib" 8 | --passC:"-o2" 9 | --embedsrc -------------------------------------------------------------------------------- /examples/02-metaballs/Metaballs.nimble: -------------------------------------------------------------------------------- 1 | # Package 2 | version = "0.1.0" 3 | author = "Cory Noll Crimmins - Golden" 4 | description = "Metaballs example for nim-bgfx" 5 | license = "BSD" 6 | bin = @["Metaballs"] 7 | backend = "c" 8 | 9 | # Dependencies 10 | requires "bgfx >= 0.1.0" 11 | requires "nim >= 0.14.2" 12 | requires "glfw >= 3.2.0" 13 | -------------------------------------------------------------------------------- /examples/02-metaballs/fs_metaballs.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Port of bgfx metaballs example 02 embedded shaders 4 | 5 | import tables 6 | 7 | var fs_metaballs* = initTable[string, seq[uint8]]() 8 | fs_metaballs["glsl"] = @[ 9 | 0x46'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0x00'u8, 0x00'u8, 0x7f'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x76'u8, 0x61'u8, # FSH..,.?......va 10 | 0x72'u8, 0x79'u8, 0x69'u8, 0x6e'u8, 0x67'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, 0x70'u8, 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x34'u8, # rying highp vec4 11 | 0x20'u8, 0x76'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x79'u8, 0x69'u8, # v_color0;.varyi 12 | 0x6e'u8, 0x67'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, 0x70'u8, 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x33'u8, 0x20'u8, 0x76'u8, 0x5f'u8, # ng highp vec3 v_ 13 | 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x3b'u8, 0x0a'u8, 0x76'u8, 0x6f'u8, 0x69'u8, 0x64'u8, 0x20'u8, 0x6d'u8, 0x61'u8, 0x69'u8, # normal;.void mai 14 | 0x6e'u8, 0x20'u8, 0x28'u8, 0x29'u8, 0x0a'u8, 0x7b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, 0x70'u8, 0x20'u8, 0x66'u8, # n ().{. highp f 15 | 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, # loat tmpvar_1;. 16 | 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x64'u8, 0x6f'u8, 0x74'u8, 0x20'u8, # tmpvar_1 = dot 17 | 0x28'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x69'u8, 0x7a'u8, 0x65'u8, 0x28'u8, 0x76'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, # (normalize(v_nor 18 | 0x6d'u8, 0x61'u8, 0x6c'u8, 0x29'u8, 0x2c'u8, 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x33'u8, 0x28'u8, 0x30'u8, 0x2e'u8, 0x30'u8, 0x2c'u8, 0x20'u8, # mal), vec3(0.0, 19 | 0x30'u8, 0x2e'u8, 0x30'u8, 0x2c'u8, 0x20'u8, 0x2d'u8, 0x31'u8, 0x2e'u8, 0x30'u8, 0x29'u8, 0x29'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x6d'u8, # 0.0, -1.0));. m 20 | 0x65'u8, 0x64'u8, 0x69'u8, 0x75'u8, 0x6d'u8, 0x70'u8, 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x34'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, # ediump vec4 tmpv 21 | 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, # ar_2;. tmpvar_2 22 | 0x2e'u8, 0x77'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x31'u8, 0x2e'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, # .w = 1.0;. tmpv 23 | 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x2e'u8, 0x78'u8, 0x79'u8, 0x7a'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x70'u8, 0x6f'u8, 0x77'u8, 0x20'u8, 0x28'u8, # ar_2.xyz = pow ( 24 | 0x28'u8, 0x28'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x20'u8, 0x20'u8, 0x70'u8, 0x6f'u8, 0x77'u8, 0x20'u8, 0x28'u8, 0x76'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, # ((. pow (v_co 25 | 0x6c'u8, 0x6f'u8, 0x72'u8, 0x30'u8, 0x2e'u8, 0x78'u8, 0x79'u8, 0x7a'u8, 0x2c'u8, 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x33'u8, 0x28'u8, 0x32'u8, # lor0.xyz, vec3(2 26 | 0x2e'u8, 0x32'u8, 0x2c'u8, 0x20'u8, 0x32'u8, 0x2e'u8, 0x32'u8, 0x2c'u8, 0x20'u8, 0x32'u8, 0x2e'u8, 0x32'u8, 0x29'u8, 0x29'u8, 0x0a'u8, 0x20'u8, # .2, 2.2, 2.2)). 27 | 0x20'u8, 0x20'u8, 0x2a'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x29'u8, 0x20'u8, 0x2b'u8, 0x20'u8, # * tmpvar_1) + 28 | 0x70'u8, 0x6f'u8, 0x77'u8, 0x20'u8, 0x28'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x2c'u8, 0x20'u8, 0x33'u8, # pow (tmpvar_1, 3 29 | 0x30'u8, 0x2e'u8, 0x30'u8, 0x29'u8, 0x29'u8, 0x2c'u8, 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x33'u8, 0x28'u8, 0x30'u8, 0x2e'u8, 0x34'u8, 0x35'u8, # 0.0)), vec3(0.45 30 | 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x2c'u8, 0x20'u8, 0x30'u8, 0x2e'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, # 45454, 0.4545454 31 | 0x2c'u8, 0x20'u8, 0x30'u8, 0x2e'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x29'u8, 0x29'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, # , 0.4545454));. 32 | 0x20'u8, 0x67'u8, 0x6c'u8, 0x5f'u8, 0x46'u8, 0x72'u8, 0x61'u8, 0x67'u8, 0x43'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x20'u8, 0x3d'u8, 0x20'u8, # gl_FragColor = 33 | 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x3b'u8, 0x0a'u8, 0x7d'u8, 0x0a'u8, 0x0a'u8, 0x00'u8] # tmpvar_2;.}... 34 | fs_metaballs["spv"] = @[ 35 | 0x46'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0xa4'u8, 0x04'u8, 0x03'u8, 0x02'u8, 0x23'u8, 0x07'u8, 0x00'u8, 0x00'u8, # FSH..,.?....#... 36 | 0x01'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0xe8'u8, 0x3e'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x11'u8, 0x00'u8, # .......>........ 37 | 0x02'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x47'u8, 0x4c'u8, # ..............GL 38 | 0x53'u8, 0x4c'u8, 0x2e'u8, 0x73'u8, 0x74'u8, 0x64'u8, 0x2e'u8, 0x34'u8, 0x35'u8, 0x30'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0e'u8, 0x00'u8, # SL.std.450...... 39 | 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 40 | 0x00'u8, 0x00'u8, 0x42'u8, 0x13'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x42'u8, 0x13'u8, # ..B...........B. 41 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x24'u8, 0x47'u8, # ..........`...$G 42 | 0x6c'u8, 0x6f'u8, 0x62'u8, 0x61'u8, 0x6c'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # lobal.....`..... 43 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x76'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x52'u8, 0x65'u8, 0x63'u8, 0x74'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, # ..u_viewRect.... 44 | 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x76'u8, 0x69'u8, 0x65'u8, 0x77'u8, # ..`.......u_view 45 | 0x54'u8, 0x65'u8, 0x78'u8, 0x65'u8, 0x6c'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, # Texel.....`..... 46 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x76'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..u_view......`. 47 | 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x69'u8, 0x6e'u8, 0x76'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x00'u8, # ......u_invView. 48 | 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, # ......`.......u_ 49 | 0x70'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, # proj......`..... 50 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x69'u8, 0x6e'u8, 0x76'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, # ..u_invProj..... 51 | 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x76'u8, 0x69'u8, 0x65'u8, 0x77'u8, # ..`.......u_view 52 | 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, # Proj......`..... 53 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x69'u8, 0x6e'u8, 0x76'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, # ..u_invViewProj. 54 | 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, # ......`.......u_ 55 | 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x09'u8, 0x00'u8, # model.....`..... 56 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x00'u8, 0x06'u8, 0x00'u8, # ..u_modelView... 57 | 0x07'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, # ..`.......u_mode 58 | 0x6c'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, # lViewProj.....`. 59 | 0x00'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x61'u8, 0x6c'u8, 0x70'u8, 0x68'u8, 0x61'u8, 0x52'u8, 0x65'u8, 0x66'u8, # ......u_alphaRef 60 | 0x34'u8, 0x00'u8, 0x47'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x9f'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x40'u8, 0x00'u8, # 4.G...........@. 61 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 62 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, # ......H...`..... 63 | 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..#.......H...`. 64 | 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 65 | 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#... ...H. 66 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 67 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ..H...`......... 68 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 69 | 0x00'u8, 0x00'u8, 0x60'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, # ..`...H...`..... 70 | 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 71 | 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 72 | 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xa0'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#.......H. 73 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 74 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ..H...`......... 75 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 76 | 0x00'u8, 0x00'u8, 0xe0'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, # ......H...`..... 77 | 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 78 | 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 79 | 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#... ...H. 80 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 81 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ..H...`......... 82 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 83 | 0x00'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, # ..`...H...`..... 84 | 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 85 | 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 86 | 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xa0'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#.......H. 87 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 88 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x09'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ..H...`......... 89 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x09'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 90 | 0x00'u8, 0x00'u8, 0xa0'u8, 0x09'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x09'u8, 0x00'u8, # ......H...`..... 91 | 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 92 | 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 93 | 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xe0'u8, 0x09'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#.......H. 94 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 95 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 96 | 0x00'u8, 0x00'u8, 0x20'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x47'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, # .. ...G...`..... 97 | 0x00'u8, 0x00'u8, 0x13'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x21'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x02'u8, 0x05'u8, # ..........!..... 98 | 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x16'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x0d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, # .............. . 99 | 0x00'u8, 0x00'u8, 0x17'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x1d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ................ 100 | 0x00'u8, 0x00'u8, 0x18'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x1d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ......e......... 101 | 0x00'u8, 0x00'u8, 0x15'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # .......... ..... 102 | 0x00'u8, 0x00'u8, 0x2b'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x6a'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, # ..+.......j... . 103 | 0x00'u8, 0x00'u8, 0x1c'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x9f'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x6a'u8, 0x0a'u8, # ..........e...j. 104 | 0x00'u8, 0x00'u8, 0x1e'u8, 0x00'u8, 0x0e'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x1d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x1d'u8, 0x00'u8, # ......`......... 105 | 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, # ..e...e...e...e. 106 | 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x9f'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, # ..e...e.......e. 107 | 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x1d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x36'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x08'u8, 0x00'u8, # ..e.......6..... 108 | 0x00'u8, 0x00'u8, 0x42'u8, 0x13'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0xf8'u8, 0x00'u8, # ..B............. 109 | 0x02'u8, 0x00'u8, 0xe7'u8, 0x3e'u8, 0x00'u8, 0x00'u8, 0xfd'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x38'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8] # ...>......8.... 110 | fs_metaballs["dx9"] = @[ 111 | 0x46'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0x00'u8, 0x00'u8, 0x98'u8, 0x01'u8, 0x00'u8, 0x03'u8, 0xff'u8, 0xff'u8, # FSH..,.?........ 112 | 0xfe'u8, 0xff'u8, 0x14'u8, 0x00'u8, 0x43'u8, 0x54'u8, 0x41'u8, 0x42'u8, 0x1c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....CTAB....#... 113 | 0x00'u8, 0x03'u8, 0xff'u8, 0xff'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x91'u8, 0x00'u8, 0x00'u8, # ................ 114 | 0x1c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x70'u8, 0x73'u8, 0x5f'u8, 0x33'u8, 0x5f'u8, 0x30'u8, 0x00'u8, 0x4d'u8, 0x69'u8, 0x63'u8, 0x72'u8, 0x6f'u8, # ....ps_3_0.Micro 115 | 0x73'u8, 0x6f'u8, 0x66'u8, 0x74'u8, 0x20'u8, 0x28'u8, 0x52'u8, 0x29'u8, 0x20'u8, 0x48'u8, 0x4c'u8, 0x53'u8, 0x4c'u8, 0x20'u8, 0x53'u8, 0x68'u8, # soft (R) HLSL Sh 116 | 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x20'u8, 0x43'u8, 0x6f'u8, 0x6d'u8, 0x70'u8, 0x69'u8, 0x6c'u8, 0x65'u8, 0x72'u8, 0x20'u8, 0x31'u8, 0x30'u8, # ader Compiler 10 117 | 0x2e'u8, 0x31'u8, 0x00'u8, 0xab'u8, 0x51'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0xa0'u8, 0x00'u8, 0x00'u8, 0xf0'u8, 0x41'u8, # .1..Q..........A 118 | 0xcd'u8, 0xcc'u8, 0x0c'u8, 0x40'u8, 0x2f'u8, 0xba'u8, 0xe8'u8, 0x3e'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x3f'u8, 0x1f'u8, 0x00'u8, 0x00'u8, 0x02'u8, # ...@/..>...?.... 119 | 0x0a'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x90'u8, 0x1f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x05'u8, 0x00'u8, 0x01'u8, 0x80'u8, # ................ 120 | 0x01'u8, 0x00'u8, 0x07'u8, 0x90'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x80'u8, 0x01'u8, 0x00'u8, 0xe4'u8, 0x90'u8, # ................ 121 | 0x01'u8, 0x00'u8, 0xe4'u8, 0x90'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x80'u8, # ................ 122 | 0x05'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x01'u8, 0x00'u8, 0xaa'u8, 0x90'u8, # ................ 123 | 0x20'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x01'u8, 0x00'u8, 0x01'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x81'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xa0'u8, # ............... 124 | 0x0f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x02'u8, 0x00'u8, 0x01'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x90'u8, 0x0f'u8, 0x00'u8, 0x00'u8, 0x02'u8, # ................ 125 | 0x02'u8, 0x00'u8, 0x02'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x55'u8, 0x90'u8, 0x0f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x02'u8, 0x00'u8, 0x04'u8, 0x80'u8, # ......U......... 126 | 0x00'u8, 0x00'u8, 0xaa'u8, 0x90'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x0e'u8, 0x80'u8, 0x02'u8, 0x00'u8, 0x90'u8, 0x80'u8, # ................ 127 | 0x00'u8, 0x00'u8, 0x55'u8, 0xa0'u8, 0x0e'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x02'u8, 0x00'u8, 0x01'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x55'u8, 0x80'u8, # ..U...........U. 128 | 0x0e'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x02'u8, 0x00'u8, 0x02'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0xaa'u8, 0x80'u8, 0x0e'u8, 0x00'u8, 0x00'u8, 0x02'u8, # ................ 129 | 0x02'u8, 0x00'u8, 0x04'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0xff'u8, 0x80'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x80'u8, # ................ 130 | 0x02'u8, 0x00'u8, 0xe4'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x81'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x0f'u8, 0x00'u8, 0x00'u8, 0x02'u8, # ................ 131 | 0x01'u8, 0x00'u8, 0x01'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x0f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x01'u8, 0x00'u8, 0x02'u8, 0x80'u8, # ................ 132 | 0x00'u8, 0x00'u8, 0x55'u8, 0x80'u8, 0x0f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x01'u8, 0x00'u8, 0x04'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0xaa'u8, 0x80'u8, # ..U............. 133 | 0x05'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x80'u8, 0x01'u8, 0x00'u8, 0xe4'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0xaa'u8, 0xa0'u8, # ................ 134 | 0x0e'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x08'u8, 0x01'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x0e'u8, 0x00'u8, 0x00'u8, 0x02'u8, # ................ 135 | 0x00'u8, 0x08'u8, 0x02'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x55'u8, 0x80'u8, 0x0e'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x08'u8, 0x04'u8, 0x80'u8, # ......U......... 136 | 0x00'u8, 0x00'u8, 0xaa'u8, 0x80'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x08'u8, 0x08'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0xff'u8, 0xa0'u8, # ................ 137 | 0xff'u8, 0xff'u8, 0x00'u8, 0x00'u8, 0x00'u8] # ..... 138 | fs_metaballs["dx11"] = @[ 139 | 0x46'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0x00'u8, 0x00'u8, 0x84'u8, 0x02'u8, 0x44'u8, 0x58'u8, 0x42'u8, 0x43'u8, # FSH..,.?....DXBC 140 | 0x71'u8, 0x00'u8, 0x85'u8, 0x0b'u8, 0x80'u8, 0xfd'u8, 0x1e'u8, 0xdf'u8, 0x09'u8, 0x21'u8, 0xdf'u8, 0xe6'u8, 0x3a'u8, 0xef'u8, 0x53'u8, 0xf8'u8, # q........!..:.S. 141 | 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x84'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x2c'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ............,... 142 | 0xa0'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xd4'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x49'u8, 0x53'u8, 0x47'u8, 0x4e'u8, 0x6c'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........ISGNl... 143 | 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x50'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........P....... 144 | 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 145 | 0x5c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 146 | 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x62'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........b....... 147 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x07'u8, 0x00'u8, 0x00'u8, # ................ 148 | 0x53'u8, 0x56'u8, 0x5f'u8, 0x50'u8, 0x4f'u8, 0x53'u8, 0x49'u8, 0x54'u8, 0x49'u8, 0x4f'u8, 0x4e'u8, 0x00'u8, 0x43'u8, 0x4f'u8, 0x4c'u8, 0x4f'u8, # SV_POSITION.COLO 149 | 0x52'u8, 0x00'u8, 0x54'u8, 0x45'u8, 0x58'u8, 0x43'u8, 0x4f'u8, 0x4f'u8, 0x52'u8, 0x44'u8, 0x00'u8, 0xab'u8, 0x4f'u8, 0x53'u8, 0x47'u8, 0x4e'u8, # R.TEXCOORD..OSGN 150 | 0x2c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ,........... ... 151 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 152 | 0x0f'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x53'u8, 0x56'u8, 0x5f'u8, 0x54'u8, 0x41'u8, 0x52'u8, 0x47'u8, 0x45'u8, 0x54'u8, 0x00'u8, 0xab'u8, 0xab'u8, # ....SV_TARGET... 153 | 0x53'u8, 0x48'u8, 0x44'u8, 0x52'u8, 0xa8'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x40'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x6a'u8, 0x00'u8, 0x00'u8, 0x00'u8, # SHDR....@...j... 154 | 0x62'u8, 0x10'u8, 0x00'u8, 0x03'u8, 0x72'u8, 0x10'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x62'u8, 0x10'u8, 0x00'u8, 0x03'u8, # b...r.......b... 155 | 0x72'u8, 0x10'u8, 0x10'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0xf2'u8, 0x20'u8, 0x10'u8, 0x00'u8, # r.......e.... .. 156 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x68'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x2f'u8, 0x00'u8, 0x00'u8, 0x05'u8, # ....h......./... 157 | 0x72'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x12'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, # r.......F....... 158 | 0x38'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x72'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x02'u8, 0x10'u8, 0x00'u8, # 8...r.......F... 159 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x40'u8, 0x00'u8, 0x00'u8, 0xcd'u8, 0xcc'u8, 0x0c'u8, 0x40'u8, 0xcd'u8, 0xcc'u8, 0x0c'u8, 0x40'u8, # .....@.....@...@ 160 | 0xcd'u8, 0xcc'u8, 0x0c'u8, 0x40'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x19'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x72'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ...@........r... 161 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x02'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x07'u8, # ....F........... 162 | 0x82'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x12'u8, 0x10'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........F....... 163 | 0x46'u8, 0x12'u8, 0x10'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x44'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x82'u8, 0x00'u8, 0x10'u8, 0x00'u8, # F.......D....... 164 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x3a'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x38'u8, 0x00'u8, 0x00'u8, 0x07'u8, # ....:.......8... 165 | 0x82'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x3a'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........:....... 166 | 0x2a'u8, 0x10'u8, 0x10'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x2f'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x12'u8, 0x00'u8, 0x10'u8, 0x00'u8, # *......./....... 167 | 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x3a'u8, 0x00'u8, 0x10'u8, 0x80'u8, 0x41'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....:...A....... 168 | 0x38'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x12'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x10'u8, 0x00'u8, # 8............... 169 | 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x40'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xf0'u8, 0x41'u8, 0x19'u8, 0x00'u8, 0x00'u8, 0x05'u8, # .....@.....A.... 170 | 0x12'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 171 | 0x32'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x72'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x02'u8, 0x10'u8, 0x00'u8, # 2...r.......F... 172 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xf6'u8, 0x0f'u8, 0x10'u8, 0x80'u8, 0x41'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........A....... 173 | 0x06'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x2f'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x72'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ......../...r... 174 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x02'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x38'u8, 0x00'u8, 0x00'u8, 0x0a'u8, # ....F.......8... 175 | 0x72'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x02'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # r.......F....... 176 | 0x02'u8, 0x40'u8, 0x00'u8, 0x00'u8, 0x2f'u8, 0xba'u8, 0xe8'u8, 0x3e'u8, 0x2f'u8, 0xba'u8, 0xe8'u8, 0x3e'u8, 0x2f'u8, 0xba'u8, 0xe8'u8, 0x3e'u8, # .@../..>/..>/..> 177 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x19'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x72'u8, 0x20'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........r ...... 178 | 0x46'u8, 0x02'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x36'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x82'u8, 0x20'u8, 0x10'u8, 0x00'u8, # F.......6.... .. 179 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x40'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x3f'u8, 0x3e'u8, 0x00'u8, 0x00'u8, 0x01'u8, # .....@.....?>... 180 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8] # .... 181 | fs_metaballs["mtl"] = @[ 182 | 0x46'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0x00'u8, 0x00'u8, 0xb9'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x73'u8, # FSH..,.?......us 183 | 0x69'u8, 0x6e'u8, 0x67'u8, 0x20'u8, 0x6e'u8, 0x61'u8, 0x6d'u8, 0x65'u8, 0x73'u8, 0x70'u8, 0x61'u8, 0x63'u8, 0x65'u8, 0x20'u8, 0x6d'u8, 0x65'u8, # ing namespace me 184 | 0x74'u8, 0x61'u8, 0x6c'u8, 0x3b'u8, 0x0a'u8, 0x73'u8, 0x74'u8, 0x72'u8, 0x75'u8, 0x63'u8, 0x74'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, 0x74'u8, # tal;.struct xlat 185 | 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x49'u8, 0x6e'u8, 0x70'u8, 0x75'u8, 0x74'u8, 0x20'u8, 0x7b'u8, # MtlShaderInput { 186 | 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x20'u8, 0x76'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, # . float4 v_colo 187 | 0x72'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x33'u8, 0x20'u8, 0x76'u8, 0x5f'u8, 0x6e'u8, # r0;. float3 v_n 188 | 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x3b'u8, 0x0a'u8, 0x7d'u8, 0x3b'u8, 0x0a'u8, 0x73'u8, 0x74'u8, 0x72'u8, 0x75'u8, 0x63'u8, 0x74'u8, # ormal;.};.struct 189 | 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x4f'u8, 0x75'u8, # xlatMtlShaderOu 190 | 0x74'u8, 0x70'u8, 0x75'u8, 0x74'u8, 0x20'u8, 0x7b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x20'u8, # tput {. float4 191 | 0x67'u8, 0x6c'u8, 0x5f'u8, 0x46'u8, 0x72'u8, 0x61'u8, 0x67'u8, 0x43'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x3b'u8, 0x0a'u8, 0x7d'u8, 0x3b'u8, # gl_FragColor;.}; 192 | 0x0a'u8, 0x73'u8, 0x74'u8, 0x72'u8, 0x75'u8, 0x63'u8, 0x74'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, # .struct xlatMtlS 193 | 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x55'u8, 0x6e'u8, 0x69'u8, 0x66'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x20'u8, 0x7b'u8, 0x0a'u8, 0x7d'u8, # haderUniform {.} 194 | 0x3b'u8, 0x0a'u8, 0x66'u8, 0x72'u8, 0x61'u8, 0x67'u8, 0x6d'u8, 0x65'u8, 0x6e'u8, 0x74'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, 0x74'u8, 0x4d'u8, # ;.fragment xlatM 195 | 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x4f'u8, 0x75'u8, 0x74'u8, 0x70'u8, 0x75'u8, 0x74'u8, 0x20'u8, 0x78'u8, # tlShaderOutput x 196 | 0x6c'u8, 0x61'u8, 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x4d'u8, 0x61'u8, 0x69'u8, 0x6e'u8, 0x20'u8, 0x28'u8, 0x78'u8, 0x6c'u8, 0x61'u8, 0x74'u8, # latMtlMain (xlat 197 | 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x49'u8, 0x6e'u8, 0x70'u8, 0x75'u8, 0x74'u8, 0x20'u8, 0x5f'u8, # MtlShaderInput _ 198 | 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x69'u8, 0x20'u8, 0x5b'u8, 0x5b'u8, 0x73'u8, 0x74'u8, 0x61'u8, 0x67'u8, 0x65'u8, 0x5f'u8, 0x69'u8, 0x6e'u8, # mtl_i [[stage_in 199 | 0x5d'u8, 0x5d'u8, 0x2c'u8, 0x20'u8, 0x63'u8, 0x6f'u8, 0x6e'u8, 0x73'u8, 0x74'u8, 0x61'u8, 0x6e'u8, 0x74'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, # ]], constant xla 200 | 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x55'u8, 0x6e'u8, 0x69'u8, 0x66'u8, 0x6f'u8, 0x72'u8, # tMtlShaderUnifor 201 | 0x6d'u8, 0x26'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x75'u8, 0x20'u8, 0x5b'u8, 0x5b'u8, 0x62'u8, 0x75'u8, 0x66'u8, 0x66'u8, # m& _mtl_u [[buff 202 | 0x65'u8, 0x72'u8, 0x28'u8, 0x30'u8, 0x29'u8, 0x5d'u8, 0x5d'u8, 0x29'u8, 0x0a'u8, 0x7b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, # er(0)]]).{. xla 203 | 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x4f'u8, 0x75'u8, 0x74'u8, 0x70'u8, 0x75'u8, 0x74'u8, # tMtlShaderOutput 204 | 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x6f'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, # _mtl_o;. float 205 | 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, # tmpvar_1 = 0;. 206 | 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x64'u8, 0x6f'u8, 0x74'u8, 0x20'u8, # tmpvar_1 = dot 207 | 0x28'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x69'u8, 0x7a'u8, 0x65'u8, 0x28'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, # (normalize(_mtl_ 208 | 0x69'u8, 0x2e'u8, 0x76'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x29'u8, 0x2c'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, # i.v_normal), flo 209 | 0x61'u8, 0x74'u8, 0x33'u8, 0x28'u8, 0x30'u8, 0x2e'u8, 0x30'u8, 0x2c'u8, 0x20'u8, 0x30'u8, 0x2e'u8, 0x30'u8, 0x2c'u8, 0x20'u8, 0x2d'u8, 0x31'u8, # at3(0.0, 0.0, -1 210 | 0x2e'u8, 0x30'u8, 0x29'u8, 0x29'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x20'u8, 0x74'u8, # .0));. float4 t 211 | 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x74'u8, # mpvar_2 = 0;. t 212 | 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x2e'u8, 0x77'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x31'u8, 0x2e'u8, 0x30'u8, 0x3b'u8, # mpvar_2.w = 1.0; 213 | 0x0a'u8, 0x20'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x2e'u8, 0x78'u8, 0x79'u8, 0x7a'u8, 0x20'u8, # . tmpvar_2.xyz 214 | 0x3d'u8, 0x20'u8, 0x70'u8, 0x6f'u8, 0x77'u8, 0x20'u8, 0x28'u8, 0x28'u8, 0x28'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x20'u8, 0x20'u8, 0x70'u8, 0x6f'u8, # = pow (((. po 215 | 0x77'u8, 0x20'u8, 0x28'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x69'u8, 0x2e'u8, 0x76'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, # w (_mtl_i.v_colo 216 | 0x72'u8, 0x30'u8, 0x2e'u8, 0x78'u8, 0x79'u8, 0x7a'u8, 0x2c'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x33'u8, 0x28'u8, 0x32'u8, # r0.xyz, float3(2 217 | 0x2e'u8, 0x32'u8, 0x2c'u8, 0x20'u8, 0x32'u8, 0x2e'u8, 0x32'u8, 0x2c'u8, 0x20'u8, 0x32'u8, 0x2e'u8, 0x32'u8, 0x29'u8, 0x29'u8, 0x0a'u8, 0x20'u8, # .2, 2.2, 2.2)). 218 | 0x20'u8, 0x20'u8, 0x2a'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x29'u8, 0x20'u8, 0x2b'u8, 0x20'u8, # * tmpvar_1) + 219 | 0x70'u8, 0x6f'u8, 0x77'u8, 0x20'u8, 0x28'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x2c'u8, 0x20'u8, 0x33'u8, # pow (tmpvar_1, 3 220 | 0x30'u8, 0x2e'u8, 0x30'u8, 0x29'u8, 0x29'u8, 0x2c'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x33'u8, 0x28'u8, 0x30'u8, 0x2e'u8, # 0.0)), float3(0. 221 | 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x2c'u8, 0x20'u8, 0x30'u8, 0x2e'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, # 4545454, 0.45454 222 | 0x35'u8, 0x34'u8, 0x2c'u8, 0x20'u8, 0x30'u8, 0x2e'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x35'u8, 0x34'u8, 0x29'u8, 0x29'u8, 0x3b'u8, # 54, 0.4545454)); 223 | 0x0a'u8, 0x20'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x6f'u8, 0x2e'u8, 0x67'u8, 0x6c'u8, 0x5f'u8, 0x46'u8, 0x72'u8, 0x61'u8, # . _mtl_o.gl_Fra 224 | 0x67'u8, 0x43'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, # gColor = tmpvar_ 225 | 0x32'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x72'u8, 0x65'u8, 0x74'u8, 0x75'u8, 0x72'u8, 0x6e'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, # 2;. return _mtl 226 | 0x5f'u8, 0x6f'u8, 0x3b'u8, 0x0a'u8, 0x7d'u8, 0x0a'u8, 0x0a'u8, 0x00'u8] # _o;.}... 227 | -------------------------------------------------------------------------------- /examples/02-metaballs/vs_metaballs.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Port of bgfx metaballs example 02 embedded shaders 4 | 5 | import tables 6 | 7 | var vs_metaballs* = initTable[string, seq[uint8]]() 8 | vs_metaballs["glsl"] = @[ 9 | 0x56'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0x02'u8, 0x00'u8, 0x07'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, # VSH..,.?...u_mod 10 | 0x65'u8, 0x6c'u8, 0x04'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, 0x0f'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, # el. .. ..u_model 11 | 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x04'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0xe6'u8, 0x01'u8, # ViewProj........ 12 | 0x00'u8, 0x00'u8, 0x61'u8, 0x74'u8, 0x74'u8, 0x72'u8, 0x69'u8, 0x62'u8, 0x75'u8, 0x74'u8, 0x65'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, # ..attribute high 13 | 0x70'u8, 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x34'u8, 0x20'u8, 0x61'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x30'u8, 0x3b'u8, # p vec4 a_color0; 14 | 0x0a'u8, 0x61'u8, 0x74'u8, 0x74'u8, 0x72'u8, 0x69'u8, 0x62'u8, 0x75'u8, 0x74'u8, 0x65'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, 0x70'u8, # .attribute highp 15 | 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x33'u8, 0x20'u8, 0x61'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x3b'u8, 0x0a'u8, # vec3 a_normal;. 16 | 0x61'u8, 0x74'u8, 0x74'u8, 0x72'u8, 0x69'u8, 0x62'u8, 0x75'u8, 0x74'u8, 0x65'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, 0x70'u8, 0x20'u8, # attribute highp 17 | 0x76'u8, 0x65'u8, 0x63'u8, 0x33'u8, 0x20'u8, 0x61'u8, 0x5f'u8, 0x70'u8, 0x6f'u8, 0x73'u8, 0x69'u8, 0x74'u8, 0x69'u8, 0x6f'u8, 0x6e'u8, 0x3b'u8, # vec3 a_position; 18 | 0x0a'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x79'u8, 0x69'u8, 0x6e'u8, 0x67'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, 0x70'u8, 0x20'u8, 0x76'u8, # .varying highp v 19 | 0x65'u8, 0x63'u8, 0x34'u8, 0x20'u8, 0x76'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x76'u8, 0x61'u8, # ec4 v_color0;.va 20 | 0x72'u8, 0x79'u8, 0x69'u8, 0x6e'u8, 0x67'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, 0x70'u8, 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x33'u8, # rying highp vec3 21 | 0x20'u8, 0x76'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x3b'u8, 0x0a'u8, 0x75'u8, 0x6e'u8, 0x69'u8, 0x66'u8, 0x6f'u8, # v_normal;.unifo 22 | 0x72'u8, 0x6d'u8, 0x20'u8, 0x6d'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x20'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x5b'u8, # rm mat4 u_model[ 23 | 0x33'u8, 0x32'u8, 0x5d'u8, 0x3b'u8, 0x0a'u8, 0x75'u8, 0x6e'u8, 0x69'u8, 0x66'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, # 32];.uniform hig 24 | 0x68'u8, 0x70'u8, 0x20'u8, 0x6d'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x20'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x56'u8, # hp mat4 u_modelV 25 | 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x3b'u8, 0x0a'u8, 0x76'u8, 0x6f'u8, 0x69'u8, 0x64'u8, 0x20'u8, 0x6d'u8, 0x61'u8, # iewProj;.void ma 26 | 0x69'u8, 0x6e'u8, 0x20'u8, 0x28'u8, 0x29'u8, 0x0a'u8, 0x7b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, 0x70'u8, 0x20'u8, # in ().{. highp 27 | 0x76'u8, 0x65'u8, 0x63'u8, 0x34'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, # vec4 tmpvar_1;. 28 | 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x2e'u8, 0x77'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x31'u8, 0x2e'u8, # tmpvar_1.w = 1. 29 | 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x2e'u8, 0x78'u8, 0x79'u8, # 0;. tmpvar_1.xy 30 | 0x7a'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x61'u8, 0x5f'u8, 0x70'u8, 0x6f'u8, 0x73'u8, 0x69'u8, 0x74'u8, 0x69'u8, 0x6f'u8, 0x6e'u8, 0x3b'u8, 0x0a'u8, # z = a_position;. 31 | 0x20'u8, 0x20'u8, 0x67'u8, 0x6c'u8, 0x5f'u8, 0x50'u8, 0x6f'u8, 0x73'u8, 0x69'u8, 0x74'u8, 0x69'u8, 0x6f'u8, 0x6e'u8, 0x20'u8, 0x3d'u8, 0x20'u8, # gl_Position = 32 | 0x28'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, # (u_modelViewProj 33 | 0x20'u8, 0x2a'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x29'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, # * tmpvar_1);. 34 | 0x68'u8, 0x69'u8, 0x67'u8, 0x68'u8, 0x70'u8, 0x20'u8, 0x76'u8, 0x65'u8, 0x63'u8, 0x34'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, # highp vec4 tmpva 35 | 0x72'u8, 0x5f'u8, 0x32'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x2e'u8, # r_2;. tmpvar_2. 36 | 0x77'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x30'u8, 0x2e'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, # w = 0.0;. tmpva 37 | 0x72'u8, 0x5f'u8, 0x32'u8, 0x2e'u8, 0x78'u8, 0x79'u8, 0x7a'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x61'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, # r_2.xyz = a_norm 38 | 0x61'u8, 0x6c'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x76'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x20'u8, 0x3d'u8, # al;. v_normal = 39 | 0x20'u8, 0x28'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x5b'u8, 0x30'u8, 0x5d'u8, 0x20'u8, 0x2a'u8, 0x20'u8, 0x74'u8, # (u_model[0] * t 40 | 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x29'u8, 0x2e'u8, 0x78'u8, 0x79'u8, 0x7a'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, # mpvar_2).xyz;. 41 | 0x76'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x30'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x61'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, # v_color0 = a_col 42 | 0x6f'u8, 0x72'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x7d'u8, 0x0a'u8, 0x0a'u8, 0x00'u8] # or0;.}... 43 | vs_metaballs["spv"] = @[ 44 | 0x56'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0xa4'u8, 0x04'u8, 0x03'u8, 0x02'u8, 0x23'u8, 0x07'u8, 0x00'u8, 0x00'u8, # VSH..,.?....#... 45 | 0x01'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0xe8'u8, 0x3e'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x11'u8, 0x00'u8, # .......>........ 46 | 0x02'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x47'u8, 0x4c'u8, # ..............GL 47 | 0x53'u8, 0x4c'u8, 0x2e'u8, 0x73'u8, 0x74'u8, 0x64'u8, 0x2e'u8, 0x34'u8, 0x35'u8, 0x30'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0e'u8, 0x00'u8, # SL.std.450...... 48 | 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 49 | 0x00'u8, 0x00'u8, 0x42'u8, 0x13'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x42'u8, 0x13'u8, # ..B...........B. 50 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x24'u8, 0x47'u8, # ..........`...$G 51 | 0x6c'u8, 0x6f'u8, 0x62'u8, 0x61'u8, 0x6c'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # lobal.....`..... 52 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x76'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x52'u8, 0x65'u8, 0x63'u8, 0x74'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, # ..u_viewRect.... 53 | 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x76'u8, 0x69'u8, 0x65'u8, 0x77'u8, # ..`.......u_view 54 | 0x54'u8, 0x65'u8, 0x78'u8, 0x65'u8, 0x6c'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, # Texel.....`..... 55 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x76'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..u_view......`. 56 | 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x69'u8, 0x6e'u8, 0x76'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x00'u8, # ......u_invView. 57 | 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, # ......`.......u_ 58 | 0x70'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, # proj......`..... 59 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x69'u8, 0x6e'u8, 0x76'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, # ..u_invProj..... 60 | 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x76'u8, 0x69'u8, 0x65'u8, 0x77'u8, # ..`.......u_view 61 | 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, # Proj......`..... 62 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x69'u8, 0x6e'u8, 0x76'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, # ..u_invViewProj. 63 | 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, # ......`.......u_ 64 | 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x09'u8, 0x00'u8, # model.....`..... 65 | 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x00'u8, 0x06'u8, 0x00'u8, # ..u_modelView... 66 | 0x07'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, # ..`.......u_mode 67 | 0x6c'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x60'u8, 0x01'u8, # lViewProj.....`. 68 | 0x00'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x61'u8, 0x6c'u8, 0x70'u8, 0x68'u8, 0x61'u8, 0x52'u8, 0x65'u8, 0x66'u8, # ......u_alphaRef 69 | 0x34'u8, 0x00'u8, 0x47'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x9f'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x40'u8, 0x00'u8, # 4.G...........@. 70 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 71 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, # ......H...`..... 72 | 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..#.......H...`. 73 | 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 74 | 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#... ...H. 75 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 76 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ..H...`......... 77 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 78 | 0x00'u8, 0x00'u8, 0x60'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, # ..`...H...`..... 79 | 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 80 | 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 81 | 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xa0'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#.......H. 82 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 83 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ..H...`......... 84 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 85 | 0x00'u8, 0x00'u8, 0xe0'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0x00'u8, # ......H...`..... 86 | 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 87 | 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 88 | 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#... ...H. 89 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 90 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ..H...`......... 91 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 92 | 0x00'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, # ..`...H...`..... 93 | 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 94 | 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 95 | 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xa0'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#.......H. 96 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 97 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x09'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ..H...`......... 98 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x09'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 99 | 0x00'u8, 0x00'u8, 0xa0'u8, 0x09'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x09'u8, 0x00'u8, # ......H...`..... 100 | 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 101 | 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, # ..........H...`. 102 | 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xe0'u8, 0x09'u8, 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, # ......#.......H. 103 | 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ..`............. 104 | 0x00'u8, 0x00'u8, 0x48'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x23'u8, 0x00'u8, # ..H...`.......#. 105 | 0x00'u8, 0x00'u8, 0x20'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x47'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, # .. ...G...`..... 106 | 0x00'u8, 0x00'u8, 0x13'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x21'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x02'u8, 0x05'u8, # ..........!..... 107 | 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x16'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x0d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, # .............. . 108 | 0x00'u8, 0x00'u8, 0x17'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x1d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ................ 109 | 0x00'u8, 0x00'u8, 0x18'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x1d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ......e......... 110 | 0x00'u8, 0x00'u8, 0x15'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # .......... ..... 111 | 0x00'u8, 0x00'u8, 0x2b'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x0b'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x6a'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, # ..+.......j... . 112 | 0x00'u8, 0x00'u8, 0x1c'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x9f'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x6a'u8, 0x0a'u8, # ..........e...j. 113 | 0x00'u8, 0x00'u8, 0x1e'u8, 0x00'u8, 0x0e'u8, 0x00'u8, 0x60'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x1d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x1d'u8, 0x00'u8, # ......`......... 114 | 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, # ..e...e...e...e. 115 | 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x9f'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, # ..e...e.......e. 116 | 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x1d'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x36'u8, 0x00'u8, 0x05'u8, 0x00'u8, 0x08'u8, 0x00'u8, # ..e.......6..... 117 | 0x00'u8, 0x00'u8, 0x42'u8, 0x13'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0xf8'u8, 0x00'u8, # ..B............. 118 | 0x02'u8, 0x00'u8, 0xe7'u8, 0x3e'u8, 0x00'u8, 0x00'u8, 0xfd'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x38'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8] # ...>......8.... 119 | vs_metaballs["dx9"] = @[ 120 | 0x56'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0x02'u8, 0x00'u8, 0x07'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, # VSH..,.?...u_mod 121 | 0x65'u8, 0x6c'u8, 0x04'u8, 0x20'u8, 0x04'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x0f'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, # el. .....u_model 122 | 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x04'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x90'u8, 0x01'u8, # ViewProj........ 123 | 0x00'u8, 0x03'u8, 0xfe'u8, 0xff'u8, 0xfe'u8, 0xff'u8, 0x2c'u8, 0x00'u8, 0x43'u8, 0x54'u8, 0x41'u8, 0x42'u8, 0x1c'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ......,.CTAB.... 124 | 0x83'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0xfe'u8, 0xff'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x1c'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 125 | 0x00'u8, 0x91'u8, 0x00'u8, 0x00'u8, 0x7c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x44'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x04'u8, 0x00'u8, # ....|...D....... 126 | 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x4c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x5c'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....L........... 127 | 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x6c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........l....... 128 | 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x04'u8, 0x00'u8, # u_model......... 129 | 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x56'u8, # .......u_modelV 130 | 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x04'u8, 0x00'u8, # iewProj......... 131 | 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x76'u8, 0x73'u8, 0x5f'u8, 0x33'u8, 0x5f'u8, 0x30'u8, 0x00'u8, 0x4d'u8, # ........vs_3_0.M 132 | 0x69'u8, 0x63'u8, 0x72'u8, 0x6f'u8, 0x73'u8, 0x6f'u8, 0x66'u8, 0x74'u8, 0x20'u8, 0x28'u8, 0x52'u8, 0x29'u8, 0x20'u8, 0x48'u8, 0x4c'u8, 0x53'u8, # icrosoft (R) HLS 133 | 0x4c'u8, 0x20'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x20'u8, 0x43'u8, 0x6f'u8, 0x6d'u8, 0x70'u8, 0x69'u8, 0x6c'u8, 0x65'u8, # L Shader Compile 134 | 0x72'u8, 0x20'u8, 0x31'u8, 0x30'u8, 0x2e'u8, 0x31'u8, 0x00'u8, 0xab'u8, 0x1f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x80'u8, # r 10.1.......... 135 | 0x00'u8, 0x00'u8, 0x0f'u8, 0x90'u8, 0x1f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x01'u8, 0x00'u8, 0x0f'u8, 0x90'u8, # ................ 136 | 0x1f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x02'u8, 0x00'u8, 0x0f'u8, 0x90'u8, 0x1f'u8, 0x00'u8, 0x00'u8, 0x02'u8, # ................ 137 | 0x00'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0xe0'u8, 0x1f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x0a'u8, 0x00'u8, 0x00'u8, 0x80'u8, # ................ 138 | 0x01'u8, 0x00'u8, 0x0f'u8, 0xe0'u8, 0x1f'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x05'u8, 0x00'u8, 0x01'u8, 0x80'u8, 0x02'u8, 0x00'u8, 0x07'u8, 0xe0'u8, # ................ 139 | 0x05'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0x80'u8, 0x01'u8, 0x00'u8, 0xe4'u8, 0xa0'u8, 0x02'u8, 0x00'u8, 0x55'u8, 0x90'u8, # ..............U. 140 | 0x04'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0xe4'u8, 0xa0'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x90'u8, # ................ 141 | 0x00'u8, 0x00'u8, 0xe4'u8, 0x80'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0x80'u8, 0x02'u8, 0x00'u8, 0xe4'u8, 0xa0'u8, # ................ 142 | 0x02'u8, 0x00'u8, 0xaa'u8, 0x90'u8, 0x00'u8, 0x00'u8, 0xe4'u8, 0x80'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0xe0'u8, # ................ 143 | 0x00'u8, 0x00'u8, 0xe4'u8, 0x80'u8, 0x03'u8, 0x00'u8, 0xe4'u8, 0xa0'u8, 0x05'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x80'u8, # ................ 144 | 0x05'u8, 0x00'u8, 0xe4'u8, 0xa0'u8, 0x01'u8, 0x00'u8, 0x55'u8, 0x90'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x80'u8, # ......U......... 145 | 0x04'u8, 0x00'u8, 0xe4'u8, 0xa0'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x90'u8, 0x00'u8, 0x00'u8, 0xe4'u8, 0x80'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x04'u8, # ................ 146 | 0x02'u8, 0x00'u8, 0x07'u8, 0xe0'u8, 0x06'u8, 0x00'u8, 0xe4'u8, 0xa0'u8, 0x01'u8, 0x00'u8, 0xaa'u8, 0x90'u8, 0x00'u8, 0x00'u8, 0xe4'u8, 0x80'u8, # ................ 147 | 0x01'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x01'u8, 0x00'u8, 0x0f'u8, 0xe0'u8, 0x00'u8, 0x00'u8, 0xe4'u8, 0x90'u8, 0xff'u8, 0xff'u8, 0x00'u8, 0x00'u8, # ................ 148 | 0x00'u8] # . 149 | vs_metaballs["dx11"] = @[ 150 | 0x56'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0x02'u8, 0x00'u8, 0x07'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, # VSH..,.?...u_mod 151 | 0x65'u8, 0x6c'u8, 0x04'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x00'u8, 0x0f'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, # el. .....u_model 152 | 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x04'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x04'u8, 0x00'u8, 0x9c'u8, 0x02'u8, # ViewProj........ 153 | 0x44'u8, 0x58'u8, 0x42'u8, 0x43'u8, 0xc6'u8, 0x4d'u8, 0x04'u8, 0x38'u8, 0x93'u8, 0x20'u8, 0x89'u8, 0x1c'u8, 0xbe'u8, 0x68'u8, 0xbc'u8, 0xd4'u8, # DXBC.M.8. ...h.. 154 | 0xee'u8, 0x2f'u8, 0x8a'u8, 0xe9'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x9c'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ./.............. 155 | 0x2c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x9c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x10'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x49'u8, 0x53'u8, 0x47'u8, 0x4e'u8, # ,...........ISGN 156 | 0x68'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x50'u8, 0x00'u8, 0x00'u8, 0x00'u8, # h...........P... 157 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 158 | 0x0f'u8, 0x0f'u8, 0x00'u8, 0x00'u8, 0x56'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....V........... 159 | 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x07'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x5d'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ............]... 160 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 161 | 0x07'u8, 0x07'u8, 0x00'u8, 0x00'u8, 0x43'u8, 0x4f'u8, 0x4c'u8, 0x4f'u8, 0x52'u8, 0x00'u8, 0x4e'u8, 0x4f'u8, 0x52'u8, 0x4d'u8, 0x41'u8, 0x4c'u8, # ....COLOR.NORMAL 162 | 0x00'u8, 0x50'u8, 0x4f'u8, 0x53'u8, 0x49'u8, 0x54'u8, 0x49'u8, 0x4f'u8, 0x4e'u8, 0x00'u8, 0xab'u8, 0xab'u8, 0x4f'u8, 0x53'u8, 0x47'u8, 0x4e'u8, # .POSITION...OSGN 163 | 0x6c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x50'u8, 0x00'u8, 0x00'u8, 0x00'u8, # l...........P... 164 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 165 | 0x0f'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x5c'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 166 | 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x0f'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x62'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ............b... 167 | 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 168 | 0x07'u8, 0x08'u8, 0x00'u8, 0x00'u8, 0x53'u8, 0x56'u8, 0x5f'u8, 0x50'u8, 0x4f'u8, 0x53'u8, 0x49'u8, 0x54'u8, 0x49'u8, 0x4f'u8, 0x4e'u8, 0x00'u8, # ....SV_POSITION. 169 | 0x43'u8, 0x4f'u8, 0x4c'u8, 0x4f'u8, 0x52'u8, 0x00'u8, 0x54'u8, 0x45'u8, 0x58'u8, 0x43'u8, 0x4f'u8, 0x4f'u8, 0x52'u8, 0x44'u8, 0x00'u8, 0xab'u8, # COLOR.TEXCOORD.. 170 | 0x53'u8, 0x48'u8, 0x44'u8, 0x52'u8, 0x84'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x40'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x61'u8, 0x00'u8, 0x00'u8, 0x00'u8, # SHDR....@...a... 171 | 0x59'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0x46'u8, 0x8e'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x84'u8, 0x00'u8, 0x00'u8, 0x00'u8, # Y...F. ......... 172 | 0x5f'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0xf2'u8, 0x10'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x5f'u8, 0x00'u8, 0x00'u8, 0x03'u8, # _..........._... 173 | 0x72'u8, 0x10'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x5f'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x72'u8, 0x10'u8, 0x10'u8, 0x00'u8, # r......._...r... 174 | 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x67'u8, 0x00'u8, 0x00'u8, 0x04'u8, 0xf2'u8, 0x20'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....g.... ...... 175 | 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x65'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0xf2'u8, 0x20'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....e.... ...... 176 | 0x65'u8, 0x00'u8, 0x00'u8, 0x03'u8, 0x72'u8, 0x20'u8, 0x10'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x68'u8, 0x00'u8, 0x00'u8, 0x02'u8, # e...r ......h... 177 | 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x38'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0xf2'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....8........... 178 | 0x56'u8, 0x15'u8, 0x10'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x8e'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # V.......F. ..... 179 | 0x81'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x32'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0xf2'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....2........... 180 | 0x46'u8, 0x8e'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x80'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x06'u8, 0x10'u8, 0x10'u8, 0x00'u8, # F. ............. 181 | 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x0e'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x32'u8, 0x00'u8, 0x00'u8, 0x0a'u8, # ....F.......2... 182 | 0xf2'u8, 0x00'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x8e'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........F. ..... 183 | 0x82'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xa6'u8, 0x1a'u8, 0x10'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x0e'u8, 0x10'u8, 0x00'u8, # ............F... 184 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0xf2'u8, 0x20'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ......... ...... 185 | 0x46'u8, 0x0e'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x8e'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # F.......F. ..... 186 | 0x83'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x36'u8, 0x00'u8, 0x00'u8, 0x05'u8, 0xf2'u8, 0x20'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....6.... ...... 187 | 0x46'u8, 0x1e'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x38'u8, 0x00'u8, 0x00'u8, 0x08'u8, 0x72'u8, 0x00'u8, 0x10'u8, 0x00'u8, # F.......8...r... 188 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x56'u8, 0x15'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x82'u8, 0x20'u8, 0x00'u8, # ....V.......F. . 189 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x32'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x72'u8, 0x00'u8, 0x10'u8, 0x00'u8, # ........2...r... 190 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x82'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ....F. ......... 191 | 0x06'u8, 0x10'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x02'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ........F....... 192 | 0x32'u8, 0x00'u8, 0x00'u8, 0x0a'u8, 0x72'u8, 0x20'u8, 0x10'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x46'u8, 0x82'u8, 0x20'u8, 0x00'u8, # 2...r ......F. . 193 | 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x02'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0xa6'u8, 0x1a'u8, 0x10'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x00'u8, # ................ 194 | 0x46'u8, 0x02'u8, 0x10'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x00'u8, 0x3e'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x03'u8, 0x05'u8, 0x00'u8, # F.......>....... 195 | 0x02'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x40'u8, 0x08'u8] # ....@. 196 | vs_metaballs["mtl"] = @[ 197 | 0x56'u8, 0x53'u8, 0x48'u8, 0x04'u8, 0x03'u8, 0x2c'u8, 0xf5'u8, 0x3f'u8, 0x02'u8, 0x00'u8, 0x07'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, # VSH..,.?...u_mod 198 | 0x65'u8, 0x6c'u8, 0x04'u8, 0x20'u8, 0x00'u8, 0x00'u8, 0x20'u8, 0x00'u8, 0x0f'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, # el. .. ..u_model 199 | 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x04'u8, 0x01'u8, 0x00'u8, 0x00'u8, 0x01'u8, 0x00'u8, 0x50'u8, 0x03'u8, # ViewProj......P. 200 | 0x00'u8, 0x00'u8, 0x75'u8, 0x73'u8, 0x69'u8, 0x6e'u8, 0x67'u8, 0x20'u8, 0x6e'u8, 0x61'u8, 0x6d'u8, 0x65'u8, 0x73'u8, 0x70'u8, 0x61'u8, 0x63'u8, # ..using namespac 201 | 0x65'u8, 0x20'u8, 0x6d'u8, 0x65'u8, 0x74'u8, 0x61'u8, 0x6c'u8, 0x3b'u8, 0x0a'u8, 0x73'u8, 0x74'u8, 0x72'u8, 0x75'u8, 0x63'u8, 0x74'u8, 0x20'u8, # e metal;.struct 202 | 0x78'u8, 0x6c'u8, 0x61'u8, 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x49'u8, 0x6e'u8, 0x70'u8, # xlatMtlShaderInp 203 | 0x75'u8, 0x74'u8, 0x20'u8, 0x7b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x20'u8, 0x61'u8, 0x5f'u8, # ut {. float4 a_ 204 | 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x30'u8, 0x20'u8, 0x5b'u8, 0x5b'u8, 0x61'u8, 0x74'u8, 0x74'u8, 0x72'u8, 0x69'u8, 0x62'u8, 0x75'u8, # color0 [[attribu 205 | 0x74'u8, 0x65'u8, 0x28'u8, 0x30'u8, 0x29'u8, 0x5d'u8, 0x5d'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, # te(0)]];. float 206 | 0x33'u8, 0x20'u8, 0x61'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x20'u8, 0x5b'u8, 0x5b'u8, 0x61'u8, 0x74'u8, 0x74'u8, # 3 a_normal [[att 207 | 0x72'u8, 0x69'u8, 0x62'u8, 0x75'u8, 0x74'u8, 0x65'u8, 0x28'u8, 0x31'u8, 0x29'u8, 0x5d'u8, 0x5d'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, # ribute(1)]];. f 208 | 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x33'u8, 0x20'u8, 0x61'u8, 0x5f'u8, 0x70'u8, 0x6f'u8, 0x73'u8, 0x69'u8, 0x74'u8, 0x69'u8, 0x6f'u8, 0x6e'u8, # loat3 a_position 209 | 0x20'u8, 0x5b'u8, 0x5b'u8, 0x61'u8, 0x74'u8, 0x74'u8, 0x72'u8, 0x69'u8, 0x62'u8, 0x75'u8, 0x74'u8, 0x65'u8, 0x28'u8, 0x32'u8, 0x29'u8, 0x5d'u8, # [[attribute(2)] 210 | 0x5d'u8, 0x3b'u8, 0x0a'u8, 0x7d'u8, 0x3b'u8, 0x0a'u8, 0x73'u8, 0x74'u8, 0x72'u8, 0x75'u8, 0x63'u8, 0x74'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, # ];.};.struct xla 211 | 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x4f'u8, 0x75'u8, 0x74'u8, 0x70'u8, 0x75'u8, 0x74'u8, # tMtlShaderOutput 212 | 0x20'u8, 0x7b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x20'u8, 0x67'u8, 0x6c'u8, 0x5f'u8, 0x50'u8, # {. float4 gl_P 213 | 0x6f'u8, 0x73'u8, 0x69'u8, 0x74'u8, 0x69'u8, 0x6f'u8, 0x6e'u8, 0x20'u8, 0x5b'u8, 0x5b'u8, 0x70'u8, 0x6f'u8, 0x73'u8, 0x69'u8, 0x74'u8, 0x69'u8, # osition [[positi 214 | 0x6f'u8, 0x6e'u8, 0x5d'u8, 0x5d'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x20'u8, 0x76'u8, # on]];. float4 v 215 | 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, # _color0;. float 216 | 0x33'u8, 0x20'u8, 0x76'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x3b'u8, 0x0a'u8, 0x7d'u8, 0x3b'u8, 0x0a'u8, 0x73'u8, # 3 v_normal;.};.s 217 | 0x74'u8, 0x72'u8, 0x75'u8, 0x63'u8, 0x74'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, # truct xlatMtlSha 218 | 0x64'u8, 0x65'u8, 0x72'u8, 0x55'u8, 0x6e'u8, 0x69'u8, 0x66'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x20'u8, 0x7b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, # derUniform {. f 219 | 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x78'u8, 0x34'u8, 0x20'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x5b'u8, # loat4x4 u_model[ 220 | 0x33'u8, 0x32'u8, 0x5d'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x78'u8, 0x34'u8, 0x20'u8, # 32];. float4x4 221 | 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x56'u8, 0x69'u8, 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x3b'u8, # u_modelViewProj; 222 | 0x0a'u8, 0x7d'u8, 0x3b'u8, 0x0a'u8, 0x76'u8, 0x65'u8, 0x72'u8, 0x74'u8, 0x65'u8, 0x78'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, 0x74'u8, 0x4d'u8, # .};.vertex xlatM 223 | 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x4f'u8, 0x75'u8, 0x74'u8, 0x70'u8, 0x75'u8, 0x74'u8, 0x20'u8, 0x78'u8, # tlShaderOutput x 224 | 0x6c'u8, 0x61'u8, 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x4d'u8, 0x61'u8, 0x69'u8, 0x6e'u8, 0x20'u8, 0x28'u8, 0x78'u8, 0x6c'u8, 0x61'u8, 0x74'u8, # latMtlMain (xlat 225 | 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x49'u8, 0x6e'u8, 0x70'u8, 0x75'u8, 0x74'u8, 0x20'u8, 0x5f'u8, # MtlShaderInput _ 226 | 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x69'u8, 0x20'u8, 0x5b'u8, 0x5b'u8, 0x73'u8, 0x74'u8, 0x61'u8, 0x67'u8, 0x65'u8, 0x5f'u8, 0x69'u8, 0x6e'u8, # mtl_i [[stage_in 227 | 0x5d'u8, 0x5d'u8, 0x2c'u8, 0x20'u8, 0x63'u8, 0x6f'u8, 0x6e'u8, 0x73'u8, 0x74'u8, 0x61'u8, 0x6e'u8, 0x74'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, # ]], constant xla 228 | 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x55'u8, 0x6e'u8, 0x69'u8, 0x66'u8, 0x6f'u8, 0x72'u8, # tMtlShaderUnifor 229 | 0x6d'u8, 0x26'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x75'u8, 0x20'u8, 0x5b'u8, 0x5b'u8, 0x62'u8, 0x75'u8, 0x66'u8, 0x66'u8, # m& _mtl_u [[buff 230 | 0x65'u8, 0x72'u8, 0x28'u8, 0x30'u8, 0x29'u8, 0x5d'u8, 0x5d'u8, 0x29'u8, 0x0a'u8, 0x7b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x78'u8, 0x6c'u8, 0x61'u8, # er(0)]]).{. xla 231 | 0x74'u8, 0x4d'u8, 0x74'u8, 0x6c'u8, 0x53'u8, 0x68'u8, 0x61'u8, 0x64'u8, 0x65'u8, 0x72'u8, 0x4f'u8, 0x75'u8, 0x74'u8, 0x70'u8, 0x75'u8, 0x74'u8, # tMtlShaderOutput 232 | 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x6f'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, # _mtl_o;. float 233 | 0x34'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, # 4 tmpvar_1 = 0;. 234 | 0x20'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x2e'u8, 0x77'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x31'u8, # tmpvar_1.w = 1 235 | 0x2e'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x31'u8, 0x2e'u8, 0x78'u8, # .0;. tmpvar_1.x 236 | 0x79'u8, 0x7a'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x69'u8, 0x2e'u8, 0x61'u8, 0x5f'u8, 0x70'u8, 0x6f'u8, # yz = _mtl_i.a_po 237 | 0x73'u8, 0x69'u8, 0x74'u8, 0x69'u8, 0x6f'u8, 0x6e'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x6f'u8, # sition;. _mtl_o 238 | 0x2e'u8, 0x67'u8, 0x6c'u8, 0x5f'u8, 0x50'u8, 0x6f'u8, 0x73'u8, 0x69'u8, 0x74'u8, 0x69'u8, 0x6f'u8, 0x6e'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x28'u8, # .gl_Position = ( 239 | 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x75'u8, 0x2e'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x56'u8, 0x69'u8, # _mtl_u.u_modelVi 240 | 0x65'u8, 0x77'u8, 0x50'u8, 0x72'u8, 0x6f'u8, 0x6a'u8, 0x20'u8, 0x2a'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, # ewProj * tmpvar_ 241 | 0x31'u8, 0x29'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x66'u8, 0x6c'u8, 0x6f'u8, 0x61'u8, 0x74'u8, 0x34'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, # 1);. float4 tmp 242 | 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, # var_2 = 0;. tmp 243 | 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x2e'u8, 0x77'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x30'u8, 0x2e'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, # var_2.w = 0.0;. 244 | 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, 0x5f'u8, 0x32'u8, 0x2e'u8, 0x78'u8, 0x79'u8, 0x7a'u8, 0x20'u8, 0x3d'u8, 0x20'u8, # tmpvar_2.xyz = 245 | 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x69'u8, 0x2e'u8, 0x61'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, 0x61'u8, 0x6c'u8, 0x3b'u8, # _mtl_i.a_normal; 246 | 0x0a'u8, 0x20'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x6f'u8, 0x2e'u8, 0x76'u8, 0x5f'u8, 0x6e'u8, 0x6f'u8, 0x72'u8, 0x6d'u8, # . _mtl_o.v_norm 247 | 0x61'u8, 0x6c'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x28'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x75'u8, 0x2e'u8, 0x75'u8, 0x5f'u8, 0x6d'u8, # al = (_mtl_u.u_m 248 | 0x6f'u8, 0x64'u8, 0x65'u8, 0x6c'u8, 0x5b'u8, 0x30'u8, 0x5d'u8, 0x20'u8, 0x2a'u8, 0x20'u8, 0x74'u8, 0x6d'u8, 0x70'u8, 0x76'u8, 0x61'u8, 0x72'u8, # odel[0] * tmpvar 249 | 0x5f'u8, 0x32'u8, 0x29'u8, 0x2e'u8, 0x78'u8, 0x79'u8, 0x7a'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, # _2).xyz;. _mtl_ 250 | 0x6f'u8, 0x2e'u8, 0x76'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x30'u8, 0x20'u8, 0x3d'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, # o.v_color0 = _mt 251 | 0x6c'u8, 0x5f'u8, 0x69'u8, 0x2e'u8, 0x61'u8, 0x5f'u8, 0x63'u8, 0x6f'u8, 0x6c'u8, 0x6f'u8, 0x72'u8, 0x30'u8, 0x3b'u8, 0x0a'u8, 0x20'u8, 0x20'u8, # l_i.a_color0;. 252 | 0x72'u8, 0x65'u8, 0x74'u8, 0x75'u8, 0x72'u8, 0x6e'u8, 0x20'u8, 0x5f'u8, 0x6d'u8, 0x74'u8, 0x6c'u8, 0x5f'u8, 0x6f'u8, 0x3b'u8, 0x0a'u8, 0x7d'u8, # return _mtl_o;.} 253 | 0x0a'u8, 0x0a'u8, 0x00'u8] # ... 254 | -------------------------------------------------------------------------------- /examples/bgfx_utils.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Port for bgfx utilities 4 | 5 | import bgfx.bgfx 6 | 7 | proc LoadMemory*(path: string): ptr bgfx.Memory = 8 | var file: File 9 | if open(file, path): 10 | var size = getFileSize(file) 11 | var mem = bgfx.Alloc(cast[uint32](size+1)) 12 | assert size == readBuffer(file, mem.data, size) 13 | close(file) 14 | let memoryEnd: ptr uint8 = cast[ptr uint8](cast[int](mem.data) + cast[int](size)) 15 | memoryEnd[] = cast[uint8]('\0') 16 | return mem 17 | return nil 18 | 19 | proc ToMemory*(data: var seq[uint8]): ptr bgfx.Memory = 20 | var size = data.len() 21 | var mem = bgfx.Alloc(cast[uint32](size+1)) 22 | copyMem(mem.data, addr(data[0]), size) 23 | cast[ptr uint8](cast[int](mem.data) + cast[int](size))[] = cast[uint8]('\0') 24 | return mem 25 | 26 | proc LoadShader*(name: string): bgfx.ShaderHandle = 27 | var path = "./" 28 | case bgfx.GetRendererType() 29 | of bgfx.RendererType_Direct3D11, bgfx.RendererType_Direct3D12: 30 | path &= "shaders/dx11/" 31 | of bgfx.RendererType_OpenGL: 32 | path &= "shaders/glsl/" 33 | of bgfx.RendererType_OpenGLES: 34 | path &= "shaders/gles/" 35 | of bgfx.RendererType_Metal: 36 | path &= "shaders/metal/" 37 | of bgfx.RendererType_Gnm: 38 | path &= "shaders/gnm/" 39 | of bgfx.RendererType_Vulkan: 40 | path &= "shaders/spirv/" 41 | of bgfx.RendererType_Direct3D9: 42 | path &= "shaders/dx9/" 43 | else: 44 | raise newException(SystemError, "Invalid bgfx renderer type") 45 | path &= name & ".bin" 46 | return bgfx.CreateShader(LoadMemory(path)) 47 | 48 | proc LoadProgram*(vertData, fragData: var seq[uint8]): bgfx.ProgramHandle = 49 | return bgfx.CreateProgram(bgfx.CreateShader(ToMemory(vertData)), bgfx.CreateShader(ToMemory(fragData)), true) 50 | 51 | proc LoadProgram*(vertName: string, fragName: string): bgfx.ProgramHandle = 52 | return bgfx.CreateProgram(LoadShader(vertName), LoadShader(fragName), true) 53 | 54 | proc LoadProgram*(compName: string): bgfx.ProgramHandle = 55 | return bgfx.CreateProgram(LoadShader(compName), true) 56 | -------------------------------------------------------------------------------- /examples/glfw_platform.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Helper functions for glfw platform related code 4 | 5 | {.deadCodeElim: on.} 6 | 7 | import glfw3 as glfw 8 | import bgfx.bgfx, bgfx.platform 9 | import strutils 10 | 11 | when defined(Windows): 12 | import glfw3native.Win32 as glfwn 13 | elif defined(MacOSX): 14 | import glfw3native.Cocoa as glfwn 15 | elif defined(Linux) or 16 | defined(FreeBSD) or 17 | defined(OpenBSD) or 18 | defined(NetBSD) or 19 | defined(Solaris) or 20 | defined(QNX): 21 | import glfw3native.X11 as glfwn 22 | 23 | proc GetTime*(): float64 = 24 | return cast[float64](glfw.GetTime()) 25 | 26 | proc GLFWErrorCB(errorCode: cint; description: cstring) {.cdecl.} = 27 | debugEcho "[GLFW3] error: $1, $2".format(errorCode, description) 28 | 29 | proc LinkGLFW3WithBGFX(window: Window) = 30 | var pd: ptr PlatformData = create(PlatformData) 31 | when defined(Windows): 32 | pd.nwh = glfwn.GetWin32Window(window) 33 | pd.ndt = nil 34 | elif defined(MacOSX): 35 | pd.nwh = glfwn.GetCocoaWindow(window) 36 | pd.ndt = nil 37 | elif defined(Linux) or 38 | defined(FreeBSD) or 39 | defined(OpenBSD) or 40 | defined(NetBSD) or 41 | defined(Solaris) or 42 | defined(QNX): 43 | pd.nwh = cast[pointer](glfwn.GetX11Window(window)) 44 | pd.ndt = glfwn.GetX11Display() 45 | else: 46 | {.fatal: "Exposure of glfw3native functions is required".} 47 | pd.backBuffer = nil 48 | pd.backBufferDS = nil 49 | pd.context = nil 50 | SetPlatformData(pd) 51 | 52 | proc StartExample*[Example]() = 53 | var app: Example = Example() 54 | 55 | # Set up 56 | discard glfw.SetErrorCallback(GLFWErrorCB) 57 | 58 | if glfw.Init() != glfw.TRUE: 59 | echo "[GLFW3] Failed to initialize!" 60 | quit(QuitFailure) 61 | 62 | glfw.WindowHint(glfw.CLIENT_API, glfw.NO_API) 63 | var window: Window 64 | window = glfw.CreateWindow(1280, 720, "", nil, nil) 65 | if window == nil: 66 | echo "[GLFW3] Failed to create window!" 67 | quit(QuitFailure) 68 | glfw.SetWindowUserPointer(window, app.addr) 69 | 70 | LinkGLFW3WithBGFX(window) 71 | 72 | app.Start() 73 | 74 | while true: 75 | glfw.PollEvents() 76 | var current_width, current_height: cint 77 | var current_window_width, current_window_height: cint 78 | glfw.GetFramebufferSize(window, current_width.addr, current_height.addr) 79 | glfw.GetWindowSize(window, current_window_width.addr, current_window_height.addr) 80 | if cast[uint32](current_width) != app.m_width or cast[uint32](current_height) != app.m_height: 81 | echo "Window resize: ($1, $2)".format(current_width, current_height) 82 | app.m_width = cast[uint32](current_width) 83 | app.m_height = cast[uint32](current_height) 84 | app.m_window_width = cast[uint32](current_window_width) 85 | app.m_window_height = cast[uint32](current_window_height) 86 | bgfx.Reset(cast[uint16](app.m_window_width), cast[uint16](app.m_window_height), app.m_reset) 87 | if glfw.WindowShouldClose(window) != 0: 88 | break 89 | app.Update() 90 | 91 | app.CleanUp() 92 | 93 | glfw.DestroyWindow(window) 94 | glfw.Terminate() 95 | -------------------------------------------------------------------------------- /examples/sdl_platform.nim: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Cory Noll Crimmins - Golden 2 | # License: BSD-2 3 | # Helper functions for sdl2 platform related code 4 | 5 | {.deadCodeElim: on.} 6 | 7 | import sdl2/sdl, sdl2/sdl_syswm 8 | import bgfx.bgfx 9 | import bgfx.platform 10 | import strutils 11 | 12 | proc GetTime*(): float64 = 13 | return cast[float64](getPerformanceCounter()*1000) / cast[float64](getPerformanceFrequency()) 14 | 15 | proc LinkSDL2WithBGFX(window: Window) = 16 | var pd: ptr PlatformData = create(PlatformData) 17 | var info: SysWMinfo 18 | version(info.version) 19 | assert getWindowWMInfo(window, addr(info)) 20 | echo "SDL2 version: $1.$2.$3 - Subsystem: $4".format(info.version.major.int, info.version.minor.int, info.version.patch.int, info.subsystem) 21 | case(info.subsystem): 22 | of SysWM_Windows: 23 | when defined(windows): 24 | pd.nwh = cast[pointer](info.info.win.window) 25 | pd.ndt = nil 26 | of SysWM_X11: 27 | when defined(linux): 28 | pd.nwh = cast[pointer](info.info.x11.window) 29 | pd.ndt = cast[pointer](info.info.x11.display) 30 | of SysWM_Cocoa: 31 | when defined(osx): 32 | pd.nwh = cast[pointer](info.info.cocoa.window) 33 | pd.ndt = nil 34 | else: 35 | echo "[SDL2] failed to get handle: $1".format(sdl.getError()) 36 | raise newException(OSError, "No structure for subsystem type") 37 | 38 | pd.backBuffer = nil 39 | pd.backBufferDS = nil 40 | pd.context = nil 41 | SetPlatformData(pd) 42 | 43 | proc StartExample*[Example]() = 44 | var app: Example = Example() 45 | 46 | if init(0) != 0: 47 | echo "[SDL2] Failed to initialize!" 48 | quit(QuitFailure) 49 | 50 | var window: Window 51 | window = createWindow("", 52 | WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED, 53 | 1280, 720, 54 | WINDOW_SHOWN or WINDOW_RESIZABLE) 55 | if window == nil: 56 | echo "[SDL2] Failed to create window!" 57 | quit(QuitFailure) 58 | 59 | LinkSDL2WithBGFX(window) 60 | 61 | app.Start() 62 | 63 | var evt: sdl.Event 64 | 65 | while true: 66 | while sdl.pollEvent(evt.addr) == 1: 67 | if(evt.kind == sdl.Quit): 68 | break 69 | elif(evt.kind == sdl.WINDOWEVENT): 70 | var windowEvent = cast[WindowEventObj](evt.addr) 71 | var current_width, current_height: cint 72 | sdl.glGetDrawableSize(window, current_width.addr, current_height.addr) 73 | if cast[uint32](current_width) != app.m_width or cast[uint32](current_height) != app.m_height: 74 | echo "Window resize: ($1, $2)".format(current_width, current_height) 75 | app.m_width = cast[uint32](current_width) 76 | app.m_height = cast[uint32](current_height) 77 | app.m_window_width = cast[uint32](windowEvent.data1) 78 | app.m_window_height = cast[uint32](windowEvent.data2) 79 | bgfx.Reset(cast[uint16](app.m_window_width), cast[uint16](app.m_window_height), app.m_reset) 80 | app.Update() 81 | 82 | app.CleanUp() 83 | 84 | destroyWindow(window) 85 | sdl.quit() 86 | --------------------------------------------------------------------------------