Showing preview only (4,170K chars total). Download the full file or copy to clipboard to get everything.
Repository: keith2018/spvm
Branch: main
Commit: a232ea822562
Files: 146
Total size: 4.0 MB
Directory structure:
gitextract_k9sxd0lm/
├── .clang-tidy
├── .gitattributes
├── .github/
│ └── workflows/
│ ├── cmake_linux.yml
│ ├── cmake_macos.yml
│ └── cmake_windows.yml
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── LICENSE
├── OPCODE_CORE.md
├── OPCODE_EXT.md
├── README.md
├── example/
│ ├── CMakeLists.txt
│ ├── main.cpp
│ └── shaders/
│ ├── simple.frag
│ ├── simple.frag.spv
│ └── simple.frag.spv.txt
├── shadertoy/
│ ├── CMakeLists.txt
│ ├── assets/
│ │ ├── shaders/
│ │ │ ├── Nt3BzM.frag
│ │ │ ├── XdlSDs.frag
│ │ │ ├── basic.frag
│ │ │ ├── fstyD4.frag
│ │ │ └── ftdfWn.frag
│ │ └── wrapper.frag
│ ├── compiler.cpp
│ ├── compiler.h
│ ├── main.cpp
│ ├── renderer.cpp
│ ├── renderer.h
│ ├── resourcelimits.cpp
│ ├── resourcelimits.h
│ ├── settingpanel.cpp
│ ├── settingpanel.h
│ ├── settings.h
│ ├── third_party/
│ │ ├── glad/
│ │ │ ├── include/
│ │ │ │ ├── KHR/
│ │ │ │ │ └── khrplatform.h
│ │ │ │ └── glad/
│ │ │ │ └── glad.h
│ │ │ └── src/
│ │ │ └── glad.c
│ │ ├── glfw/
│ │ │ ├── include/
│ │ │ │ └── GLFW/
│ │ │ │ ├── glfw3.h
│ │ │ │ └── glfw3native.h
│ │ │ ├── lib-macos-universal/
│ │ │ │ └── libglfw3.a
│ │ │ ├── lib-mingw-w64/
│ │ │ │ ├── libglfw3.a
│ │ │ │ └── libglfw3dll.a
│ │ │ └── lib-vc2022/
│ │ │ ├── glfw3.lib
│ │ │ ├── glfw3_mt.lib
│ │ │ └── glfw3dll.lib
│ │ ├── imgui/
│ │ │ └── imgui/
│ │ │ ├── imconfig.h
│ │ │ ├── imgui.cpp
│ │ │ ├── imgui.h
│ │ │ ├── imgui_demo.cpp
│ │ │ ├── imgui_draw.cpp
│ │ │ ├── imgui_impl_glfw.cpp
│ │ │ ├── imgui_impl_glfw.h
│ │ │ ├── imgui_impl_opengl3.cpp
│ │ │ ├── imgui_impl_opengl3.h
│ │ │ ├── imgui_impl_opengl3_loader.h
│ │ │ ├── imgui_internal.h
│ │ │ ├── imgui_tables.cpp
│ │ │ ├── imgui_widgets.cpp
│ │ │ ├── imstb_rectpack.h
│ │ │ ├── imstb_textedit.h
│ │ │ └── imstb_truetype.h
│ │ └── stb/
│ │ └── include/
│ │ └── stb/
│ │ ├── stb_image.h
│ │ └── stb_image_write.h
│ ├── threadpool.h
│ ├── timer.cpp
│ └── timer.h
├── src/
│ ├── CMakeLists.txt
│ ├── decoder.cpp
│ ├── decoder.h
│ ├── ext/
│ │ ├── GLSL.std.450.h
│ │ └── GLSL.std.450.inc
│ ├── image.cpp
│ ├── image.h
│ ├── interface.cpp
│ ├── interface.h
│ ├── logger.cpp
│ ├── logger.h
│ ├── module.cpp
│ ├── module.h
│ ├── opcodes.inc
│ ├── opstrings.h
│ ├── runtime.cpp
│ ├── runtime.h
│ ├── spirv.h
│ ├── spvm.cpp
│ ├── spvm.h
│ └── utils.h
└── test/
├── CMakeLists.txt
├── assets/
│ ├── arithmetic_0.frag
│ ├── arithmetic_0.frag.spv
│ ├── arithmetic_0.frag.spv.txt
│ ├── arithmetic_1.frag
│ ├── arithmetic_1.frag.spv
│ ├── arithmetic_1.frag.spv.txt
│ ├── array.frag
│ ├── array.frag.spv
│ ├── array.frag.spv.txt
│ ├── assert.glsl
│ ├── bit.frag
│ ├── bit.frag.spv
│ ├── bit.frag.spv.txt
│ ├── built_in.vert
│ ├── built_in.vert.spv
│ ├── built_in.vert.spv.txt
│ ├── composite.frag
│ ├── composite.frag.spv
│ ├── composite.frag.spv.txt
│ ├── control_flow.frag
│ ├── control_flow.frag.spv
│ ├── control_flow.frag.spv.txt
│ ├── conversion.frag
│ ├── conversion.frag.spv
│ ├── conversion.frag.spv.txt
│ ├── derivative.frag
│ ├── derivative.frag.spv
│ ├── derivative.frag.spv.txt
│ ├── function.frag
│ ├── function.frag.spv
│ ├── function.frag.spv.txt
│ ├── glsl_std_450_0.frag
│ ├── glsl_std_450_0.frag.spv
│ ├── glsl_std_450_0.frag.spv.txt
│ ├── glsl_std_450_1.frag
│ ├── glsl_std_450_1.frag.spv
│ ├── glsl_std_450_1.frag.spv.txt
│ ├── glsl_std_450_2.frag
│ ├── glsl_std_450_2.frag.spv
│ ├── glsl_std_450_2.frag.spv.txt
│ ├── image.frag
│ ├── image.frag.spv
│ ├── image.frag.spv.txt
│ ├── location.frag
│ ├── location.frag.spv
│ ├── location.frag.spv.txt
│ ├── relational_logical.frag
│ ├── relational_logical.frag.spv
│ ├── relational_logical.frag.spv.txt
│ ├── uniform_block.vert
│ ├── uniform_block.vert.spv
│ └── uniform_block.vert.spv.txt
├── main.cpp
├── test.h
├── test_core.cpp
├── test_ext.cpp
├── test_image.cpp
└── tools/
└── glsl.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-tidy
================================================
Checks: '-modernize-use-auto'
================================================
FILE: .gitattributes
================================================
shadertoy/third_party/** linguist-vendored
test/googletest/** linguist-vendored
================================================
FILE: .github/workflows/cmake_linux.yml
================================================
name: CMake Linux
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
env:
BUILD_TYPE: Release
jobs:
build_linux:
name: build_linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install OpenGL Library
run: sudo apt-get install -y libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev libglfw3 libglfw3-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
run: cd ${{github.workspace}}/build && ctest
================================================
FILE: .github/workflows/cmake_macos.yml
================================================
name: CMake MacOS
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
env:
BUILD_TYPE: Release
jobs:
build_macOS:
name: build_macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
run: cd ${{github.workspace}}/build && ctest
================================================
FILE: .github/workflows/cmake_windows.yml
================================================
name: CMake Windows
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
env:
BUILD_TYPE: Release
jobs:
build_windows:
name: build_windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
run: cd ${{github.workspace}}/build && ctest
================================================
FILE: .gitignore
================================================
.idea
.vscode
cmake-build*/
build/
bin/spvm*
================================================
FILE: .gitmodules
================================================
[submodule "shadertoy/third_party/glslang"]
path = shadertoy/third_party/glslang
url = https://github.com/KhronosGroup/glslang
[submodule "test/googletest"]
path = test/googletest
url = https://github.com/google/googletest
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.3)
project(spvm)
set(CMAKE_CXX_STANDARD 11)
add_subdirectory(src)
add_subdirectory(shadertoy)
option(BUILD_EXAMPLE "Whether or not to build the example" ON)
if (${BUILD_EXAMPLE})
message(STATUS "Building example")
add_subdirectory(example)
endif ()
option(BUILD_TEST "Whether or not to build the tests" ON)
if (${BUILD_TEST})
message(STATUS "Building tests")
enable_testing()
add_subdirectory(test)
endif ()
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2022 keith2018
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: OPCODE_CORE.md
================================================
## SPIR-V 1.0
| Type | Opcode | Status |
|-------------------------------------|-------------------------------------------|---------|
| Miscellaneous Instructions | OpNop | ✅DONE |
| | OpUndef | 🟥TODO |
| Debug Instructions | OpSourceContinued | 🟥TODO |
| | OpSource | ✅DONE |
| | OpSourceExtension | ✅DONE |
| | OpName | ✅DONE |
| | OpMemberName | ✅DONE |
| | OpString | 🟥TODO |
| | OpLine | 🟥TODO |
| | OpNoLine | 🟥TODO |
| Annotation Instructions | OpDecorate | ✅DONE |
| | OpMemberDecorate | ✅DONE |
| | OpDecorationGroup | 🟥TODO |
| | OpGroupDecorate | 🟥TODO |
| | OpGroupMemberDecorate | 🟥TODO |
| Extension Instructions | OpExtension | ✅DONE |
| | OpExtInstImport | ✅DONE |
| | OpExtInst | ✅DONE |
| Mode-Setting Instructions | OpMemoryModel | ✅DONE |
| | OpEntryPoint | ✅DONE |
| | OpExecutionMode | ✅DONE |
| | OpCapability | ✅DONE |
| Type-Declaration Instructions | OpTypeVoid | ✅DONE |
| | OpTypeBool | ✅DONE |
| | OpTypeInt | ✅DONE |
| | OpTypeFloat | ✅DONE |
| | OpTypeVector | ✅DONE |
| | OpTypeMatrix | ✅DONE |
| | OpTypeImage | ✅DONE |
| | OpTypeSampler | ✅DONE |
| | OpTypeSampledImage | ✅DONE |
| | OpTypeArray | ✅DONE |
| | OpTypeRuntimeArray | ✅DONE |
| | OpTypeStruct | ✅DONE |
| | OpTypeOpaque | 🟥TODO |
| | OpTypePointer | ✅DONE |
| | OpTypeFunction | ✅DONE |
| | OpTypeEvent | 🟥TODO |
| | OpTypeDeviceEvent | 🟥TODO |
| | OpTypeReserveId | 🟥TODO |
| | OpTypeQueue | 🟥TODO |
| | OpTypePipe | 🟥TODO |
| | OpTypeForwardPointer | 🟥TODO |
| Constant-Creation Instructions | OpConstantTrue | ✅DONE |
| | OpConstantFalse | ✅DONE |
| | OpConstant | ✅DONE |
| | OpConstantComposite | ✅DONE |
| | OpConstantSampler | ✅DONE |
| | OpConstantNull | ✅DONE |
| | OpSpecConstantTrue | 🟥TODO |
| | OpSpecConstantFalse | 🟥TODO |
| | OpSpecConstant | 🟥TODO |
| | OpSpecConstantComposite | 🟥TODO |
| | OpSpecConstantOp | 🟥TODO |
| Memory Instructions | OpVariable | ✅DONE |
| | OpImageTexelPointer | 🟥TODO |
| | OpLoad | ✅DONE |
| | OpStore | ✅DONE |
| | OpCopyMemory | 🟥TODO |
| | OpCopyMemorySized | 🟥TODO |
| | OpAccessChain | ✅DONE |
| | OpInBoundsAccessChain | 🟥TODO |
| | OpPtrAccessChain | 🟥TODO |
| | OpArrayLength | ✅DONE |
| | OpGenericPtrMemSemantics | 🟥TODO |
| | OpInBoundsPtrAccessChain | 🟥TODO |
| Function Instructions | OpFunction | ✅DONE |
| | OpFunctionParameter | ✅DONE |
| | OpFunctionEnd | ✅DONE |
| | OpFunctionCall | ✅DONE |
| Image Instructions | OpSampledImage | ✅DONE |
| | OpImageSampleImplicitLod | ✅DONE |
| | OpImageSampleExplicitLod | ✅DONE |
| | OpImageSampleDrefImplicitLod | ✅DONE |
| | OpImageSampleDrefExplicitLod | ✅DONE |
| | OpImageSampleProjImplicitLod | ✅DONE |
| | OpImageSampleProjExplicitLod | ✅DONE |
| | OpImageSampleProjDrefImplicitLod | ✅DONE |
| | OpImageSampleProjDrefExplicitLod | ✅DONE |
| | OpImageFetch | ✅DONE |
| | OpImageGather | 🟥TODO |
| | OpImageDrefGather | 🟥TODO |
| | OpImageRead | 🟥TODO |
| | OpImageWrite | 🟥TODO |
| | OpImage | ✅DONE |
| | OpImageQueryFormat | ✅DONE |
| | OpImageQueryOrder | ✅DONE |
| | OpImageQuerySizeLod | ✅DONE |
| | OpImageQuerySize | ✅DONE |
| | OpImageQueryLod | ✅DONE |
| | OpImageQueryLevels | ✅DONE |
| | OpImageQuerySamples | ✅DONE |
| | OpImageSparseSampleImplicitLod | 🟥TODO |
| | OpImageSparseSampleExplicitLod | 🟥TODO |
| | OpImageSparseSampleDrefImplicitLod | 🟥TODO |
| | OpImageSparseSampleDrefExplicitLod | 🟥TODO |
| | OpImageSparseSampleProjImplicitLod | 🟥TODO |
| | OpImageSparseSampleProjExplicitLod | 🟥TODO |
| | OpImageSparseSampleProjDrefImplicitLod | 🟥TODO |
| | OpImageSparseSampleProjDrefExplicitLod | 🟥TODO |
| | OpImageSparseFetch | 🟥TODO |
| | OpImageSparseGather | 🟥TODO |
| | OpImageSparseDrefGather | 🟥TODO |
| | OpImageSparseTexelsResident | 🟥TODO |
| | OpImageSparseRead | 🟥TODO |
| Conversion Instructions | OpConvertFToU | ✅DONE |
| | OpConvertFToS | ✅DONE |
| | OpConvertSToF | ✅DONE |
| | OpConvertUToF | ✅DONE |
| | OpUConvert | 🟥TODO |
| | OpSConvert | 🟥TODO |
| | OpFConvert | 🟥TODO |
| | OpQuantizeToF16 | 🟥TODO |
| | OpConvertPtrToU | 🟥TODO |
| | OpSatConvertSToU | 🟥TODO |
| | OpSatConvertUToS | 🟥TODO |
| | OpConvertUToPtr | 🟥TODO |
| | OpPtrCastToGeneric | 🟥TODO |
| | OpGenericCastToPtr | 🟥TODO |
| | OpGenericCastToPtrExplicit | 🟥TODO |
| | OpBitcast | ✅DONE |
| Composite Instructions | OpVectorExtractDynamic | 🟥TODO |
| | OpVectorInsertDynamic | 🟥TODO |
| | OpVectorShuffle | ✅DONE |
| | OpCompositeConstruct | ✅DONE |
| | OpCompositeExtract | ✅DONE |
| | OpCompositeInsert | 🟥TODO |
| | OpCopyObject | ✅DONE |
| | OpTranspose | ✅DONE |
| Arithmetic Instructions | OpSNegate | ✅DONE |
| | OpFNegate | ✅DONE |
| | OpIAdd | ✅DONE |
| | OpFAdd | ✅DONE |
| | OpISub | ✅DONE |
| | OpFSub | ✅DONE |
| | OpIMul | ✅DONE |
| | OpFMul | ✅DONE |
| | OpUDiv | ✅DONE |
| | OpSDiv | ✅DONE |
| | OpFDiv | ✅DONE |
| | OpUMod | ✅DONE |
| | OpSRem | ✅DONE |
| | OpSMod | ✅DONE |
| | OpFRem | ✅DONE |
| | OpFMod | ✅DONE |
| | OpVectorTimesScalar | ✅DONE |
| | OpMatrixTimesScalar | ✅DONE |
| | OpVectorTimesMatrix | ✅DONE |
| | OpMatrixTimesVector | ✅DONE |
| | OpMatrixTimesMatrix | ✅DONE |
| | OpOuterProduct | ✅DONE |
| | OpDot | ✅DONE |
| | OpIAddCarry | ✅DONE |
| | OpISubBorrow | ✅DONE |
| | OpUMulExtended | ✅DONE |
| | OpSMulExtended | ✅DONE |
| Bit Instructions | OpShiftRightLogical | ✅DONE |
| | OpShiftRightArithmetic | ✅DONE |
| | OpShiftLeftLogical | ✅DONE |
| | OpBitwiseOr | ✅DONE |
| | OpBitwiseXor | ✅DONE |
| | OpBitwiseAnd | ✅DONE |
| | OpNot | ✅DONE |
| | OpBitFieldInsert | ✅DONE |
| | OpBitFieldSExtract | ✅DONE |
| | OpBitFieldUExtract | ✅DONE |
| | OpBitReverse | ✅DONE |
| | OpBitCount | ✅DONE |
| Relational and Logical Instructions | OpAny | ✅DONE |
| | OpAll | ✅DONE |
| | OpIsNan | ✅DONE |
| | OpIsInf | ✅DONE |
| | OpIsFinite | 🟥TODO |
| | OpIsNormal | 🟥TODO |
| | OpSignBitSet | 🟥TODO |
| | OpLessOrGreater | 🟥TODO |
| | OpOrdered | 🟥TODO |
| | OpUnordered | 🟥TODO |
| | OpLogicalEqual | ✅DONE |
| | OpLogicalNotEqual | ✅DONE |
| | OpLogicalOr | ✅DONE |
| | OpLogicalAnd | ✅DONE |
| | OpLogicalNot | ✅DONE |
| | OpSelect | ✅DONE |
| | OpIEqual | ✅DONE |
| | OpINotEqual | ✅DONE |
| | OpUGreaterThan | ✅DONE |
| | OpSGreaterThan | ✅DONE |
| | OpUGreaterThanEqual | ✅DONE |
| | OpSGreaterThanEqual | ✅DONE |
| | OpULessThan | ✅DONE |
| | OpSLessThan | ✅DONE |
| | OpULessThanEqual | ✅DONE |
| | OpSLessThanEqual | ✅DONE |
| | OpFOrdEqual | ✅DONE |
| | OpFUnordEqual | ✅DONE |
| | OpFOrdNotEqual | ✅DONE |
| | OpFUnordNotEqual | ✅DONE |
| | OpFOrdLessThan | ✅DONE |
| | OpFUnordLessThan | ✅DONE |
| | OpFOrdGreaterThan | ✅DONE |
| | OpFUnordGreaterThan | ✅DONE |
| | OpFOrdLessThanEqual | ✅DONE |
| | OpFUnordLessThanEqual | ✅DONE |
| | OpFOrdGreaterThanEqual | ✅DONE |
| | OpFUnordGreaterThanEqual | ✅DONE |
| Derivative Instructions | OpDPdx | 🟥TODO |
| | OpDPdy | 🟥TODO |
| | OpFwidth | 🟥TODO |
| | OpDPdxFine | 🟥TODO |
| | OpDPdyFine | 🟥TODO |
| | OpFwidthFine | 🟥TODO |
| | OpDPdxCoarse | 🟥TODO |
| | OpDPdyCoarse | 🟥TODO |
| | OpFwidthCoarse | 🟥TODO |
| Control-Flow Instructions | OpPhi | 🟥TODO |
| | OpLoopMerge | 🟥TODO |
| | OpSelectionMerge | 🟥TODO |
| | OpLabel | ✅DONE |
| | OpBranch | ✅DONE |
| | OpBranchConditional | ✅DONE |
| | OpSwitch | ✅DONE |
| | OpKill | ✅DONE |
| | OpReturn | ✅DONE |
| | OpReturnValue | ✅DONE |
| | OpUnreachable | ✅DONE |
| | OpLifetimeStart | 🟥TODO |
| | OpLifetimeStop | 🟥TODO |
| Atomic Instructions | OpAtomicLoad | 🟥TODO |
| | OpAtomicStore | 🟥TODO |
| | OpAtomicExchange | 🟥TODO |
| | OpAtomicCompareExchange | 🟥TODO |
| | OpAtomicCompareExchangeWeak | 🟥TODO |
| | OpAtomicIIncrement | 🟥TODO |
| | OpAtomicIDecrement | 🟥TODO |
| | OpAtomicIAdd | 🟥TODO |
| | OpAtomicISub | 🟥TODO |
| | OpAtomicSMin | 🟥TODO |
| | OpAtomicUMin | 🟥TODO |
| | OpAtomicSMax | 🟥TODO |
| | OpAtomicUMax | 🟥TODO |
| | OpAtomicAnd | 🟥TODO |
| | OpAtomicOr | 🟥TODO |
| | OpAtomicXor | 🟥TODO |
| | OpAtomicFlagTestAndSet | 🟥TODO |
| | OpAtomicFlagClear | 🟥TODO |
| Primitive Instructions | OpEmitVertex | 🟥TODO |
| | OpEndPrimitive | 🟥TODO |
| | OpEmitStreamVertex | 🟥TODO |
| | OpEndStreamPrimitive | 🟥TODO |
| Barrier Instructions | OpControlBarrier | 🟥TODO |
| | OpMemoryBarrier | 🟥TODO |
| Group Instructions | OpGroupAsyncCopy | 🟥TODO |
| | OpGroupWaitEvents | 🟥TODO |
| | OpGroupAll | 🟥TODO |
| | OpGroupAny | 🟥TODO |
| | OpGroupBroadcast | 🟥TODO |
| | OpGroupIAdd | 🟥TODO |
| | OpGroupFAdd | 🟥TODO |
| | OpGroupFMin | 🟥TODO |
| | OpGroupUMin | 🟥TODO |
| | OpGroupSMin | 🟥TODO |
| | OpGroupFMax | 🟥TODO |
| | OpGroupUMax | 🟥TODO |
| | OpGroupSMax | 🟥TODO |
| | OpSubgroupBallotKHR | 🟥TODO |
| | OpSubgroupFirstInvocationKHR | 🟥TODO |
| | OpSubgroupReadInvocationKHR | 🟥TODO |
| | OpGroupIAddNonUniformAMD | 🟥TODO |
| | OpGroupFAddNonUniformAMD | 🟥TODO |
| | OpGroupFMinNonUniformAMD | 🟥TODO |
| | OpGroupUMinNonUniformAMD | 🟥TODO |
| | OpGroupSMinNonUniformAMD | 🟥TODO |
| | OpGroupFMaxNonUniformAMD | 🟥TODO |
| | OpGroupUMaxNonUniformAMD | 🟥TODO |
| | OpGroupSMaxNonUniformAMD | 🟥TODO |
| Device-Side Enqueue Instructions | OpEnqueueMarker | 🟥TODO |
| | OpEnqueueKernel | 🟥TODO |
| | OpGetKernelNDrangeSubGroupCount | 🟥TODO |
| | OpGetKernelNDrangeMaxSubGroupSize | 🟥TODO |
| | OpGetKernelWorkGroupSize | 🟥TODO |
| | OpGetKernelPreferredWorkGroupSizeMultiple | 🟥TODO |
| | OpRetainEvent | 🟥TODO |
| | OpReleaseEvent | 🟥TODO |
| | OpCreateUserEvent | 🟥TODO |
| | OpIsValidEvent | 🟥TODO |
| | OpSetUserEventStatus | 🟥TODO |
| | OpCaptureEventProfilingInfo | 🟥TODO |
| | OpGetDefaultQueue | 🟥TODO |
| | OpBuildNDRange | 🟥TODO |
| Pipe Instructions | OpReadPipe | 🟥TODO |
| | OpWritePipe | 🟥TODO |
| | OpReservedReadPipe | 🟥TODO |
| | OpReservedWritePipe | 🟥TODO |
| | OpReserveReadPipePackets | 🟥TODO |
| | OpReserveWritePipePackets | 🟥TODO |
| | OpCommitReadPipe | 🟥TODO |
| | OpCommitWritePipe | 🟥TODO |
| | OpIsValidReserveId | 🟥TODO |
| | OpGetNumPipePackets | 🟥TODO |
| | OpGetMaxPipePackets | 🟥TODO |
| | OpGroupReserveReadPipePackets | 🟥TODO |
| | OpGroupReserveWritePipePackets | 🟥TODO |
| | OpGroupCommitReadPipe | 🟥TODO |
| | OpGroupCommitWritePipe | 🟥TODO |
================================================
FILE: OPCODE_EXT.md
================================================
## GLSL.std.450
| Opcode | Status |
|-----------------------|--------|
| Round | ✅DONE |
| RoundEven | ✅DONE |
| Trunc | ✅DONE |
| FAbs | ✅DONE |
| SAbs | ✅DONE |
| FSign | ✅DONE |
| SSign | ✅DONE |
| Floor | ✅DONE |
| Ceil | ✅DONE |
| Fract | ✅DONE |
| Radians | ✅DONE |
| Degrees | ✅DONE |
| Sin | ✅DONE |
| Cos | ✅DONE |
| Tan | ✅DONE |
| Asin | ✅DONE |
| Acos | ✅DONE |
| Atan | ✅DONE |
| Sinh | ✅DONE |
| Cosh | ✅DONE |
| Tanh | ✅DONE |
| Asinh | ✅DONE |
| Acosh | ✅DONE |
| Atanh | ✅DONE |
| Atan2 | ✅DONE |
| Pow | ✅DONE |
| Exp | ✅DONE |
| Log | ✅DONE |
| Exp2 | ✅DONE |
| Log2 | ✅DONE |
| Sqrt | ✅DONE |
| InverseSqrt | ✅DONE |
| Determinant | 🟥TODO |
| MatrixInverse | 🟥TODO |
| Modf | ✅DONE |
| ModfStruct | ✅DONE |
| FMin | ✅DONE |
| UMin | ✅DONE |
| SMin | ✅DONE |
| FMax | ✅DONE |
| UMax | ✅DONE |
| SMax | ✅DONE |
| FClamp | ✅DONE |
| UClamp | ✅DONE |
| SClamp | ✅DONE |
| FMix | ✅DONE |
| IMix | 🟥TODO |
| Step | ✅DONE |
| SmoothStep | ✅DONE |
| Fma | ✅DONE |
| Frexp | ✅DONE |
| FrexpStruct | ✅DONE |
| Ldexp | ✅DONE |
| PackSnorm4x8 | ✅DONE |
| PackUnorm4x8 | ✅DONE |
| PackSnorm2x16 | ✅DONE |
| PackUnorm2x16 | ✅DONE | |
| PackHalf2x16 | 🟥TODO |
| PackDouble2x32 | 🟥TODO |
| UnpackSnorm2x16 | ✅DONE |
| UnpackUnorm2x16 | ✅DONE |
| UnpackHalf2x16 | 🟥TODO |
| UnpackSnorm4x8 | ✅DONE |
| UnpackUnorm4x8 | ✅DONE |
| UnpackDouble2x32 | 🟥TODO |
| Length | ✅DONE |
| Distance | ✅DONE |
| Cross | ✅DONE |
| Normalize | ✅DONE |
| FaceForward | ✅DONE |
| Reflect | ✅DONE |
| Refract | ✅DONE |
| FindILsb | ✅DONE |
| FindSMsb | ✅DONE |
| FindUMsb | ✅DONE |
| InterpolateAtCentroid | 🟥TODO |
| InterpolateAtSample | 🟥TODO |
| InterpolateAtOffset | 🟥TODO |
| NMin | ✅DONE |
| NMax | ✅DONE |
| NClamp | ✅DONE |
================================================
FILE: README.md
================================================
# SPVM
Tiny C++ [SPIR-V](https://registry.khronos.org/SPIR-V/) virtual machine (interpreter), you can use it to debug shaders: first compile your shader code(GLSL/HLSL) to SPIR-V binary file (using tools such as [glslangValidator](https://github.com/KhronosGroup/glslang)), then decode and execute entry point function `main` with SPVM, and check the output.
[](./LICENSE)
[](https://github.com/keith2018/spvm/actions/workflows/cmake_linux.yml)
[](https://github.com/keith2018/spvm/actions/workflows/cmake_macos.yml)
[](https://github.com/keith2018/spvm/actions/workflows/cmake_windows.yml)
Specifications that the project follows is:
- [SPIR-V 1.0](https://registry.khronos.org/SPIR-V/specs/1.0/SPIRV.html)
- [GLSL.std.450](https://registry.khronos.org/SPIR-V/specs/1.0/GLSL.std.450.html)
### Limits
- Only part of SPIR-V 1.0 instructions has been implemented right now, see the opcodes support status:
- [Core (SPIR-V 1.0) Opcodes](OPCODE_CORE.md)
- [Ext (GLSL.std.450) Opcodes](OPCODE_EXT.md)
- Only support 32-bits width [Numerical type](https://registry.khronos.org/SPIR-V/specs/1.0/SPIRV.html#_types) (float, integer)
- Only support [Addressing Model](https://registry.khronos.org/SPIR-V/specs/1.0/SPIRV.html#Addressing_Model) `Logical`
- Not support derivative opcodes (dFdx\dFdy\...)
- Not support OpenCL related instructions
### TODO
- [ ] 64-bit float/integer support
- [ ] Performance optimizations
- [ ] SIMD
- [ ] JIT/AOT
The project is still working in progress ...
## Spvm-ShaderToy
Spvm-ShaderToy simulated the runtime environment of [shadertoy](https://www.shadertoy.com/), and execute shader code using SPVM (may very slow 😀).
### Gallery
<p float="left">
<img src="images/fstyD4.png" width="600" />
<img src="images/ftdfWn.png" width="600" />
</p>
<p float="left">
<img src="images/Nt3BzM.png" width="600" />
<img src="images/XdlSDs.png" width="600" />
</p>
## Example
GLSL fragment shader (see [example/shaders/simple.frag](example/shaders/simple.frag))
```glsl
#version 450
layout (location = 0) in vec3 inColor;
layout (location = 0) out vec4 outFragColor;
void main()
{
outFragColor = vec4(inColor.yxz, 1.0f);
}
```
run with spvm (see [example/main.cpp](example/main.cpp))
```cpp
#define HEAP_SIZE 128 * 1024
const char *SPV_PATH = "shaders/simple.frag.spv";
SPVM::SpvmModule module;
SPVM::Runtime runtime;
// decode spir-v file
bool success = SPVM::Decoder::decodeFile(SPV_PATH, &module);
if (!success) {
std::cout << "error decode spir-v file";
return -1;
}
// init runtime
success = runtime.initWithModule(&module, HEAP_SIZE);
if (!success) {
std::cout << "error init module";
return -1;
}
// get uniform locations
SPVM::SpvmWord inColorLoc = runtime.getLocationByName("inColor");
SPVM::SpvmWord outFragColorLoc = runtime.getLocationByName("outFragColor");
// write input
float inColor[3]{0.2f, 0.3f, 0.4f};
runtime.writeInput(inColor, inColorLoc);
// execute shader entry function 'main'
success = runtime.execEntryPoint();
if (!success) {
std::cout << "error exec entrypoint function";
return -1;
}
// read output
float outFragColor[4];
runtime.readOutput(outFragColor, outFragColorLoc);
std::cout << "outFragColor[0]: " << outFragColor[0] << std::endl;
std::cout << "outFragColor[1]: " << outFragColor[1] << std::endl;
std::cout << "outFragColor[2]: " << outFragColor[2] << std::endl;
std::cout << "outFragColor[3]: " << outFragColor[3] << std::endl;
```
## Clone
```bash
git clone --recursive https://github.com/keith2018/spvm
cd spvm
```
## Build
```bash
mkdir build
cmake -B ./build -DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release
```
## Test
```bash
cd build
ctest
```
## License
This code is licensed under the MIT License (see [LICENSE](LICENSE)).
================================================
FILE: example/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.3)
project(spvm_example)
set(CMAKE_CXX_STANDARD 11)
include_directories("../src")
add_executable(${PROJECT_NAME} main.cpp)
set(LIBRARIES spvm_lib)
target_link_libraries(${PROJECT_NAME} ${LIBRARIES})
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest")
endif ()
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../bin)
# copy assets
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory $<TARGET_FILE_DIR:${PROJECT_NAME}>/shaders
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/shaders $<TARGET_FILE_DIR:${PROJECT_NAME}>/shaders
)
================================================
FILE: example/main.cpp
================================================
/*
* spvm
* @author : keith@robot9.me
*
*/
#include <iostream>
#include "decoder.h"
#include "runtime.h"
#define HEAP_SIZE 128 * 1024
const char *SPV_PATH = "shaders/simple.frag.spv";
int main(int argc, char *argv[]) {
SPVM::SpvmModule module;
SPVM::Runtime runtime;
// decode spir-v file
bool success = SPVM::Decoder::decodeFile(SPV_PATH, &module);
if (!success) {
std::cout << "error decode spir-v file";
return -1;
}
// init runtime
success = runtime.initWithModule(&module, HEAP_SIZE);
if (!success) {
std::cout << "error init module";
return -1;
}
// get uniform locations
SPVM::SpvmWord inColorLoc = runtime.getLocationByName("inColor");
SPVM::SpvmWord outFragColorLoc = runtime.getLocationByName("outFragColor");
// write input
float inColor[3]{0.2f, 0.3f, 0.4f};
runtime.writeInput(inColor, inColorLoc);
// execute shader entry function 'main'
success = runtime.execEntryPoint();
if (!success) {
std::cout << "error exec entrypoint function";
return -1;
}
// read output
float outFragColor[4];
runtime.readOutput(outFragColor, outFragColorLoc);
std::cout << "outFragColor[0]: " << outFragColor[0] << std::endl;
std::cout << "outFragColor[1]: " << outFragColor[1] << std::endl;
std::cout << "outFragColor[2]: " << outFragColor[2] << std::endl;
std::cout << "outFragColor[3]: " << outFragColor[3] << std::endl;
return 0;
}
================================================
FILE: example/shaders/simple.frag
================================================
#version 450
layout (location = 0) in vec3 inColor;
layout (location = 0) out vec4 outFragColor;
void main()
{
outFragColor = vec4(inColor.yxz, 1.0f);
}
================================================
FILE: example/shaders/simple.frag.spv.txt
================================================
.\location.frag
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 20
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 9 12
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
Name 4 "main"
Name 9 "outFragColor"
Name 12 "inColor"
Decorate 9(outFragColor) Location 0
Decorate 12(inColor) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(outFragColor): 8(ptr) Variable Output
10: TypeVector 6(float) 3
11: TypePointer Input 10(fvec3)
12(inColor): 11(ptr) Variable Input
15: 6(float) Constant 1065353216
4(main): 2 Function None 3
5: Label
13: 10(fvec3) Load 12(inColor)
14: 10(fvec3) VectorShuffle 13 13 1 0 2
16: 6(float) CompositeExtract 14 0
17: 6(float) CompositeExtract 14 1
18: 6(float) CompositeExtract 14 2
19: 7(fvec4) CompositeConstruct 16 17 18 15
Store 9(outFragColor) 19
Return
FunctionEnd
================================================
FILE: shadertoy/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.3)
project(spvm_shadertoy)
set(CMAKE_CXX_STANDARD 11)
set(THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party")
include_directories(
"${THIRD_PARTY_DIR}/glfw/include"
"${THIRD_PARTY_DIR}/glad/include"
"${THIRD_PARTY_DIR}/imgui"
"${THIRD_PARTY_DIR}/stb/include"
"${THIRD_PARTY_DIR}/glslang/include"
"../src"
)
set(SKIP_GLSLANG_INSTALL ON)
set(ENABLE_GLSLANG_BINARIES OFF)
set(ENABLE_CTEST OFF)
set(BUILD_TESTING OFF)
add_subdirectory("${THIRD_PARTY_DIR}/glslang")
# imgui src
file(GLOB IMGUI_SRC
${THIRD_PARTY_DIR}/imgui/imgui/*.cpp
)
add_executable(${PROJECT_NAME}
"${IMGUI_SRC}"
"${THIRD_PARTY_DIR}/glad/src/glad.c"
renderer.cpp
compiler.cpp
resourcelimits.cpp
settingpanel.cpp
timer.cpp
main.cpp
)
set(LIBRARIES
spvm_lib
glslang
SPIRV)
if (WIN32)
if (MSVC)
target_link_libraries(${PROJECT_NAME}
${LIBRARIES}
"${THIRD_PARTY_DIR}/glfw/lib-vc2022/glfw3.lib"
"${THIRD_PARTY_DIR}/glfw/lib-vc2022/glfw3dll.lib"
)
else ()
target_link_libraries(${PROJECT_NAME}
${LIBRARIES}
"${THIRD_PARTY_DIR}/glfw/lib-mingw-w64/libglfw3.a"
"${THIRD_PARTY_DIR}/glfw/lib-mingw-w64/libglfw3dll.a"
)
endif ()
endif ()
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -framework Cocoa -framework OpenGL -framework IOKit")
add_compile_definitions(GL_SILENCE_DEPRECATION)
target_link_libraries(${PROJECT_NAME}
${LIBRARIES}
"${THIRD_PARTY_DIR}/glfw/lib-macos-universal/libglfw3.a"
)
endif ()
if (UNIX AND NOT APPLE)
find_package(OpenGL REQUIRED)
target_link_libraries(${PROJECT_NAME}
${LIBRARIES}
glfw
OpenGL::GL
pthread
${CMAKE_DL_LIBS}
)
endif ()
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest")
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
endif ()
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../bin)
# copy assets
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory $<TARGET_FILE_DIR:${PROJECT_NAME}>/assets
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/assets $<TARGET_FILE_DIR:${PROJECT_NAME}>/assets
)
================================================
FILE: shadertoy/assets/shaders/Nt3BzM.frag
================================================
// from https://www.shadertoy.com/view/Nt3BzM
#define cx_arg(a) atan(a.y, a.x)
#define PI 3.14159265
#define TAU (2.*PI)
#define cx_mul(a, b) vec2(a.x*b.x - a.y*b.y, a.x*b.y + a.y*b.x)
#define cx_div(a, b) vec2(((a.x*b.x + a.y*b.y)/(b.x*b.x + b.y*b.y)),((a.y*b.x - a.x*b.y)/(b.x*b.x + b.y*b.y)))
#define cx_sin(a) vec2(sin(a.x) * cosh(a.y), cos(a.x) * sinh(a.y))
#define cx_cos(a) vec2(cos(a.x) * cosh(a.y), -sin(a.x) * sinh(a.y))
float sharp = 0.39; // delay
float b = 0.655; // brightness 0 -> dark, 1 -> bright
float nMod = 2.; // num of level curves mod
float nPhase = 20.; // num. of level curves phase
float base = 2.; // For the base of a logarithm
float nContour = 16.;
vec2 as_polar(vec2 z) {
return vec2(
length(z),
atan(z.y, z.x)
);
}
vec2 cx_tan(vec2 a) {return cx_div(cx_sin(a), cx_cos(a)); }
vec2 cx_log(vec2 a) {
vec2 polar = as_polar(a);
float rpart = polar.x;
float ipart = polar.y;
if (ipart > PI) ipart=ipart-(2.0*PI);
return vec2(log(rpart),ipart);
}
vec2 cx_pow(vec2 v, float p) {
vec2 z = as_polar(v);
return pow(z.x, p) * vec2(cos(z.y * p), sin(z.y * p));
}
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
vec3 palette( in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d )
{
return a + b*cos(2. * PI *(c*t+d) );
}
float funPhase(vec2 p) {
return (PI - atan(p.y, -p.x)) / (2. * PI);
}
float funColor(vec2 p) {
return sharp * (nContour * (PI - atan(p.y, -p.x)) / (2. * PI) - floor(nContour * (PI - atan(p.y, -p.x)) / (2. * PI))) + 0.7;
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = (fragCoord.xy - 0.5 * iResolution.xy) / min(iResolution.y, iResolution.x);
vec2 z = uv;
float angle = sin(iTime/5.) * TAU;
float length = .2;
// Spin our points in a circle of radius length
float c = cos(angle);
float s = sin(angle);
vec2 p = vec2( s*length, c*length);
vec2 q = vec2( s*-length, c*-length );
//(z-1)/(z^3+z+1)
vec2 z_minus_one = z - vec2(sin(iTime / 2.), cos(iTime));
vec2 z_cubed_plus_one = cx_mul(cx_mul(z, z), z) + z * (sin(iTime / 10.) + 0.1) - vec2(1, 0);
vec2 division = cx_div(z_minus_one, z_cubed_plus_one);
vec3 col = palette( funPhase(division) * (8. * sin(iTime / 10.)), vec3(0.50,.52,0.53), vec3(.46,.32,.35), vec3(.82,.84,.65), vec3(0.53,0.23,0.22));
vec3 hsv = rgb2hsv(col);
col = vec3(hsv.r, hsv.b, funColor(division));
//vec3 col = vec3(funPhase(division), 1., funColor(division));
fragColor = vec4(col, 1.0);
}
================================================
FILE: shadertoy/assets/shaders/XdlSDs.frag
================================================
// from https://www.shadertoy.com/view/XdlSDs
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 p = (2.0*fragCoord.xy-iResolution.xy)/iResolution.y;
float tau = 3.1415926535*2.0;
float a = atan(p.x,p.y);
float r = length(p)*0.75;
vec2 uv = vec2(a/tau,r);
//get the color
float xCol = (uv.x - (iTime / 3.0)) * 3.0;
xCol = mod(xCol, 3.0);
vec3 horColour = vec3(0.25, 0.25, 0.25);
if (xCol < 1.0) {
horColour.r += 1.0 - xCol;
horColour.g += xCol;
}
else if (xCol < 2.0) {
xCol -= 1.0;
horColour.g += 1.0 - xCol;
horColour.b += xCol;
}
else {
xCol -= 2.0;
horColour.b += 1.0 - xCol;
horColour.r += xCol;
}
// draw color beam
uv = (2.0 * uv) - 1.0;
float beamWidth = (0.7+0.5*cos(uv.x*10.0*tau*0.15*clamp(floor(5.0 + 10.0*cos(iTime)), 0.0, 10.0))) * abs(1.0 / (30.0 * uv.y));
vec3 horBeam = vec3(beamWidth);
fragColor = vec4((( horBeam) * horColour), 1.0);
}
================================================
FILE: shadertoy/assets/shaders/basic.frag
================================================
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = fragCoord/iResolution.xy;
// Time varying pixel color
vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
// Output to screen
fragColor = vec4(col,1.0);
}
================================================
FILE: shadertoy/assets/shaders/fstyD4.frag
================================================
// from https://www.shadertoy.com/view/fstyD4
// Author: bitless
// Title: Coastal Landscape
// Thanks to Patricio Gonzalez Vivo & Jen Lowe for "The Book of Shaders"
// and Fabrice Neyret (FabriceNeyret2) for https://shadertoyunofficial.wordpress.com/
// and Inigo Quilez (iq) for https://iquilezles.org/www/index.htm
// and whole Shadertoy community for inspiration.
#define p(t, a, b, c, d) ( a + b*cos( 6.28318*(c*t+d) ) ) //IQ's palette function (https://www.iquilezles.org/www/articles/palettes/palettes.htm)
#define sp(t) p(t,vec3(.26,.76,.77),vec3(1,.3,1),vec3(.8,.4,.7),vec3(0,.12,.54)) //sky palette
#define hue(v) ( .6 + .76 * cos(6.3*(v) + vec4(0,23,21,0) ) ) //hue
// "Hash without Sine" by Dave_Hoskins.
// https://www.shadertoy.com/view/4djSRW
float hash12(vec2 p)
{
vec3 p3 = fract(vec3(p.xyx) * .1031);
p3 += dot(p3, p3.yzx + 33.33);
return fract((p3.x + p3.y) * p3.z);
}
vec2 hash22(vec2 p)
{
vec3 p3 = fract(vec3(p.xyx) * vec3(.1031, .1030, .0973));
p3 += dot(p3, p3.yzx+33.33);
return fract((p3.xx+p3.yz)*p3.zy);
}
////////////////////////
vec2 rotate2D (vec2 st, float a){
return mat2(cos(a),-sin(a),sin(a),cos(a))*st;
}
float st(float a, float b, float s) //AA bar
{
return smoothstep (a-s, a+s, b);
}
float noise( in vec2 p ) //gradient noise
{
vec2 i = floor( p );
vec2 f = fract( p );
vec2 u = f*f*(3.-2.*f);
return mix( mix( dot( hash22( i+vec2(0,0) ), f-vec2(0,0) ),
dot( hash22( i+vec2(1,0) ), f-vec2(1,0) ), u.x),
mix( dot( hash22( i+vec2(0,1) ), f-vec2(0,1) ),
dot( hash22( i+vec2(1,1) ), f-vec2(1,1) ), u.x), u.y);
}
void mainImage( out vec4 O, in vec2 g)
{
vec2 r = iResolution.xy
,uv = (g+g-r)/r.y
,sun_pos = vec2(r.x/r.y*.42,-.53) //sun position
,tree_pos = vec2(-r.x/r.y*.42,-.2) //tree position
,sh, u, id, lc, t;
vec3 f, c;
float xd, yd, h, a, l;
vec4 C;
float sm = 3./r.y; //smoothness factor for AA
sh = rotate2D(sun_pos, noise(uv+iTime*.25)*.3); //big noise on the sky
if (uv.y > -.4) //drawing the sky
{
u = uv + sh;
yd = 60.; //number of rings
id = vec2((length(u)+.01)*yd,0); //segment id: x - ring number, y - segment number in the ring
xd = floor(id.x)*.09; //number of ring segments
h = (hash12(floor(id.xx))*.5+.25)*(iTime+10.)*.25; //ring shift
t = rotate2D (u,h); //rotate the ring to the desired angle
id.y = atan(t.y,t.x)*xd;
lc = fract(id); //segment local coordinates
id -= lc;
// determining the coordinates of the center of the segment in uv space
t = vec2(cos((id.y+.5)/xd)*(id.x+.5)/yd,sin((id.y+.5)/xd)*(id.x+.5)/yd);
t = rotate2D(t,-h) - sh;
h = noise(t*vec2(.5,1)-vec2(iTime*.2,0)) //clouds
* step(-.25,t.y); //do not draw clouds below -.25
h = smoothstep (.052,.055, h);
lc += (noise(lc*vec2(1,4)+id))*vec2(.7,.2); //add fine noise
f = mix (sp(sin(length(u)-.1))*.35, //sky background
mix(sp(sin(length(u)-.1)+(hash12(id)-.5)*.15),vec3(1),h), //mix sky color and clouds
st(abs(lc.x-.5),.4,sm*yd)*st(abs(lc.y-.5),.48,sm*xd));
};
if (uv.y < -.35) //drawing water
{
float cld = noise(-sh*vec2(.5,1) - vec2(iTime*.2,0)); //cloud density opposite the center of the sun
cld = 1.- smoothstep(.0,.15,cld)*.5;
u = uv*vec2(1,15);
id = floor(u);
for (float i = 1.; i > -1.; i--) //drawing a wave and its neighbors from above and below
{
if (id.y+i < -5.)
{
lc = fract(u)-.5;
lc.y = (lc.y+(sin(uv.x*12.-iTime*3.+id.y+i))*.25-i)*4.; //set the waveform and divide it into four strips
h = hash12(vec2(id.y+i,floor(lc.y))); //the number of segments in the strip and its horizontal offset
xd = 6.+h*4.;
yd = 30.;
lc.x = uv.x*xd+sh.x*9.; //divide the strip into segments
lc.x += sin(iTime * (.5 + h*2.))*.5; //add a cyclic shift of the strips horizontally
h = .8*smoothstep(5.,.0,abs(floor(lc.x)))*cld+.1; //determine brightness of the sun track
f = mix(f,mix(vec3(0,.1,.5),vec3(.35,.35,0),h),st(lc.y,0.,sm*yd)); //mix the color of the water and the color of the track for the background of the water
lc += noise(lc*vec2(3,.5))*vec2(.1,.6); //add fine noise to the segment
f = mix(f, //mix the background color
mix(hue(hash12(floor(lc))*.1+.56).rgb*(1.2+floor(lc.y)*.17),vec3(1,1,0),h) //and the stroke color
,st(lc.y,0.,sm*xd)
*st(abs(fract(lc.x)-.5),.48,sm*xd)*st(abs(fract(lc.y)-.5),.3,sm*yd)
);
}
}
}
O = vec4(f,1);
////////////////////// drawing the grass
a = 0.;
u = uv+noise(uv*2.)*.1 + vec2(0,sin(uv.x*1.+3.)*.4+.8);
f = mix(vec3(.7,.6,.2),vec3(0,1,0),sin(iTime*.2)*.5+.5); //color of the grass, changing from green to yellow and back again
O = mix(O,vec4(f*.4,1),step(u.y,.0)); //draw grass background
xd = 60.; //grass size
u = u*vec2(xd,xd/3.5);
if (u.y < 1.2)
{
for (float y = 0.; y > -3.; y--)
{
for (float x = -2.; x <3.; x++)
{
id = floor(u) + vec2(x,y);
lc = (fract(u) + vec2(1.-x,-y))/vec2(5,3);
h = (hash12(id)-.5)*.25+.5; //shade and length for an individual blade of grass
lc-= vec2(.3,.5-h*.4);
lc.x += sin(((iTime*1.7+h*2.-id.x*.05-id.y*.05)*1.1+id.y*.5)*2.)*(lc.y+.5)*.5;
t = abs(lc)-vec2(.02,.5-h*.5);
l = length(max(t,0.)) + min(max(t.x,t.y),0.); //distance to the segment (blade of grass)
l -= noise (lc*7.+id)*.1; //add fine noise
C = vec4(f*.25,st(l,.1,sm*xd*.09)); //grass outline
C = mix(C,vec4(f //grass foregroud
*(1.2+lc.y*2.) //the grass is a little darker at the root
*(1.8-h*2.5),1.) //brightness variations for individual blades of grass
,st(l,.04,sm*xd*.09));
O = mix (O,C,C.a*step (id.y,-1.));
a = max (a, C.a*step (id.y,-5.)); //a mask to cover the trunk of the tree with grasses in the foreground
}
}
}
float T = sin(iTime*.5); //tree swing cycle
if (abs(uv.x+tree_pos.x-.1-T*.1) < .6) // drawing the tree
{
u = uv + tree_pos;
// draw the trunk of the tree first
u.x -= sin(u.y+1.)*.2*(T+.75); //the trunk bends in the wind
u += noise(u*4.5-7.)*.25; //trunk curvature
xd = 10., yd = 60.;
t = u * vec2(1,yd); //divide the trunk into segments
h = hash12(floor(t.yy)); //horizontal shift of the segments and the color tint of the segment
t.x += h*.01;
t.x *= xd;
lc = fract(t); //segment local coordinates
float m = st(abs(t.x-.5),.5,sm*xd)*step(abs(t.y+20.),45.); //trunk mask
C = mix(vec4(.07) //outline color
,vec4(.5,.3,0,1)*(.4+h*.4) //foreground color
,st(abs(lc.y-.5),.4,sm*yd)*st(abs(lc.x-.5),.45,sm*xd));
C.a = m;
xd = 30., yd = 15.;
for (float xs =0.;xs<4.;xs++) //drawing four layers of foliage
{
u = uv + tree_pos + vec2 (xs/xd*.5 -(T +.75)*.15,-.7); //crown position
u += noise(u*vec2(2,1)+vec2(-iTime+xs*.05,0))*vec2(-.25,.1)*smoothstep (.5,-1.,u.y+.7)*.75; //leaves rippling in the wind
t = u * vec2(xd,1.);
h = hash12(floor(t.xx)+xs*1.4); //number of segments for the row
yd = 5.+ h*7.;
t.y *= yd;
sh = t;
lc = fract(t);
h = hash12(t-lc); //segment color shade
t = (t-lc)/vec2(xd,yd)+vec2(0,.7);
m = (step(0.,t.y)*step (length(t),.45) //the shape of the crown - the top
+ step (t.y,0.)*step (-0.7+sin((floor(u.x)+xs*.5)*15.)*.2,t.y)) //the bottom
*step (abs(t.x),.5) //crown size horizontally
*st(abs(lc.x-.5),.35,sm*xd*.5);
lc += noise((sh)*vec2(1.,3.))*vec2(.3,.3); //add fine noise
f = hue((h+(sin(iTime*.2)*.5+.5))*.2).rgb-t.x; //color of the segment changes cyclically
C = mix(C,
vec4(mix(f*.15,f*.6*(.7+xs*.2), //mix outline and foreground color
st(abs(lc.y-.5),.47,sm*yd)*st(abs(lc.x-.5),.2,sm*xd)),m)
,m);
}
O = mix (O,C,C.a*(1.-a));
}
}
================================================
FILE: shadertoy/assets/shaders/ftdfWn.frag
================================================
// from https://www.shadertoy.com/view/ftdfWn
#define ITER_MAX 13
#define TIME_SCALE 6
#define ZOOM 4
//#define CUSTOM_EXPONENT vec2(-2., 0.)
// conversions between cartesian (x+yi) and polar (xe^(iy)) forms of complex numbers
vec2 cartesian_of_polar(vec2 polar) {
return vec2(polar.x * cos(polar.y), polar.x * sin(polar.y));
}
vec2 polar_of_cartesian(vec2 cartesian) {
return vec2(length(cartesian), atan(cartesian.y, cartesian.x));
}
// multiplication of two complex numbers in cartesian form
vec2 cmul(vec2 a, vec2 b) {
return vec2(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}
// exponential of a complex number by a complex number, both in cartesian form
vec2 cexp(vec2 b, vec2 e) {
vec2 b_polar = polar_of_cartesian(b);
vec2 logb = vec2(log(b_polar.x), b_polar.y);
vec2 new_e = cmul(logb, e);
vec2 ans_polar = vec2(exp(new_e.x), new_e.y);
return cartesian_of_polar(ans_polar);
}
// cexp, specialized to e = vec2(-2., 0.)
vec2 cexp_m2(vec2 b) {
vec2 b_invmag = b / vec2(dot(b, b));
return vec2((b_invmag.x*b_invmag.x - b_invmag.y*b_invmag.y), -2.*b_invmag.x*b_invmag.y);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
// Normalized pixel coordinates (from -ZOOM to ZOOM)
vec2 uv = vec2(2. * float(ZOOM)) * (fragCoord - iResolution.xy/vec2(2.)) / vec2(max(iResolution.x, iResolution.y));
// Animate the constant c
float t = iTime/float(TIME_SCALE);
vec2 c = (vec2(cos(t)*abs(cos(t)), sin(t)*abs(sin(t)))) * vec2(0.7665);
// Computation of the Julia set defined by the iteration x -> x^-2 + c
vec2 x = uv;
int iter = 0;
for (iter = 0; iter < ITER_MAX; ++iter) {
if (dot(x, x) > 40.) break;
#ifdef CUSTOM_EXPONENT
x = cexp(x, CUSTOM_EXPONENT);
#else
x = cexp_m2(x);
#endif
x += c;
}
vec3 col = vec3(float(iter) / float(ITER_MAX)) * vec3(c, 1.0);
// Output to screen
fragColor = vec4(col,1.0);
}
================================================
FILE: shadertoy/assets/wrapper.frag
================================================
#version 450
layout(set = 0, binding = 0) uniform InputData
{
vec3 iResolution; // viewport resolution (in pixels)
float iTime; // shader playback time (in seconds)
float iTimeDelta; // render time (in seconds)
int iFrame; // shader playback frame
vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click
vec4 iDate; // (year, month, day, time in seconds)
float iSampleRate; // sound sample rate (i.e., 44100)
};
layout(set = 0, binding = 1) uniform sampler2D iChannel0;
layout (location = 0) in vec2 fragCoord;
layout (location = 0) out vec4 fragColor;
void mainImage(out vec4 fragColor, in vec2 fragCoord);
void main()
{
mainImage(fragColor, fragCoord);
}
================================================
FILE: shadertoy/compiler.cpp
================================================
/*
* spvm-shadertoy
* @author : keith@robot9.me
*
*/
#include "compiler.h"
#include "glslang/Include/glslang_c_interface.h"
#include "glslang/Public/ShaderLang.h"
#include "resourcelimits.h"
#include "logger.h"
namespace SPVM {
namespace ShaderToy {
static std::vector<uint32_t> compileShaderInternal(glslang_stage_t stage, const char *shaderSource) {
const glslang_input_t input = {
.language = GLSLANG_SOURCE_GLSL,
.stage = stage,
.client = GLSLANG_CLIENT_VULKAN,
.client_version = GLSLANG_TARGET_VULKAN_1_2,
.target_language = GLSLANG_TARGET_SPV,
.target_language_version = GLSLANG_TARGET_SPV_1_5,
.code = shaderSource,
.default_version = 100,
.default_profile = GLSLANG_NO_PROFILE,
.force_default_version_and_profile = false,
.forward_compatible = false,
.messages = GLSLANG_MSG_DEFAULT_BIT,
.resource = reinterpret_cast<const glslang_resource_t *>(&glslang::DefaultTBuiltInResource),
};
glslang_shader_t *shader = glslang_shader_create(&input);
if (!glslang_shader_preprocess(shader, &input)) {
LOGE("GLSL preprocessing failed:");
LOGE("%s", glslang_shader_get_info_log(shader));
LOGE("%s", glslang_shader_get_info_debug_log(shader));
LOGE("%s", input.code);
glslang_shader_delete(shader);
return std::vector<uint32_t>();
}
if (!glslang_shader_parse(shader, &input)) {
LOGE("GLSL parsing failed:");
LOGE("%s", glslang_shader_get_info_log(shader));
LOGE("%s", glslang_shader_get_info_debug_log(shader));
LOGE("%s", glslang_shader_get_preprocessed_code(shader));
glslang_shader_delete(shader);
return std::vector<uint32_t>();
}
glslang_program_t *program = glslang_program_create();
glslang_program_add_shader(program, shader);
if (!glslang_program_link(program, GLSLANG_MSG_SPV_RULES_BIT | GLSLANG_MSG_VULKAN_RULES_BIT)) {
LOGE("GLSL linking failed:");
LOGE("%s", glslang_program_get_info_log(program));
LOGE("%s", glslang_program_get_info_debug_log(program));
glslang_program_delete(program);
glslang_shader_delete(shader);
return std::vector<uint32_t>();
}
glslang_program_SPIRV_generate(program, stage);
std::vector<uint32_t> outShaderModule(glslang_program_SPIRV_get_size(program));
glslang_program_SPIRV_get(program, outShaderModule.data());
const char *spirv_messages = glslang_program_SPIRV_get_messages(program);
if (spirv_messages) {
LOGI("GLSLang: %s", spirv_messages);
}
glslang_program_delete(program);
glslang_shader_delete(shader);
return outShaderModule;
}
std::vector<uint32_t> Compiler::compileShaderFragment(const char *shaderSource) {
glslang::InitializeProcess();
auto ret = compileShaderInternal(GLSLANG_STAGE_FRAGMENT, shaderSource);
glslang::FinalizeProcess();
return ret;
}
}
}
================================================
FILE: shadertoy/compiler.h
================================================
/*
* spvm-shadertoy
* @author : keith@robot9.me
*
*/
#pragma once
#include <vector>
#include <cstdint>
namespace SPVM {
namespace ShaderToy {
class Compiler {
public:
static std::vector<uint32_t> compileShaderFragment(const char *shaderSource);
};
}
}
================================================
FILE: shadertoy/main.cpp
================================================
/*
* spvm-shadertoy
* @author : keith@robot9.me
*
*/
#include <iostream>
#include <sstream>
#include <utility>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include "renderer.h"
#include "settingpanel.h"
SPVM::ShaderToy::Renderer *renderer = nullptr;
SPVM::ShaderToy::SettingPanel *settingPanel = nullptr;
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 450;
double lastX = SCR_WIDTH / 2.0f;
double lastY = SCR_HEIGHT / 2.0f;
bool firstMouse = true;
void framebuffer_size_callback(GLFWwindow *window, int width, int height);
void mouse_callback(GLFWwindow *window, double xPos, double yPos);
void scroll_callback(GLFWwindow *window, double xOffset, double yOffset);
void processInput(GLFWwindow *window);
const char *VS = R"(
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec2 aTexCoord;
out vec2 TexCoord;
void main()
{
gl_Position = vec4(aPos, 1.0);
TexCoord = vec2(aTexCoord.x, aTexCoord.y);
}
)";
const char *FS = R"(
#version 330 core
out vec4 FragColor;
in vec2 TexCoord;
uniform sampler2D uTexture;
void main()
{
FragColor = texture(uTexture, TexCoord);
}
)";
void checkCompileErrors(GLuint shader, const std::string &type) {
GLint success;
GLchar infoLog[1024];
if (type != "PROGRAM") {
glGetShaderiv(shader, GL_COMPILE_STATUS, &success);
if (!success) {
glGetShaderInfoLog(shader, 1024, nullptr, infoLog);
std::cout << "ERROR::SHADER_COMPILATION_ERROR of type: " << type << "\n" << infoLog
<< "\n -- --------------------------------------------------- -- " << std::endl;
}
} else {
glGetProgramiv(shader, GL_LINK_STATUS, &success);
if (!success) {
glGetProgramInfoLog(shader, 1024, nullptr, infoLog);
std::cout << "ERROR::PROGRAM_LINKING_ERROR of type: " << type << "\n" << infoLog
<< "\n -- --------------------------------------------------- -- " << std::endl;
}
}
}
static void glfw_error_callback(int error, const char *description) {
fprintf(stderr, "Glfw Error %d: %s\n", error, description);
}
int main() {
/* Initialize the library */
glfwSetErrorCallback(glfw_error_callback);
if (!glfwInit()) {
std::cout << "Failed to initialize GLFW" << std::endl;
return -1;
}
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
#ifdef __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
/* Create a windowed mode window and its OpenGL context */
GLFWwindow *window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "SPVM-ShaderToy", nullptr, nullptr);
if (!window) {
std::cout << "Failed to create GLFW window" << std::endl;
glfwTerminate();
return -1;
}
/* Make the window's context current */
glfwMakeContextCurrent(window);
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
glfwSetCursorPosCallback(window, mouse_callback);
glfwSetScrollCallback(window, scroll_callback);
// tell GLFW to capture our mouse
// glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
/* Load all OpenGL function pointers */
if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress)) {
std::cout << "Failed to initialize GLAD" << std::endl;
glfwTerminate();
return -1;
}
// build and compile our shader program
unsigned int vertex, fragment, program;
// vertex shader
vertex = glCreateShader(GL_VERTEX_SHADER);
glShaderSource(vertex, 1, &VS, nullptr);
glCompileShader(vertex);
checkCompileErrors(vertex, "VERTEX");
// fragment Shader
fragment = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(fragment, 1, &FS, nullptr);
glCompileShader(fragment);
checkCompileErrors(fragment, "FRAGMENT");
// program
program = glCreateProgram();
glAttachShader(program, vertex);
glAttachShader(program, fragment);
glLinkProgram(program);
checkCompileErrors(program, "PROGRAM");
glDeleteShader(vertex);
glDeleteShader(fragment);
// set up vertex data (and buffer(s)) and configure vertex attributes
float vertices[] = {
// positions | texture coords
1.f, 1.f, 0.0f, 1.0f, 1.0f, // top right
1.f, -1.f, 0.0f, 1.0f, 0.0f, // bottom right
-1.f, -1.f, 0.0f, 0.0f, 0.0f, // bottom left
-1.f, 1.f, 0.0f, 0.0f, 1.0f // top left
};
unsigned int indices[] = {
0, 1, 3, // first triangle
1, 2, 3 // second triangle
};
unsigned int VAO, VBO, EBO;
glGenVertexArrays(1, &VAO);
glGenBuffers(1, &VBO);
glGenBuffers(1, &EBO);
glBindVertexArray(VAO);
glBindBuffer(GL_ARRAY_BUFFER, VBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, EBO);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW);
// position attribute
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), nullptr);
glEnableVertexAttribArray(0);
// texture coord attribute
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void *) (3 * sizeof(float)));
glEnableVertexAttribArray(1);
// init renderer
renderer = new SPVM::ShaderToy::Renderer();
if (!renderer->create(window, SCR_WIDTH, SCR_HEIGHT)) {
std::cout << "Failed to initialize SPVM::ShaderToy::Renderer" << std::endl;
delete renderer;
glfwTerminate();
return -1;
}
// init settings panel
settingPanel = new SPVM::ShaderToy::SettingPanel(renderer->getSettings());
settingPanel->init(window, SCR_WIDTH, SCR_HEIGHT);
// load and create a texture
// -------------------------
unsigned int texture;
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture);
// set the texture wrapping parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
// set texture filtering parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glUseProgram(program);
glUniform1i(glGetUniformLocation(program, "uTexture"), 0);
/* Loop until the user closes the window */
while (!glfwWindowShouldClose(window)) {
// check exit app
processInput(window);
// render
// ------
glClearColor(0.f, 0.f, 0.f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, texture);
renderer->drawFrame();
auto frame = renderer->getFrame();
if (frame) {
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (int) frame->width, (int) frame->height, 0, GL_RGBA,
GL_UNSIGNED_BYTE, frame->data);
}
glUseProgram(program);
glBindVertexArray(VAO);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, nullptr);
settingPanel->onDraw();
glfwSwapBuffers(window);
glfwPollEvents();
}
renderer->destroy();
delete renderer;
settingPanel->destroy();
delete settingPanel;
glDeleteVertexArrays(1, &VAO);
glDeleteBuffers(1, &VBO);
glDeleteBuffers(1, &EBO);
glDeleteTextures(1, &texture);
glDeleteProgram(program);
glfwDestroyWindow(window);
glfwTerminate();
return 0;
}
// process all input: query GLFW whether relevant keys are pressed/released this frame and react accordingly
// ---------------------------------------------------------------------------------------------------------
void processInput(GLFWwindow *window) {
if (settingPanel->wantCaptureKeyboard()) {
return;
}
if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) {
glfwSetWindowShouldClose(window, true);
return;
}
static bool key_h_pressed = false;
int state = glfwGetKey(window, GLFW_KEY_H);
if (state == GLFW_PRESS) {
if (!key_h_pressed) {
key_h_pressed = true;
settingPanel->toggleShowState();
}
} else if (state == GLFW_RELEASE) {
key_h_pressed = false;
}
}
// glfw: whenever the window size changed (by OS or user resize) this callback function executes
// ---------------------------------------------------------------------------------------------
void framebuffer_size_callback(GLFWwindow *window, int width, int height) {
// make sure the viewport matches the new window dimensions; note that width and
// height will be significantly larger than specified on retina displays.
glViewport(0, 0, width, height);
renderer->updateSize(width, height);
settingPanel->updateSize(width, height);
}
// glfw: whenever the mouse moves, this callback is called
// -------------------------------------------------------
void mouse_callback(GLFWwindow *window, double xPos, double yPos) {
if (settingPanel->wantCaptureMouse()) {
return;
}
if (glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS) {
if (firstMouse) {
lastX = xPos;
lastY = yPos;
firstMouse = false;
}
// TODO
lastX = xPos;
lastY = yPos;
} else {
firstMouse = true;
}
}
// glfw: whenever the mouse scroll wheel scrolls, this callback is called
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow *window, double xOffset, double yOffset) {
if (settingPanel->wantCaptureMouse()) {
return;
}
}
================================================
FILE: shadertoy/renderer.cpp
================================================
/*
* spvm-shadertoy
* @author : keith@robot9.me
*
*/
#include "renderer.h"
#include "decoder.h"
#include "compiler.h"
#include "utils.h"
#include "logger.h"
#define STB_IMAGE_IMPLEMENTATION
#include <stb/stb_image.h>
#define HEAP_SIZE 512 * 1024
#define PIXEL_CONVERT(val) 255 * fClamp(val, 0.f, 1.f)
#define PIXEL_ROW_PTR(row) (row) >= colorBuffer_->height ? nullptr : &colorBuffer_->data[(row) * colorBuffer_->width * 4]
const char *IMAGE_0_PATH = "assets/images/awesomeface.png";
#define SOUND_SAMPLE_RATE 44100
namespace SPVM {
namespace ShaderToy {
Renderer::Renderer() : colorBuffer_(nullptr) {}
Renderer::~Renderer() {
destroy();
}
bool Renderer::create(void *window, int width, int height) {
colorBuffer_ = new Buffer2D();
colorBuffer_->data = nullptr;
createBuffer(width, height);
// init uniform
uniformInput_.iResolution.x = (float) colorBuffer_->width;
uniformInput_.iResolution.y = (float) colorBuffer_->height;
uniformInput_.iResolution.z = 0;
uniformInput_.iSampleRate = SOUND_SAMPLE_RATE;
updateUniformDate(uniformInput_.iDate);
int iw = 0, ih = 0, n = 0;
stbi_set_flip_vertically_on_load(true);
unsigned char *pixelBytes = stbi_load(IMAGE_0_PATH, &iw, &ih, &n, STBI_default);
if (pixelBytes != nullptr && n > 0) {
// image
SPVM::SpvmImageInfo imageInfo;
imageInfo.dim = SpvDim2D;
imageInfo.format = SPVM_FORMAT_UNDEFINED;
imageInfo.width = iw;
imageInfo.height = ih;
imageInfo.depth = 1;
imageInfo.mipmaps = true;
imageInfo.baseMipLevel = 0;
imageInfo.mipLevels = 5;
imageInfo.arrayed = false;
imageInfo.baseArrayLayer = 0;
imageInfo.arrayLayers = 1;
imageInfo.samples = 1;
switch (n) {
case 1:
imageInfo.format = SPVM_FORMAT_R8_UNORM;
break;
case 2:
imageInfo.format = SPVM_FORMAT_R8G8_UNORM;
break;
case 3:
imageInfo.format = SPVM_FORMAT_R8G8B8_UNORM;
break;
case 4:
imageInfo.format = SPVM_FORMAT_R8G8B8A8_UNORM;
break;
default:
break;
}
iChannel0Image_ = SPVM::createImage(&imageInfo);
SPVM::uploadImageData(iChannel0Image_, pixelBytes, iw * ih * n, iw, ih, 1);
stbi_image_free(pixelBytes);
// mipmaps
generateMipmaps(iChannel0Image_, SpvSamplerFilterModeLinear);
// sampler
iChannel0Sampler_ = SPVM::createSampler();
iChannel0Sampler_->info.minFilter = SpvSamplerFilterModeLinear;
iChannel0Sampler_->info.magFilter = SpvSamplerFilterModeLinear;
iChannel0Sampler_->info.mipmapMode = SpvSamplerFilterModeLinear;
// sampledImage
iChannel0SampledImage_ = SPVM::createSampledImage(iChannel0Image_, iChannel0Sampler_);
}
// load shader
settings_.loadShaderCallback_ = [&](const std::string &shaderPath) {
reloadShader(shaderPath.c_str());
};
shaderWrapperStr_ = readFileString(settings_.shaderWrapperPath_.c_str());
if (shaderWrapperStr_.empty()) {
LOGE("error read shader wrapper file: %s", settings_.shaderWrapperPath_.c_str());
return false;
}
return reloadShader(settings_.getShaderPath().c_str());
}
bool Renderer::reloadShader(const char *shaderPath) {
LOGI("start load shader: %s", shaderPath);
std::string shaderStr = readFileString(shaderPath);
if (shaderStr.empty()) {
LOGE("error read shader file: %s", shaderPath);
return false;
}
shaderStr = shaderWrapperStr_ + shaderStr;
spvBytes_ = Compiler::compileShaderFragment(shaderStr.c_str());
if (spvBytes_.empty()) {
LOGE("error compile shader file to spir-v");
return false;
}
// decode spv file
delete module_;
module_ = new SpvmModule();
bool success = SPVM::Decoder::decodeBytes((const SpvmByte *) (spvBytes_.data()),
spvBytes_.size() * sizeof(uint32_t),
module_);
if (!success) {
LOGE("decode spv file failed");
return false;
}
// init runtime
runtimes_.clear();
runtimes_.resize(threadPool_.getThreadCnt());
for (auto &rt : runtimes_) {
success = rt.initWithModule(module_, HEAP_SIZE);
if (!success) {
LOGE("init spvm runtime failed");
return false;
}
if (iChannel0SampledImage_) {
rt.writeUniformBinding(iChannel0SampledImage_, 0, 1, 0);
}
}
lastFrameTime_ = 0.f;
frameIdx_ = 0;
timer_.start();
LOGI("load shader success, derivative instructions found: %s.", module_->hasDerivativeOpcodes ? "true" : "false");
return true;
}
void Renderer::drawFrame() {
if (colorBuffer_ == nullptr || module_ == nullptr) {
LOGE("drawFrame error: not inited");
return;
}
// update uniform
uniformInput_.iTime = (float) timer_.elapse() / 1000.f;
uniformInput_.iTimeDelta = uniformInput_.iTime - lastFrameTime_;
lastFrameTime_ = uniformInput_.iTime;
frameIdx_++;
uniformInput_.iFrame = frameIdx_;
for (auto &rt : runtimes_) {
rt.writeUniformBinding(&uniformInput_, 0, 0);
}
// fragment shading
float blockSize = (float) rasterBlockSize_;
int blockCntY = (int) (((float) colorBuffer_->height + blockSize - 1.f) / blockSize);
int blockCntX = (int) (((float) colorBuffer_->width + blockSize - 1.f) / blockSize);
for (int blockY = 0; blockY < blockCntY; blockY++) {
for (int blockX = 0; blockX < blockCntX; blockX++) {
threadPool_.pushTask([&, blockX, blockY](int threadId) {
execBlockShadingSingle(threadId, blockX, blockY, (int) blockSize);
});
}
}
threadPool_.waitTasksFinish();
}
void Renderer::execBlockShadingSingle(int threadId, int blockX, int blockY, int blockSize) {
Runtime &rt = runtimes_[threadId];
float fragCoord[2];
float fragColor[4];
int blockStartX = blockX * blockSize;
int blockStartY = blockY * blockSize;
for (size_t y = blockStartY; y < blockStartY + blockSize && y < colorBuffer_->height; y++) {
uint8_t *rowPtr = PIXEL_ROW_PTR(y);
for (size_t x = blockStartX; x < blockStartX + blockSize && x < colorBuffer_->width; x++) {
fragCoord[0] = (float) x;
fragCoord[1] = (float) y;
rt.writeInput(fragCoord, 0);
rt.execEntryPoint();
rt.readOutput(fragColor, 0);
pixelColorCvt(rowPtr, x, colorBuffer_->width, fragColor);
}
}
}
void Renderer::pixelColorCvt(uint8_t *rowPtr, size_t x, size_t width, float fragColor[4]) {
if (rowPtr == nullptr || x >= width) {
return;
}
uint8_t *pixel = &rowPtr[x * 4];
pixel[0] = PIXEL_CONVERT(fragColor[0]);
pixel[1] = PIXEL_CONVERT(fragColor[1]);
pixel[2] = PIXEL_CONVERT(fragColor[2]);
pixel[3] = PIXEL_CONVERT(fragColor[3]);
}
void Renderer::updateSize(int width, int height) {
if (colorBuffer_) {
createBuffer(width, height);
uniformInput_.iResolution.x = (float) colorBuffer_->width;
uniformInput_.iResolution.y = (float) colorBuffer_->height;
}
}
void Renderer::createBuffer(int width, int height) {
colorBuffer_->width = width;
colorBuffer_->height = height;
if (colorBuffer_->data) {
delete[] colorBuffer_->data;
}
colorBuffer_->data = new uint8_t[width * height * 4];
}
void Renderer::destroyBuffer() {
if (colorBuffer_) {
delete[] colorBuffer_->data;
delete colorBuffer_;
colorBuffer_ = nullptr;
}
}
void Renderer::destroy() {
destroyBuffer();
if (module_) {
delete module_;
module_ = nullptr;
}
}
std::string Renderer::readFileString(const char *path) {
std::string retStr;
FILE *file = fopen(path, "rb");
if (!file) {
LOGE("error open file");
return retStr;
}
fseek(file, 0, SEEK_END);
size_t fileLength = ftell(file);
if (fileLength <= 0) {
LOGE("error get file size");
fclose(file);
return retStr;
}
char *buffer = new char[fileLength + 1];
rewind(file);
fread(buffer, 1, fileLength, file);
buffer[fileLength] = '\0';
retStr = buffer;
fclose(file);
delete[] buffer;
return retStr;
}
void Renderer::updateUniformDate(vec4 &date) {
std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
time_t tt = std::chrono::system_clock::to_time_t(now);
tm localTime = *localtime(&tt);
date.x = (float) (localTime.tm_year + 1900);
date.y = (float) (localTime.tm_mon + 1);
date.z = (float) (localTime.tm_mday);
date.w = (float) (localTime.tm_hour * 3600 + localTime.tm_min * 60 + localTime.tm_sec);
}
}
}
================================================
FILE: shadertoy/renderer.h
================================================
/*
* spvm-shadertoy
* @author : keith@robot9.me
*
*/
#pragma once
#include <string>
#include "module.h"
#include "runtime.h"
#include "image.h"
#include "timer.h"
#include "settings.h"
#include "threadpool.h"
namespace SPVM {
namespace ShaderToy {
typedef struct Buffer2D_ {
size_t width;
size_t height;
uint8_t *data;
} Buffer2D;
typedef struct vec3_ {
float x;
float y;
float z;
} vec3;
typedef struct vec4_ {
float x;
float y;
float z;
float w;
} vec4;
typedef struct UniformInput_ {
vec3 iResolution; // viewport resolution (in pixels)
float iTime; // shader playback time (in seconds)
float iTimeDelta; // render time (in seconds)
int iFrame; // shader playback frame
vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click
vec4 iDate; // (year, month, day, time in seconds)
float iSampleRate; // sound sample rate (i.e., 44100)
} UniformInput;
class Renderer {
public:
Renderer();
~Renderer();
bool create(void *window, int width, int height);
bool reloadShader(const char *shaderPath);
void drawFrame();
void updateSize(int width, int height);
void destroy();
inline Buffer2D *getFrame() {
return colorBuffer_;
}
inline Settings &getSettings() {
return settings_;
}
private:
void createBuffer(int width, int height);
void destroyBuffer();
static std::string readFileString(const char *path);
inline void execBlockShadingSingle(int threadId, int blockX, int blockY, int blockSize);
static inline void pixelColorCvt(uint8_t *rowPtr, size_t x, size_t width, float fragColor[4]);
static void updateUniformDate(vec4 &date);
private:
Settings settings_;
int rasterBlockSize_ = 32;
ThreadPool threadPool_;
SpvmModule *module_ = nullptr;
std::vector<Runtime> runtimes_;
std::string shaderWrapperStr_;
std::vector<uint32_t> spvBytes_;
Buffer2D *colorBuffer_ = nullptr;
UniformInput uniformInput_;
Timer timer_;
float lastFrameTime_ = 0.f;
int frameIdx_ = 0;
SpvmImage *iChannel0Image_ = nullptr;
SpvmSampler *iChannel0Sampler_ = nullptr;
SpvmSampledImage *iChannel0SampledImage_ = nullptr;
};
}
}
================================================
FILE: shadertoy/resourcelimits.cpp
================================================
//
// Copyright (C) 2016 Google, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
//
// Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <cctype>
#include "resourcelimits.h"
namespace glslang {
const TBuiltInResource DefaultTBuiltInResource = {
/* .MaxLights = */ 32,
/* .MaxClipPlanes = */ 6,
/* .MaxTextureUnits = */ 32,
/* .MaxTextureCoords = */ 32,
/* .MaxVertexAttribs = */ 64,
/* .MaxVertexUniformComponents = */ 4096,
/* .MaxVaryingFloats = */ 64,
/* .MaxVertexTextureImageUnits = */ 32,
/* .MaxCombinedTextureImageUnits = */ 80,
/* .MaxTextureImageUnits = */ 32,
/* .MaxFragmentUniformComponents = */ 4096,
/* .MaxDrawBuffers = */ 32,
/* .MaxVertexUniformVectors = */ 128,
/* .MaxVaryingVectors = */ 8,
/* .MaxFragmentUniformVectors = */ 16,
/* .MaxVertexOutputVectors = */ 16,
/* .MaxFragmentInputVectors = */ 15,
/* .MinProgramTexelOffset = */ -8,
/* .MaxProgramTexelOffset = */ 7,
/* .MaxClipDistances = */ 8,
/* .MaxComputeWorkGroupCountX = */ 65535,
/* .MaxComputeWorkGroupCountY = */ 65535,
/* .MaxComputeWorkGroupCountZ = */ 65535,
/* .MaxComputeWorkGroupSizeX = */ 1024,
/* .MaxComputeWorkGroupSizeY = */ 1024,
/* .MaxComputeWorkGroupSizeZ = */ 64,
/* .MaxComputeUniformComponents = */ 1024,
/* .MaxComputeTextureImageUnits = */ 16,
/* .MaxComputeImageUniforms = */ 8,
/* .MaxComputeAtomicCounters = */ 8,
/* .MaxComputeAtomicCounterBuffers = */ 1,
/* .MaxVaryingComponents = */ 60,
/* .MaxVertexOutputComponents = */ 64,
/* .MaxGeometryInputComponents = */ 64,
/* .MaxGeometryOutputComponents = */ 128,
/* .MaxFragmentInputComponents = */ 128,
/* .MaxImageUnits = */ 8,
/* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8,
/* .MaxCombinedShaderOutputResources = */ 8,
/* .MaxImageSamples = */ 0,
/* .MaxVertexImageUniforms = */ 0,
/* .MaxTessControlImageUniforms = */ 0,
/* .MaxTessEvaluationImageUniforms = */ 0,
/* .MaxGeometryImageUniforms = */ 0,
/* .MaxFragmentImageUniforms = */ 8,
/* .MaxCombinedImageUniforms = */ 8,
/* .MaxGeometryTextureImageUnits = */ 16,
/* .MaxGeometryOutputVertices = */ 256,
/* .MaxGeometryTotalOutputComponents = */ 1024,
/* .MaxGeometryUniformComponents = */ 1024,
/* .MaxGeometryVaryingComponents = */ 64,
/* .MaxTessControlInputComponents = */ 128,
/* .MaxTessControlOutputComponents = */ 128,
/* .MaxTessControlTextureImageUnits = */ 16,
/* .MaxTessControlUniformComponents = */ 1024,
/* .MaxTessControlTotalOutputComponents = */ 4096,
/* .MaxTessEvaluationInputComponents = */ 128,
/* .MaxTessEvaluationOutputComponents = */ 128,
/* .MaxTessEvaluationTextureImageUnits = */ 16,
/* .MaxTessEvaluationUniformComponents = */ 1024,
/* .MaxTessPatchComponents = */ 120,
/* .MaxPatchVertices = */ 32,
/* .MaxTessGenLevel = */ 64,
/* .MaxViewports = */ 16,
/* .MaxVertexAtomicCounters = */ 0,
/* .MaxTessControlAtomicCounters = */ 0,
/* .MaxTessEvaluationAtomicCounters = */ 0,
/* .MaxGeometryAtomicCounters = */ 0,
/* .MaxFragmentAtomicCounters = */ 8,
/* .MaxCombinedAtomicCounters = */ 8,
/* .MaxAtomicCounterBindings = */ 1,
/* .MaxVertexAtomicCounterBuffers = */ 0,
/* .MaxTessControlAtomicCounterBuffers = */ 0,
/* .MaxTessEvaluationAtomicCounterBuffers = */ 0,
/* .MaxGeometryAtomicCounterBuffers = */ 0,
/* .MaxFragmentAtomicCounterBuffers = */ 1,
/* .MaxCombinedAtomicCounterBuffers = */ 1,
/* .MaxAtomicCounterBufferSize = */ 16384,
/* .MaxTransformFeedbackBuffers = */ 4,
/* .MaxTransformFeedbackInterleavedComponents = */ 64,
/* .MaxCullDistances = */ 8,
/* .MaxCombinedClipAndCullDistances = */ 8,
/* .MaxSamples = */ 4,
/* .maxMeshOutputVerticesNV = */ 256,
/* .maxMeshOutputPrimitivesNV = */ 512,
/* .maxMeshWorkGroupSizeX_NV = */ 32,
/* .maxMeshWorkGroupSizeY_NV = */ 1,
/* .maxMeshWorkGroupSizeZ_NV = */ 1,
/* .maxTaskWorkGroupSizeX_NV = */ 32,
/* .maxTaskWorkGroupSizeY_NV = */ 1,
/* .maxTaskWorkGroupSizeZ_NV = */ 1,
/* .maxMeshViewCountNV = */ 4,
/* .maxMeshOutputVerticesEXT = */ 256,
/* .maxMeshOutputPrimitivesEXT = */ 256,
/* .maxMeshWorkGroupSizeX_EXT = */ 128,
/* .maxMeshWorkGroupSizeY_EXT = */ 128,
/* .maxMeshWorkGroupSizeZ_EXT = */ 128,
/* .maxTaskWorkGroupSizeX_EXT = */ 128,
/* .maxTaskWorkGroupSizeY_EXT = */ 128,
/* .maxTaskWorkGroupSizeZ_EXT = */ 128,
/* .maxMeshViewCountEXT = */ 4,
/* .maxDualSourceDrawBuffersEXT = */ 1,
/* .limits = */ {
/* .nonInductiveForLoops = */ 1,
/* .whileLoops = */ 1,
/* .doWhileLoops = */ 1,
/* .generalUniformIndexing = */ 1,
/* .generalAttributeMatrixVectorIndexing = */ 1,
/* .generalVaryingIndexing = */ 1,
/* .generalSamplerIndexing = */ 1,
/* .generalVariableIndexing = */ 1,
/* .generalConstantMatrixVectorIndexing = */ 1,
}};
std::string GetDefaultTBuiltInResourceString()
{
std::ostringstream ostream;
ostream << "MaxLights " << DefaultTBuiltInResource.maxLights << "\n"
<< "MaxClipPlanes " << DefaultTBuiltInResource.maxClipPlanes << "\n"
<< "MaxTextureUnits " << DefaultTBuiltInResource.maxTextureUnits << "\n"
<< "MaxTextureCoords " << DefaultTBuiltInResource.maxTextureCoords << "\n"
<< "MaxVertexAttribs " << DefaultTBuiltInResource.maxVertexAttribs << "\n"
<< "MaxVertexUniformComponents " << DefaultTBuiltInResource.maxVertexUniformComponents << "\n"
<< "MaxVaryingFloats " << DefaultTBuiltInResource.maxVaryingFloats << "\n"
<< "MaxVertexTextureImageUnits " << DefaultTBuiltInResource.maxVertexTextureImageUnits << "\n"
<< "MaxCombinedTextureImageUnits " << DefaultTBuiltInResource.maxCombinedTextureImageUnits << "\n"
<< "MaxTextureImageUnits " << DefaultTBuiltInResource.maxTextureImageUnits << "\n"
<< "MaxFragmentUniformComponents " << DefaultTBuiltInResource.maxFragmentUniformComponents << "\n"
<< "MaxDrawBuffers " << DefaultTBuiltInResource.maxDrawBuffers << "\n"
<< "MaxVertexUniformVectors " << DefaultTBuiltInResource.maxVertexUniformVectors << "\n"
<< "MaxVaryingVectors " << DefaultTBuiltInResource.maxVaryingVectors << "\n"
<< "MaxFragmentUniformVectors " << DefaultTBuiltInResource.maxFragmentUniformVectors << "\n"
<< "MaxVertexOutputVectors " << DefaultTBuiltInResource.maxVertexOutputVectors << "\n"
<< "MaxFragmentInputVectors " << DefaultTBuiltInResource.maxFragmentInputVectors << "\n"
<< "MinProgramTexelOffset " << DefaultTBuiltInResource.minProgramTexelOffset << "\n"
<< "MaxProgramTexelOffset " << DefaultTBuiltInResource.maxProgramTexelOffset << "\n"
<< "MaxClipDistances " << DefaultTBuiltInResource.maxClipDistances << "\n"
<< "MaxComputeWorkGroupCountX " << DefaultTBuiltInResource.maxComputeWorkGroupCountX << "\n"
<< "MaxComputeWorkGroupCountY " << DefaultTBuiltInResource.maxComputeWorkGroupCountY << "\n"
<< "MaxComputeWorkGroupCountZ " << DefaultTBuiltInResource.maxComputeWorkGroupCountZ << "\n"
<< "MaxComputeWorkGroupSizeX " << DefaultTBuiltInResource.maxComputeWorkGroupSizeX << "\n"
<< "MaxComputeWorkGroupSizeY " << DefaultTBuiltInResource.maxComputeWorkGroupSizeY << "\n"
<< "MaxComputeWorkGroupSizeZ " << DefaultTBuiltInResource.maxComputeWorkGroupSizeZ << "\n"
<< "MaxComputeUniformComponents " << DefaultTBuiltInResource.maxComputeUniformComponents << "\n"
<< "MaxComputeTextureImageUnits " << DefaultTBuiltInResource.maxComputeTextureImageUnits << "\n"
<< "MaxComputeImageUniforms " << DefaultTBuiltInResource.maxComputeImageUniforms << "\n"
<< "MaxComputeAtomicCounters " << DefaultTBuiltInResource.maxComputeAtomicCounters << "\n"
<< "MaxComputeAtomicCounterBuffers " << DefaultTBuiltInResource.maxComputeAtomicCounterBuffers << "\n"
<< "MaxVaryingComponents " << DefaultTBuiltInResource.maxVaryingComponents << "\n"
<< "MaxVertexOutputComponents " << DefaultTBuiltInResource.maxVertexOutputComponents << "\n"
<< "MaxGeometryInputComponents " << DefaultTBuiltInResource.maxGeometryInputComponents << "\n"
<< "MaxGeometryOutputComponents " << DefaultTBuiltInResource.maxGeometryOutputComponents << "\n"
<< "MaxFragmentInputComponents " << DefaultTBuiltInResource.maxFragmentInputComponents << "\n"
<< "MaxImageUnits " << DefaultTBuiltInResource.maxImageUnits << "\n"
<< "MaxCombinedImageUnitsAndFragmentOutputs " << DefaultTBuiltInResource.maxCombinedImageUnitsAndFragmentOutputs << "\n"
<< "MaxCombinedShaderOutputResources " << DefaultTBuiltInResource.maxCombinedShaderOutputResources << "\n"
<< "MaxImageSamples " << DefaultTBuiltInResource.maxImageSamples << "\n"
<< "MaxVertexImageUniforms " << DefaultTBuiltInResource.maxVertexImageUniforms << "\n"
<< "MaxTessControlImageUniforms " << DefaultTBuiltInResource.maxTessControlImageUniforms << "\n"
<< "MaxTessEvaluationImageUniforms " << DefaultTBuiltInResource.maxTessEvaluationImageUniforms << "\n"
<< "MaxGeometryImageUniforms " << DefaultTBuiltInResource.maxGeometryImageUniforms << "\n"
<< "MaxFragmentImageUniforms " << DefaultTBuiltInResource.maxFragmentImageUniforms << "\n"
<< "MaxCombinedImageUniforms " << DefaultTBuiltInResource.maxCombinedImageUniforms << "\n"
<< "MaxGeometryTextureImageUnits " << DefaultTBuiltInResource.maxGeometryTextureImageUnits << "\n"
<< "MaxGeometryOutputVertices " << DefaultTBuiltInResource.maxGeometryOutputVertices << "\n"
<< "MaxGeometryTotalOutputComponents " << DefaultTBuiltInResource.maxGeometryTotalOutputComponents << "\n"
<< "MaxGeometryUniformComponents " << DefaultTBuiltInResource.maxGeometryUniformComponents << "\n"
<< "MaxGeometryVaryingComponents " << DefaultTBuiltInResource.maxGeometryVaryingComponents << "\n"
<< "MaxTessControlInputComponents " << DefaultTBuiltInResource.maxTessControlInputComponents << "\n"
<< "MaxTessControlOutputComponents " << DefaultTBuiltInResource.maxTessControlOutputComponents << "\n"
<< "MaxTessControlTextureImageUnits " << DefaultTBuiltInResource.maxTessControlTextureImageUnits << "\n"
<< "MaxTessControlUniformComponents " << DefaultTBuiltInResource.maxTessControlUniformComponents << "\n"
<< "MaxTessControlTotalOutputComponents " << DefaultTBuiltInResource.maxTessControlTotalOutputComponents << "\n"
<< "MaxTessEvaluationInputComponents " << DefaultTBuiltInResource.maxTessEvaluationInputComponents << "\n"
<< "MaxTessEvaluationOutputComponents " << DefaultTBuiltInResource.maxTessEvaluationOutputComponents << "\n"
<< "MaxTessEvaluationTextureImageUnits " << DefaultTBuiltInResource.maxTessEvaluationTextureImageUnits << "\n"
<< "MaxTessEvaluationUniformComponents " << DefaultTBuiltInResource.maxTessEvaluationUniformComponents << "\n"
<< "MaxTessPatchComponents " << DefaultTBuiltInResource.maxTessPatchComponents << "\n"
<< "MaxPatchVertices " << DefaultTBuiltInResource.maxPatchVertices << "\n"
<< "MaxTessGenLevel " << DefaultTBuiltInResource.maxTessGenLevel << "\n"
<< "MaxViewports " << DefaultTBuiltInResource.maxViewports << "\n"
<< "MaxVertexAtomicCounters " << DefaultTBuiltInResource.maxVertexAtomicCounters << "\n"
<< "MaxTessControlAtomicCounters " << DefaultTBuiltInResource.maxTessControlAtomicCounters << "\n"
<< "MaxTessEvaluationAtomicCounters " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounters << "\n"
<< "MaxGeometryAtomicCounters " << DefaultTBuiltInResource.maxGeometryAtomicCounters << "\n"
<< "MaxFragmentAtomicCounters " << DefaultTBuiltInResource.maxFragmentAtomicCounters << "\n"
<< "MaxCombinedAtomicCounters " << DefaultTBuiltInResource.maxCombinedAtomicCounters << "\n"
<< "MaxAtomicCounterBindings " << DefaultTBuiltInResource.maxAtomicCounterBindings << "\n"
<< "MaxVertexAtomicCounterBuffers " << DefaultTBuiltInResource.maxVertexAtomicCounterBuffers << "\n"
<< "MaxTessControlAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessControlAtomicCounterBuffers << "\n"
<< "MaxTessEvaluationAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounterBuffers << "\n"
<< "MaxGeometryAtomicCounterBuffers " << DefaultTBuiltInResource.maxGeometryAtomicCounterBuffers << "\n"
<< "MaxFragmentAtomicCounterBuffers " << DefaultTBuiltInResource.maxFragmentAtomicCounterBuffers << "\n"
<< "MaxCombinedAtomicCounterBuffers " << DefaultTBuiltInResource.maxCombinedAtomicCounterBuffers << "\n"
<< "MaxAtomicCounterBufferSize " << DefaultTBuiltInResource.maxAtomicCounterBufferSize << "\n"
<< "MaxTransformFeedbackBuffers " << DefaultTBuiltInResource.maxTransformFeedbackBuffers << "\n"
<< "MaxTransformFeedbackInterleavedComponents " << DefaultTBuiltInResource.maxTransformFeedbackInterleavedComponents << "\n"
<< "MaxCullDistances " << DefaultTBuiltInResource.maxCullDistances << "\n"
<< "MaxCombinedClipAndCullDistances " << DefaultTBuiltInResource.maxCombinedClipAndCullDistances << "\n"
<< "MaxSamples " << DefaultTBuiltInResource.maxSamples << "\n"
<< "MaxMeshOutputVerticesNV " << DefaultTBuiltInResource.maxMeshOutputVerticesNV << "\n"
<< "MaxMeshOutputPrimitivesNV " << DefaultTBuiltInResource.maxMeshOutputPrimitivesNV << "\n"
<< "MaxMeshWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_NV << "\n"
<< "MaxMeshWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_NV << "\n"
<< "MaxMeshWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_NV << "\n"
<< "MaxTaskWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_NV << "\n"
<< "MaxTaskWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_NV << "\n"
<< "MaxTaskWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_NV << "\n"
<< "MaxMeshViewCountNV " << DefaultTBuiltInResource.maxMeshViewCountNV << "\n"
<< "MaxMeshOutputVerticesEXT " << DefaultTBuiltInResource.maxMeshOutputVerticesEXT << "\n"
<< "MaxMeshOutputPrimitivesEXT " << DefaultTBuiltInResource.maxMeshOutputPrimitivesEXT << "\n"
<< "MaxMeshWorkGroupSizeX_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_EXT << "\n"
<< "MaxMeshWorkGroupSizeY_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_EXT << "\n"
<< "MaxMeshWorkGroupSizeZ_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_EXT << "\n"
<< "MaxTaskWorkGroupSizeX_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_EXT << "\n"
<< "MaxTaskWorkGroupSizeY_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_EXT << "\n"
<< "MaxTaskWorkGroupSizeZ_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_EXT << "\n"
<< "MaxMeshViewCountEXT " << DefaultTBuiltInResource.maxMeshViewCountEXT << "\n"
<< "MaxDualSourceDrawBuffersEXT " << DefaultTBuiltInResource.maxDualSourceDrawBuffersEXT << "\n"
<< "nonInductiveForLoops " << DefaultTBuiltInResource.limits.nonInductiveForLoops << "\n"
<< "whileLoops " << DefaultTBuiltInResource.limits.whileLoops << "\n"
<< "doWhileLoops " << DefaultTBuiltInResource.limits.doWhileLoops << "\n"
<< "generalUniformIndexing " << DefaultTBuiltInResource.limits.generalUniformIndexing << "\n"
<< "generalAttributeMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalAttributeMatrixVectorIndexing << "\n"
<< "generalVaryingIndexing " << DefaultTBuiltInResource.limits.generalVaryingIndexing << "\n"
<< "generalSamplerIndexing " << DefaultTBuiltInResource.limits.generalSamplerIndexing << "\n"
<< "generalVariableIndexing " << DefaultTBuiltInResource.limits.generalVariableIndexing << "\n"
<< "generalConstantMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalConstantMatrixVectorIndexing << "\n"
;
return ostream.str();
}
void DecodeResourceLimits(TBuiltInResource* resources, char* config)
{
static const char* delims = " \t\n\r";
size_t pos = 0;
std::string configStr(config);
while ((pos = configStr.find_first_not_of(delims, pos)) != std::string::npos) {
const size_t token_s = pos;
const size_t token_e = configStr.find_first_of(delims, token_s);
const size_t value_s = configStr.find_first_not_of(delims, token_e);
const size_t value_e = configStr.find_first_of(delims, value_s);
pos = value_e;
// Faster to use compare(), but prefering readability.
const std::string tokenStr = configStr.substr(token_s, token_e-token_s);
const std::string valueStr = configStr.substr(value_s, value_e-value_s);
if (value_s == std::string::npos || ! (valueStr[0] == '-' || isdigit(valueStr[0]))) {
printf("Error: '%s' bad .conf file. Each name must be followed by one number.\n",
valueStr.c_str());
return;
}
const int value = std::atoi(valueStr.c_str());
if (tokenStr == "MaxLights")
resources->maxLights = value;
else if (tokenStr == "MaxClipPlanes")
resources->maxClipPlanes = value;
else if (tokenStr == "MaxTextureUnits")
resources->maxTextureUnits = value;
else if (tokenStr == "MaxTextureCoords")
resources->maxTextureCoords = value;
else if (tokenStr == "MaxVertexAttribs")
resources->maxVertexAttribs = value;
else if (tokenStr == "MaxVertexUniformComponents")
resources->maxVertexUniformComponents = value;
else if (tokenStr == "MaxVaryingFloats")
resources->maxVaryingFloats = value;
else if (tokenStr == "MaxVertexTextureImageUnits")
resources->maxVertexTextureImageUnits = value;
else if (tokenStr == "MaxCombinedTextureImageUnits")
resources->maxCombinedTextureImageUnits = value;
else if (tokenStr == "MaxTextureImageUnits")
resources->maxTextureImageUnits = value;
else if (tokenStr == "MaxFragmentUniformComponents")
resources->maxFragmentUniformComponents = value;
else if (tokenStr == "MaxDrawBuffers")
resources->maxDrawBuffers = value;
else if (tokenStr == "MaxVertexUniformVectors")
resources->maxVertexUniformVectors = value;
else if (tokenStr == "MaxVaryingVectors")
resources->maxVaryingVectors = value;
else if (tokenStr == "MaxFragmentUniformVectors")
resources->maxFragmentUniformVectors = value;
else if (tokenStr == "MaxVertexOutputVectors")
resources->maxVertexOutputVectors = value;
else if (tokenStr == "MaxFragmentInputVectors")
resources->maxFragmentInputVectors = value;
else if (tokenStr == "MinProgramTexelOffset")
resources->minProgramTexelOffset = value;
else if (tokenStr == "MaxProgramTexelOffset")
resources->maxProgramTexelOffset = value;
else if (tokenStr == "MaxClipDistances")
resources->maxClipDistances = value;
else if (tokenStr == "MaxComputeWorkGroupCountX")
resources->maxComputeWorkGroupCountX = value;
else if (tokenStr == "MaxComputeWorkGroupCountY")
resources->maxComputeWorkGroupCountY = value;
else if (tokenStr == "MaxComputeWorkGroupCountZ")
resources->maxComputeWorkGroupCountZ = value;
else if (tokenStr == "MaxComputeWorkGroupSizeX")
resources->maxComputeWorkGroupSizeX = value;
else if (tokenStr == "MaxComputeWorkGroupSizeY")
resources->maxComputeWorkGroupSizeY = value;
else if (tokenStr == "MaxComputeWorkGroupSizeZ")
resources->maxComputeWorkGroupSizeZ = value;
else if (tokenStr == "MaxComputeUniformComponents")
resources->maxComputeUniformComponents = value;
else if (tokenStr == "MaxComputeTextureImageUnits")
resources->maxComputeTextureImageUnits = value;
else if (tokenStr == "MaxComputeImageUniforms")
resources->maxComputeImageUniforms = value;
else if (tokenStr == "MaxComputeAtomicCounters")
resources->maxComputeAtomicCounters = value;
else if (tokenStr == "MaxComputeAtomicCounterBuffers")
resources->maxComputeAtomicCounterBuffers = value;
else if (tokenStr == "MaxVaryingComponents")
resources->maxVaryingComponents = value;
else if (tokenStr == "MaxVertexOutputComponents")
resources->maxVertexOutputComponents = value;
else if (tokenStr == "MaxGeometryInputComponents")
resources->maxGeometryInputComponents = value;
else if (tokenStr == "MaxGeometryOutputComponents")
resources->maxGeometryOutputComponents = value;
else if (tokenStr == "MaxFragmentInputComponents")
resources->maxFragmentInputComponents = value;
else if (tokenStr == "MaxImageUnits")
resources->maxImageUnits = value;
else if (tokenStr == "MaxCombinedImageUnitsAndFragmentOutputs")
resources->maxCombinedImageUnitsAndFragmentOutputs = value;
else if (tokenStr == "MaxCombinedShaderOutputResources")
resources->maxCombinedShaderOutputResources = value;
else if (tokenStr == "MaxImageSamples")
resources->maxImageSamples = value;
else if (tokenStr == "MaxVertexImageUniforms")
resources->maxVertexImageUniforms = value;
else if (tokenStr == "MaxTessControlImageUniforms")
resources->maxTessControlImageUniforms = value;
else if (tokenStr == "MaxTessEvaluationImageUniforms")
resources->maxTessEvaluationImageUniforms = value;
else if (tokenStr == "MaxGeometryImageUniforms")
resources->maxGeometryImageUniforms = value;
else if (tokenStr == "MaxFragmentImageUniforms")
resources->maxFragmentImageUniforms = value;
else if (tokenStr == "MaxCombinedImageUniforms")
resources->maxCombinedImageUniforms = value;
else if (tokenStr == "MaxGeometryTextureImageUnits")
resources->maxGeometryTextureImageUnits = value;
else if (tokenStr == "MaxGeometryOutputVertices")
resources->maxGeometryOutputVertices = value;
else if (tokenStr == "MaxGeometryTotalOutputComponents")
resources->maxGeometryTotalOutputComponents = value;
else if (tokenStr == "MaxGeometryUniformComponents")
resources->maxGeometryUniformComponents = value;
else if (tokenStr == "MaxGeometryVaryingComponents")
resources->maxGeometryVaryingComponents = value;
else if (tokenStr == "MaxTessControlInputComponents")
resources->maxTessControlInputComponents = value;
else if (tokenStr == "MaxTessControlOutputComponents")
resources->maxTessControlOutputComponents = value;
else if (tokenStr == "MaxTessControlTextureImageUnits")
resources->maxTessControlTextureImageUnits = value;
else if (tokenStr == "MaxTessControlUniformComponents")
resources->maxTessControlUniformComponents = value;
else if (tokenStr == "MaxTessControlTotalOutputComponents")
resources->maxTessControlTotalOutputComponents = value;
else if (tokenStr == "MaxTessEvaluationInputComponents")
resources->maxTessEvaluationInputComponents = value;
else if (tokenStr == "MaxTessEvaluationOutputComponents")
resources->maxTessEvaluationOutputComponents = value;
else if (tokenStr == "MaxTessEvaluationTextureImageUnits")
resources->maxTessEvaluationTextureImageUnits = value;
else if (tokenStr == "MaxTessEvaluationUniformComponents")
resources->maxTessEvaluationUniformComponents = value;
else if (tokenStr == "MaxTessPatchComponents")
resources->maxTessPatchComponents = value;
else if (tokenStr == "MaxPatchVertices")
resources->maxPatchVertices = value;
else if (tokenStr == "MaxTessGenLevel")
resources->maxTessGenLevel = value;
else if (tokenStr == "MaxViewports")
resources->maxViewports = value;
else if (tokenStr == "MaxVertexAtomicCounters")
resources->maxVertexAtomicCounters = value;
else if (tokenStr == "MaxTessControlAtomicCounters")
resources->maxTessControlAtomicCounters = value;
else if (tokenStr == "MaxTessEvaluationAtomicCounters")
resources->maxTessEvaluationAtomicCounters = value;
else if (tokenStr == "MaxGeometryAtomicCounters")
resources->maxGeometryAtomicCounters = value;
else if (tokenStr == "MaxFragmentAtomicCounters")
resources->maxFragmentAtomicCounters = value;
else if (tokenStr == "MaxCombinedAtomicCounters")
resources->maxCombinedAtomicCounters = value;
else if (tokenStr == "MaxAtomicCounterBindings")
resources->maxAtomicCounterBindings = value;
else if (tokenStr == "MaxVertexAtomicCounterBuffers")
resources->maxVertexAtomicCounterBuffers = value;
else if (tokenStr == "MaxTessControlAtomicCounterBuffers")
resources->maxTessControlAtomicCounterBuffers = value;
else if (tokenStr == "MaxTessEvaluationAtomicCounterBuffers")
resources->maxTessEvaluationAtomicCounterBuffers = value;
else if (tokenStr == "MaxGeometryAtomicCounterBuffers")
resources->maxGeometryAtomicCounterBuffers = value;
else if (tokenStr == "MaxFragmentAtomicCounterBuffers")
resources->maxFragmentAtomicCounterBuffers = value;
else if (tokenStr == "MaxCombinedAtomicCounterBuffers")
resources->maxCombinedAtomicCounterBuffers = value;
else if (tokenStr == "MaxAtomicCounterBufferSize")
resources->maxAtomicCounterBufferSize = value;
else if (tokenStr == "MaxTransformFeedbackBuffers")
resources->maxTransformFeedbackBuffers = value;
else if (tokenStr == "MaxTransformFeedbackInterleavedComponents")
resources->maxTransformFeedbackInterleavedComponents = value;
else if (tokenStr == "MaxCullDistances")
resources->maxCullDistances = value;
else if (tokenStr == "MaxCombinedClipAndCullDistances")
resources->maxCombinedClipAndCullDistances = value;
else if (tokenStr == "MaxSamples")
resources->maxSamples = value;
else if (tokenStr == "MaxMeshOutputVerticesNV")
resources->maxMeshOutputVerticesNV = value;
else if (tokenStr == "MaxMeshOutputPrimitivesNV")
resources->maxMeshOutputPrimitivesNV = value;
else if (tokenStr == "MaxMeshWorkGroupSizeX_NV")
resources->maxMeshWorkGroupSizeX_NV = value;
else if (tokenStr == "MaxMeshWorkGroupSizeY_NV")
resources->maxMeshWorkGroupSizeY_NV = value;
else if (tokenStr == "MaxMeshWorkGroupSizeZ_NV")
resources->maxMeshWorkGroupSizeZ_NV = value;
else if (tokenStr == "MaxTaskWorkGroupSizeX_NV")
resources->maxTaskWorkGroupSizeX_NV = value;
else if (tokenStr == "MaxTaskWorkGroupSizeY_NV")
resources->maxTaskWorkGroupSizeY_NV = value;
else if (tokenStr == "MaxTaskWorkGroupSizeZ_NV")
resources->maxTaskWorkGroupSizeZ_NV = value;
else if (tokenStr == "MaxMeshViewCountNV")
resources->maxMeshViewCountNV = value;
else if (tokenStr == "MaxMeshOutputVerticesEXT")
resources->maxMeshOutputVerticesEXT = value;
else if (tokenStr == "MaxMeshOutputPrimitivesEXT")
resources->maxMeshOutputPrimitivesEXT = value;
else if (tokenStr == "MaxMeshWorkGroupSizeX_EXT")
resources->maxMeshWorkGroupSizeX_EXT = value;
else if (tokenStr == "MaxMeshWorkGroupSizeY_EXT")
resources->maxMeshWorkGroupSizeY_EXT = value;
else if (tokenStr == "MaxMeshWorkGroupSizeZ_EXT")
resources->maxMeshWorkGroupSizeZ_EXT = value;
else if (tokenStr == "MaxTaskWorkGroupSizeX_EXT")
resources->maxTaskWorkGroupSizeX_EXT = value;
else if (tokenStr == "MaxTaskWorkGroupSizeY_EXT")
resources->maxTaskWorkGroupSizeY_EXT = value;
else if (tokenStr == "MaxTaskWorkGroupSizeZ_EXT")
resources->maxTaskWorkGroupSizeZ_EXT = value;
else if (tokenStr == "MaxMeshViewCountEXT")
resources->maxMeshViewCountEXT = value;
else if (tokenStr == "nonInductiveForLoops")
resources->limits.nonInductiveForLoops = (value != 0);
else if (tokenStr == "whileLoops")
resources->limits.whileLoops = (value != 0);
else if (tokenStr == "doWhileLoops")
resources->limits.doWhileLoops = (value != 0);
else if (tokenStr == "generalUniformIndexing")
resources->limits.generalUniformIndexing = (value != 0);
else if (tokenStr == "generalAttributeMatrixVectorIndexing")
resources->limits.generalAttributeMatrixVectorIndexing = (value != 0);
else if (tokenStr == "generalVaryingIndexing")
resources->limits.generalVaryingIndexing = (value != 0);
else if (tokenStr == "generalSamplerIndexing")
resources->limits.generalSamplerIndexing = (value != 0);
else if (tokenStr == "generalVariableIndexing")
resources->limits.generalVariableIndexing = (value != 0);
else if (tokenStr == "generalConstantMatrixVectorIndexing")
resources->limits.generalConstantMatrixVectorIndexing = (value != 0);
else
printf("Warning: unrecognized limit (%s) in configuration file.\n", tokenStr.c_str());
}
}
} // end namespace glslang
================================================
FILE: shadertoy/resourcelimits.h
================================================
//
// Copyright (C) 2016 Google, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
//
// Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#ifndef _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
#define _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
#include <string>
#include "glslang/Include/ResourceLimits.h"
namespace glslang {
// These are the default resources for TBuiltInResources, used for both
// - parsing this string for the case where the user didn't supply one,
// - dumping out a template for user construction of a config file.
extern const TBuiltInResource DefaultTBuiltInResource;
// Returns the DefaultTBuiltInResource as a human-readable string.
std::string GetDefaultTBuiltInResourceString();
// Decodes the resource limits from |config| to |resources|.
void DecodeResourceLimits(TBuiltInResource* resources, char* config);
} // end namespace glslang
#endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
================================================
FILE: shadertoy/settingpanel.cpp
================================================
/*
* spvm-shadertoy
* @author : keith@robot9.me
*
*/
#include "settingpanel.h"
#include "imgui/imgui_impl_glfw.h"
#include "imgui/imgui_impl_opengl3.h"
namespace SPVM {
namespace ShaderToy {
void SettingPanel::init(void *window, int width, int height) {
frameWidth_ = width;
frameHeight_ = height;
// Setup Dear ImGui context
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO &io = ImGui::GetIO();
io.IniFilename = nullptr;
// Setup Dear ImGui style
ImGui::StyleColorsDark();
ImGuiStyle *style = &ImGui::GetStyle();
style->Alpha = 0.8f;
// Setup Platform/Renderer backends
ImGui_ImplGlfw_InitForOpenGL((GLFWwindow *) window, true);
ImGui_ImplOpenGL3_Init("#version 150");
}
void SettingPanel::onDraw() {
if (!visible) {
return;
}
// Start the Dear ImGui frame
ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();
// Settings window
ImGui::Begin("Settings", nullptr,
ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize
| ImGuiWindowFlags_AlwaysAutoResize);
drawSettings();
ImGui::SetWindowPos(ImVec2(frameWidth_ - ImGui::GetWindowWidth(), 0));
ImGui::End();
ImGui::Render();
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
}
void SettingPanel::drawSettings() {
// fps
ImGui::Separator();
ImGui::Text("fps: %.01f", ImGui::GetIO().Framerate);
ImGui::Text("frame: %.02f ms", 1000.0f / ImGui::GetIO().Framerate);
// shader
ImGui::Separator();
ImGui::Text("load shader");
for (const auto &kv : settings_.shaderPaths_) {
if (ImGui::RadioButton(kv.first.c_str(), settings_.shaderPathKey_ == kv.first)) {
settings_.shaderPathKey_ = kv.first;
if (settings_.loadShaderCallback_) {
settings_.loadShaderCallback_(settings_.getShaderPath());
}
}
}
}
void SettingPanel::destroy() {
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImGui::DestroyContext();
}
void SettingPanel::updateSize(int width, int height) {
frameWidth_ = width;
frameHeight_ = height;
}
void SettingPanel::toggleShowState() {
visible = !visible;
}
bool SettingPanel::wantCaptureKeyboard() {
ImGuiIO &io = ImGui::GetIO();
return io.WantCaptureKeyboard;
}
bool SettingPanel::wantCaptureMouse() {
ImGuiIO &io = ImGui::GetIO();
return io.WantCaptureMouse;
}
}
}
================================================
FILE: shadertoy/settingpanel.h
================================================
/*
* spvm-shadertoy
* @author : keith@robot9.me
*
*/
#pragma once
#include "imgui/imgui.h"
#include "settings.h"
namespace SPVM {
namespace ShaderToy {
class SettingPanel {
public:
explicit SettingPanel(Settings &settings) : settings_(settings) {}
void init(void *window, int width, int height);
void onDraw();
void destroy();
void updateSize(int width, int height);
void toggleShowState();
bool wantCaptureKeyboard();
bool wantCaptureMouse();
private:
void drawSettings();
private:
Settings &settings_;
bool visible = true;
int frameWidth_ = 0;
int frameHeight_ = 0;
};
}
}
================================================
FILE: shadertoy/settings.h
================================================
/*
* spvm-shadertoy
* @author : keith@robot9.me
*
*/
#pragma once
#include <iostream>
#include <string>
#include <unordered_map>
#include <functional>
namespace SPVM {
namespace ShaderToy {
const std::string ASSETS_DIR = "assets/shaders/";
const std::string SHADER_WRAPPER_PATH = "assets/wrapper.frag";
class Settings {
public:
Settings() {
shaderPaths_["basic"] = ASSETS_DIR + "basic.frag";
shaderPaths_["fstyD4"] = ASSETS_DIR + "fstyD4.frag";
shaderPaths_["ftdfWn"] = ASSETS_DIR + "ftdfWn.frag";
shaderPaths_["Nt3BzM"] = ASSETS_DIR + "Nt3BzM.frag";
shaderPaths_["XdlSDs"] = ASSETS_DIR + "XdlSDs.frag";
shaderPathKey_ = shaderPaths_.begin()->first;
}
inline std::string getShaderPath() {
auto it = shaderPaths_.find(shaderPathKey_);
return it == shaderPaths_.end() ? "" : it->second;
}
public:
std::string shaderWrapperPath_ = SHADER_WRAPPER_PATH;
std::function<void(std::string)> loadShaderCallback_;
std::string shaderPathKey_;
std::unordered_map<std::string, std::string> shaderPaths_;
};
}
}
================================================
FILE: shadertoy/third_party/glad/include/KHR/khrplatform.h
================================================
#ifndef __khrplatform_h_
#define __khrplatform_h_
/*
** Copyright (c) 2008-2018 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
/* Khronos platform-specific types and definitions.
*
* The master copy of khrplatform.h is maintained in the Khronos EGL
* Registry repository at https://github.com/KhronosGroup/EGL-Registry
* The last semantic modification to khrplatform.h was at commit ID:
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692
*
* Adopters may modify this file to suit their platform. Adopters are
* encouraged to submit platform specific modifications to the Khronos
* group so that they can be included in future versions of this file.
* Please submit changes by filing pull requests or issues on
* the EGL Registry repository linked above.
*
*
* See the Implementer's Guidelines for information about where this file
* should be located on your system and for more details of its use:
* http://www.khronos.org/registry/implementers_guide.pdf
*
* This file should be included as
* #include <KHR/khrplatform.h>
* by Khronos client API header files that use its types and defines.
*
* The types in khrplatform.h should only be used to define API-specific types.
*
* Types defined in khrplatform.h:
* khronos_int8_t signed 8 bit
* khronos_uint8_t unsigned 8 bit
* khronos_int16_t signed 16 bit
* khronos_uint16_t unsigned 16 bit
* khronos_int32_t signed 32 bit
* khronos_uint32_t unsigned 32 bit
* khronos_int64_t signed 64 bit
* khronos_uint64_t unsigned 64 bit
* khronos_intptr_t signed same number of bits as a pointer
* khronos_uintptr_t unsigned same number of bits as a pointer
* khronos_ssize_t signed size
* khronos_usize_t unsigned size
* khronos_float_t signed 32 bit floating point
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
* nanoseconds
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
* khronos_boolean_enum_t enumerated boolean type. This should
* only be used as a base type when a client API's boolean type is
* an enum. Client APIs which use an integer or other type for
* booleans cannot use this as the base type for their boolean.
*
* Tokens defined in khrplatform.h:
*
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
*
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
*
* Calling convention macros defined in this file:
* KHRONOS_APICALL
* KHRONOS_APIENTRY
* KHRONOS_APIATTRIBUTES
*
* These may be used in function prototypes as:
*
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
* int arg1,
* int arg2) KHRONOS_APIATTRIBUTES;
*/
#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
# define KHRONOS_STATIC 1
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APICALL
*-------------------------------------------------------------------------
* This precedes the return type of the function in the function prototype.
*/
#if defined(KHRONOS_STATIC)
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
* header compatible with static linking. */
# define KHRONOS_APICALL
#elif defined(_WIN32)
# define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__)
# define KHRONOS_APICALL __attribute__((visibility("default")))
#else
# define KHRONOS_APICALL
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIENTRY
*-------------------------------------------------------------------------
* This follows the return type of the function and precedes the function
* name in the function prototype.
*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
/* Win32 but not WinCE */
# define KHRONOS_APIENTRY __stdcall
#else
# define KHRONOS_APIENTRY
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIATTRIBUTES
*-------------------------------------------------------------------------
* This follows the closing parenthesis of the function prototype arguments.
*/
#if defined (__ARMCC_2__)
#define KHRONOS_APIATTRIBUTES __softfp
#else
#define KHRONOS_APIATTRIBUTES
#endif
/*-------------------------------------------------------------------------
* basic type definitions
*-----------------------------------------------------------------------*/
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
/*
* Using <stdint.h>
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
/*
* To support platform where unsigned long cannot be used interchangeably with
* inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
* Ideally, we could just use (u)intptr_t everywhere, but this could result in
* ABI breakage if khronos_uintptr_t is changed from unsigned long to
* unsigned long long or similar (this results in different C++ name mangling).
* To avoid changes for existing platforms, we restrict usage of intptr_t to
* platforms where the size of a pointer is larger than the size of long.
*/
#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
#define KHRONOS_USE_INTPTR_T
#endif
#endif
#elif defined(__VMS ) || defined(__sgi)
/*
* Using <inttypes.h>
*/
#include <inttypes.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
/*
* Win32
*/
typedef __int32 khronos_int32_t;
typedef unsigned __int32 khronos_uint32_t;
typedef __int64 khronos_int64_t;
typedef unsigned __int64 khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(__sun__) || defined(__digital__)
/*
* Sun or Digital
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#if defined(__arch64__) || defined(_LP64)
typedef long int khronos_int64_t;
typedef unsigned long int khronos_uint64_t;
#else
typedef long long int khronos_int64_t;
typedef unsigned long long int khronos_uint64_t;
#endif /* __arch64__ */
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif 0
/*
* Hypothetical platform with no float or int64 support
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#define KHRONOS_SUPPORT_INT64 0
#define KHRONOS_SUPPORT_FLOAT 0
#else
/*
* Generic fallback
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#endif
/*
* Types that are (so far) the same on all platforms
*/
typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t;
/*
* Types that differ between LLP64 and LP64 architectures - in LLP64,
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
* to be the only LLP64 architecture in current use.
*/
#ifdef KHRONOS_USE_INTPTR_T
typedef intptr_t khronos_intptr_t;
typedef uintptr_t khronos_uintptr_t;
#elif defined(_WIN64)
typedef signed long long int khronos_intptr_t;
typedef unsigned long long int khronos_uintptr_t;
#else
typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t;
#endif
#if defined(_WIN64)
typedef signed long long int khronos_ssize_t;
typedef unsigned long long int khronos_usize_t;
#else
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
#endif
#if KHRONOS_SUPPORT_FLOAT
/*
* Float type
*/
typedef float khronos_float_t;
#endif
#if KHRONOS_SUPPORT_INT64
/* Time types
*
* These types can be used to represent a time interval in nanoseconds or
* an absolute Unadjusted System Time. Unadjusted System Time is the number
* of nanoseconds since some arbitrary system event (e.g. since the last
* time the system booted). The Unadjusted System Time is an unsigned
* 64 bit value that wraps back to 0 every 584 years. Time intervals
* may be either signed or unsigned.
*/
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
typedef khronos_int64_t khronos_stime_nanoseconds_t;
#endif
/*
* Dummy value used to pad enum types to 32 bits.
*/
#ifndef KHRONOS_MAX_ENUM
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
#endif
/*
* Enumerated boolean type
*
* Values other than zero should be considered to be true. Therefore
* comparisons should not be made against KHRONOS_TRUE.
*/
typedef enum {
KHRONOS_FALSE = 0,
KHRONOS_TRUE = 1,
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
} khronos_boolean_enum_t;
#endif /* __khrplatform_h_ */
================================================
FILE: shadertoy/third_party/glad/include/glad/glad.h
================================================
/*
OpenGL loader generated by glad 0.1.35 on Sat Jan 8 14:22:57 2022.
Language/Generator: C/C++
Specification: gl
APIs: gl=3.3
Profile: core
Extensions:
Loader: True
Local files: False
Omit khrplatform: False
Reproducible: False
Commandline:
--profile="core" --api="gl=3.3" --generator="c" --spec="gl" --extensions=""
Online:
https://glad.dav1d.de/#profile=core&language=c&specification=gl&loader=on&api=gl%3D3.3
*/
#ifndef __glad_h_
#define __glad_h_
#ifdef __gl_h_
#error OpenGL header already included, remove this include, glad already provides it
#endif
#define __gl_h_
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
#define APIENTRY __stdcall
#endif
#ifndef APIENTRY
#define APIENTRY
#endif
#ifndef APIENTRYP
#define APIENTRYP APIENTRY *
#endif
#ifndef GLAPIENTRY
#define GLAPIENTRY APIENTRY
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct gladGLversionStruct {
int major;
int minor;
};
typedef void* (* GLADloadproc)(const char *name);
#ifndef GLAPI
# if defined(GLAD_GLAPI_EXPORT)
# if defined(_WIN32) || defined(__CYGWIN__)
# if defined(GLAD_GLAPI_EXPORT_BUILD)
# if defined(__GNUC__)
# define GLAPI __attribute__ ((dllexport)) extern
# else
# define GLAPI __declspec(dllexport) extern
# endif
# else
# if defined(__GNUC__)
# define GLAPI __attribute__ ((dllimport)) extern
# else
# define GLAPI __declspec(dllimport) extern
# endif
# endif
# elif defined(__GNUC__) && defined(GLAD_GLAPI_EXPORT_BUILD)
# define GLAPI __attribute__ ((visibility ("default"))) extern
# else
# define GLAPI extern
# endif
# else
# define GLAPI extern
# endif
#endif
GLAPI struct gladGLversionStruct GLVersion;
GLAPI int gladLoadGL(void);
GLAPI int gladLoadGLLoader(GLADloadproc);
#include <KHR/khrplatform.h>
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
typedef void GLvoid;
typedef khronos_int8_t GLbyte;
typedef khronos_uint8_t GLubyte;
typedef khronos_int16_t GLshort;
typedef khronos_uint16_t GLushort;
typedef int GLint;
typedef unsigned int GLuint;
typedef khronos_int32_t GLclampx;
typedef int GLsizei;
typedef khronos_float_t GLfloat;
typedef khronos_float_t GLclampf;
typedef double GLdouble;
typedef double GLclampd;
typedef void *GLeglClientBufferEXT;
typedef void *GLeglImageOES;
typedef char GLchar;
typedef char GLcharARB;
#ifdef __APPLE__
typedef void *GLhandleARB;
#else
typedef unsigned int GLhandleARB;
#endif
typedef khronos_uint16_t GLhalf;
typedef khronos_uint16_t GLhalfARB;
typedef khronos_int32_t GLfixed;
typedef khronos_intptr_t GLintptr;
typedef khronos_intptr_t GLintptrARB;
typedef khronos_ssize_t GLsizeiptr;
typedef khronos_ssize_t GLsizeiptrARB;
typedef khronos_int64_t GLint64;
typedef khronos_int64_t GLint64EXT;
typedef khronos_uint64_t GLuint64;
typedef khronos_uint64_t GLuint64EXT;
typedef struct __GLsync *GLsync;
struct _cl_context;
struct _cl_event;
typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
typedef unsigned short GLhalfNV;
typedef GLintptr GLvdpauSurfaceNV;
typedef void (APIENTRY *GLVULKANPROCNV)(void);
#define GL_DEPTH_BUFFER_BIT 0x00000100
#define GL_STENCIL_BUFFER_BIT 0x00000400
#define GL_COLOR_BUFFER_BIT 0x00004000
#define GL_FALSE 0
#define GL_TRUE 1
#define GL_POINTS 0x0000
#define GL_LINES 0x0001
#define GL_LINE_LOOP 0x0002
#define GL_LINE_STRIP 0x0003
#define GL_TRIANGLES 0x0004
#define GL_TRIANGLE_STRIP 0x0005
#define GL_TRIANGLE_FAN 0x0006
#define GL_NEVER 0x0200
#define GL_LESS 0x0201
#define GL_EQUAL 0x0202
#define GL_LEQUAL 0x0203
#define GL_GREATER 0x0204
#define GL_NOTEQUAL 0x0205
#define GL_GEQUAL 0x0206
#define GL_ALWAYS 0x0207
#define GL_ZERO 0
#define GL_ONE 1
#define GL_SRC_COLOR 0x0300
#define GL_ONE_MINUS_SRC_COLOR 0x0301
#define GL_SRC_ALPHA 0x0302
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
#define GL_DST_ALPHA 0x0304
#define GL_ONE_MINUS_DST_ALPHA 0x0305
#define GL_DST_COLOR 0x0306
#define GL_ONE_MINUS_DST_COLOR 0x0307
#define GL_SRC_ALPHA_SATURATE 0x0308
#define GL_NONE 0
#define GL_FRONT_LEFT 0x0400
#define GL_FRONT_RIGHT 0x0401
#define GL_BACK_LEFT 0x0402
#define GL_BACK_RIGHT 0x0403
#define GL_FRONT 0x0404
#define GL_BACK 0x0405
#define GL_LEFT 0x0406
#define GL_RIGHT 0x0407
#define GL_FRONT_AND_BACK 0x0408
#define GL_NO_ERROR 0
#define GL_INVALID_ENUM 0x0500
#define GL_INVALID_VALUE 0x0501
#define GL_INVALID_OPERATION 0x0502
#define GL_OUT_OF_MEMORY 0x0505
#define GL_CW 0x0900
#define GL_CCW 0x0901
#define GL_POINT_SIZE 0x0B11
#define GL_POINT_SIZE_RANGE 0x0B12
#define GL_POINT_SIZE_GRANULARITY 0x0B13
#define GL_LINE_SMOOTH 0x0B20
#define GL_LINE_WIDTH 0x0B21
#define GL_LINE_WIDTH_RANGE 0x0B22
#define GL_LINE_WIDTH_GRANULARITY 0x0B23
#define GL_POLYGON_MODE 0x0B40
#define GL_POLYGON_SMOOTH 0x0B41
#define GL_CULL_FACE 0x0B44
#define GL_CULL_FACE_MODE 0x0B45
#define GL_FRONT_FACE 0x0B46
#define GL_DEPTH_RANGE 0x0B70
#define GL_DEPTH_TEST 0x0B71
#define GL_DEPTH_WRITEMASK 0x0B72
#define GL_DEPTH_CLEAR_VALUE 0x0B73
#define GL_DEPTH_FUNC 0x0B74
#define GL_STENCIL_TEST 0x0B90
#define GL_STENCIL_CLEAR_VALUE 0x0B91
#define GL_STENCIL_FUNC 0x0B92
#define GL_STENCIL_VALUE_MASK 0x0B93
#define GL_STENCIL_FAIL 0x0B94
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
#define GL_STENCIL_REF 0x0B97
#define GL_STENCIL_WRITEMASK 0x0B98
#define GL_VIEWPORT 0x0BA2
#define GL_DITHER 0x0BD0
#define GL_BLEND_DST 0x0BE0
#define GL_BLEND_SRC 0x0BE1
#define GL_BLEND 0x0BE2
#define GL_LOGIC_OP_MODE 0x0BF0
#define GL_DRAW_BUFFER 0x0C01
#define GL_READ_BUFFER 0x0C02
#define GL_SCISSOR_BOX 0x0C10
#define GL_SCISSOR_TEST 0x0C11
#define GL_COLOR_CLEAR_VALUE 0x0C22
#define GL_COLOR_WRITEMASK 0x0C23
#define GL_DOUBLEBUFFER 0x0C32
#define GL_STEREO 0x0C33
#define GL_LINE_SMOOTH_HINT 0x0C52
#define GL_POLYGON_SMOOTH_HINT 0x0C53
#define GL_UNPACK_SWAP_BYTES 0x0CF0
#define GL_UNPACK_LSB_FIRST 0x0CF1
#define GL_UNPACK_ROW_LENGTH 0x0CF2
#define GL_UNPACK_SKIP_ROWS 0x0CF3
#define GL_UNPACK_SKIP_PIXELS 0x0CF4
#define GL_UNPACK_ALIGNMENT 0x0CF5
#define GL_PACK_SWAP_BYTES 0x0D00
#define GL_PACK_LSB_FIRST 0x0D01
#define GL_PACK_ROW_LENGTH 0x0D02
#define GL_PACK_SKIP_ROWS 0x0D03
#define GL_PACK_SKIP_PIXELS 0x0D04
#define GL_PACK_ALIGNMENT 0x0D05
#define GL_MAX_TEXTURE_SIZE 0x0D33
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
#define GL_SUBPIXEL_BITS 0x0D50
#define GL_TEXTURE_1D 0x0DE0
#define GL_TEXTURE_2D 0x0DE1
#define GL_TEXTURE_WIDTH 0x1000
#define GL_TEXTURE_HEIGHT 0x1001
#define GL_TEXTURE_BORDER_COLOR 0x1004
#define GL_DONT_CARE 0x1100
#define GL_FASTEST 0x1101
#define GL_NICEST 0x1102
#define GL_BYTE 0x1400
#define GL_UNSIGNED_BYTE 0x1401
#define GL_SHORT 0x1402
#define GL_UNSIGNED_SHORT 0x1403
#define GL_INT 0x1404
#define GL_UNSIGNED_INT 0x1405
#define GL_FLOAT 0x1406
#define GL_CLEAR 0x1500
#define GL_AND 0x1501
#define GL_AND_REVERSE 0x1502
#define GL_COPY 0x1503
#define GL_AND_INVERTED 0x1504
#define GL_NOOP 0x1505
#define GL_XOR 0x1506
#define GL_OR 0x1507
#define GL_NOR 0x1508
#define GL_EQUIV 0x1509
#define GL_INVERT 0x150A
#define GL_OR_REVERSE 0x150B
#define GL_COPY_INVERTED 0x150C
#define GL_OR_INVERTED 0x150D
#define GL_NAND 0x150E
#define GL_SET 0x150F
#define GL_TEXTURE 0x1702
#define GL_COLOR 0x1800
#define GL_DEPTH 0x1801
#define GL_STENCIL 0x1802
#define GL_STENCIL_INDEX 0x1901
#define GL_DEPTH_COMPONENT 0x1902
#define GL_RED 0x1903
#define GL_GREEN 0x1904
#define GL_BLUE 0x1905
#define GL_ALPHA 0x1906
#define GL_RGB 0x1907
#define GL_RGBA 0x1908
#define GL_POINT 0x1B00
#define GL_LINE 0x1B01
#define GL_FILL 0x1B02
#define GL_KEEP 0x1E00
#define GL_REPLACE 0x1E01
#define GL_INCR 0x1E02
#define GL_DECR 0x1E03
#define GL_VENDOR 0x1F00
#define GL_RENDERER 0x1F01
#define GL_VERSION 0x1F02
#define GL_EXTENSIONS 0x1F03
#define GL_NEAREST 0x2600
#define GL_LINEAR 0x2601
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
#define GL_TEXTURE_MAG_FILTER 0x2800
#define GL_TEXTURE_MIN_FILTER 0x2801
#define GL_TEXTURE_WRAP_S 0x2802
#define GL_TEXTURE_WRAP_T 0x2803
#define GL_REPEAT 0x2901
#define GL_COLOR_LOGIC_OP 0x0BF2
#define GL_POLYGON_OFFSET_UNITS 0x2A00
#define GL_POLYGON_OFFSET_POINT 0x2A01
#define GL_POLYGON_OFFSET_LINE 0x2A02
#define GL_POLYGON_OFFSET_FILL 0x8037
#define GL_POLYGON_OFFSET_FACTOR 0x8038
#define GL_TEXTURE_BINDING_1D 0x8068
#define GL_TEXTURE_BINDING_2D 0x8069
#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
#define GL_TEXTURE_RED_SIZE 0x805C
#define GL_TEXTURE_GREEN_SIZE 0x805D
#define GL_TEXTURE_BLUE_SIZE 0x805E
#define GL_TEXTURE_ALPHA_SIZE 0x805F
#define GL_DOUBLE 0x140A
#define GL_PROXY_TEXTURE_1D 0x8063
#define GL_PROXY_TEXTURE_2D 0x8064
#define GL_R3_G3_B2 0x2A10
#define GL_RGB4 0x804F
#define GL_RGB5 0x8050
#define GL_RGB8 0x8051
#define GL_RGB10 0x8052
#define GL_RGB12 0x8053
#define GL_RGB16 0x8054
#define GL_RGBA2 0x8055
#define GL_RGBA4 0x8056
#define GL_RGB5_A1 0x8057
#define GL_RGBA8 0x8058
#define GL_RGB10_A2 0x8059
#define GL_RGBA12 0x805A
#define GL_RGBA16 0x805B
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
#define GL_UNSIGNED_INT_8_8_8_8 0x8035
#define GL_UNSIGNED_INT_10_10_10_2 0x8036
#define GL_TEXTURE_BINDING_3D 0x806A
#define GL_PACK_SKIP_IMAGES 0x806B
#define GL_PACK_IMAGE_HEIGHT 0x806C
#define GL_UNPACK_SKIP_IMAGES 0x806D
#define GL_UNPACK_IMAGE_HEIGHT 0x806E
#define GL_TEXTURE_3D 0x806F
#define GL_PROXY_TEXTURE_3D 0x8070
#define GL_TEXTURE_DEPTH 0x8071
#define GL_TEXTURE_WRAP_R 0x8072
#define GL_MAX_3D_TEXTURE_SIZE 0x8073
#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
#define GL_BGR 0x80E0
#define GL_BGRA 0x80E1
#define GL_MAX_ELEMENTS_VERTICES 0x80E8
#define GL_MAX_ELEMENTS_INDICES 0x80E9
#define GL_CLAMP_TO_EDGE 0x812F
#define GL_TEXTURE_MIN_LOD 0x813A
#define GL_TEXTURE_MAX_LOD 0x813B
#define GL_TEXTURE_BASE_LEVEL 0x813C
#define GL_TEXTURE_MAX_LEVEL 0x813D
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
#define GL_TEXTURE0 0x84C0
#define GL_TEXTURE1 0x84C1
#define GL_TEXTURE2 0x84C2
#define GL_TEXTURE3 0x84C3
#define GL_TEXTURE4 0x84C4
#define GL_TEXTURE5 0x84C5
#define GL_TEXTURE6 0x84C6
#define GL_TEXTURE7 0x84C7
#define GL_TEXTURE8 0x84C8
#define GL_TEXTURE9 0x84C9
#define GL_TEXTURE10 0x84CA
#define GL_TEXTURE11 0x84CB
#define GL_TEXTURE12 0x84CC
#define GL_TEXTURE13 0x84CD
#define GL_TEXTURE14 0x84CE
#define GL_TEXTURE15 0x84CF
#define GL_TEXTURE16 0x84D0
#define GL_TEXTURE17 0x84D1
#define GL_TEXTURE18 0x84D2
#define GL_TEXTURE19 0x84D3
#define GL_TEXTURE20 0x84D4
#define GL_TEXTURE21 0x84D5
#define GL_TEXTURE22 0x84D6
#define GL_TEXTURE23 0x84D7
#define GL_TEXTURE24 0x84D8
#define GL_TEXTURE25 0x84D9
#define GL_TEXTURE26 0x84DA
#define GL_TEXTURE27 0x84DB
#define GL_TEXTURE28 0x84DC
#define GL_TEXTURE29 0x84DD
#define GL_TEXTURE30 0x84DE
#define GL_TEXTURE31 0x84DF
#define GL_ACTIVE_TEXTURE 0x84E0
#define GL_MULTISAMPLE 0x809D
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
#define GL_SAMPLE_COVERAGE 0x80A0
#define GL_SAMPLE_BUFFERS 0x80A8
#define GL_SAMPLES 0x80A9
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
#define GL_TEXTURE_CUBE_MAP 0x8513
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
#define GL_COMPRESSED_RGB 0x84ED
#define GL_COMPRESSED_RGBA 0x84EE
#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
#define GL_TEXTURE_COMPRESSED 0x86A1
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
#define GL_CLAMP_TO_BORDER 0x812D
#define GL_BLEND_DST_RGB 0x80C8
#define GL_BLEND_SRC_RGB 0x80C9
#define GL_BLEND_DST_ALPHA 0x80CA
#define GL_BLEND_SRC_ALPHA 0x80CB
#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
#define GL_DEPTH_COMPONENT16 0x81A5
#define GL_DEPTH_COMPONENT24 0x81A6
#define GL_DEPTH_COMPONENT32 0x81A7
#define GL_MIRRORED_REPEAT 0x8370
#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
#define GL_TEXTURE_LOD_BIAS 0x8501
#define GL_INCR_WRAP 0x8507
#define GL_DECR_WRAP 0x8508
#define GL_TEXTURE_DEPTH_SIZE 0x884A
#define GL_TEXTURE_COMPARE_MODE 0x884C
#define GL_TEXTURE_COMPARE_FUNC 0x884D
#define GL_BLEND_COLOR 0x8005
#define GL_BLEND_EQUATION 0x8009
#define GL_CONSTANT_COLOR 0x8001
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
#define GL_CONSTANT_ALPHA 0x8003
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
#define GL_FUNC_ADD 0x8006
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
#define GL_FUNC_SUBTRACT 0x800A
#define GL_MIN 0x8007
#define GL_MAX 0x8008
#define GL_BUFFER_SIZE 0x8764
#define GL_BUFFER_USAGE 0x8765
#define GL_QUERY_COUNTER_BITS 0x8864
#define GL_CURRENT_QUERY 0x8865
#define GL_QUERY_RESULT 0x8866
#define GL_QUERY_RESULT_AVAILABLE 0x8867
#define GL_ARRAY_BUFFER 0x8892
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
#define GL_ARRAY_BUFFER_BINDING 0x8894
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
#define GL_READ_ONLY 0x88B8
#define GL_WRITE_ONLY 0x88B9
#define GL_READ_WRITE 0x88BA
#define GL_BUFFER_ACCESS 0x88BB
#define GL_BUFFER_MAPPED 0x88BC
#define GL_BUFFER_MAP_POINTER 0x88BD
#define GL_STREAM_DRAW 0x88E0
#define GL_STREAM_READ 0x88E1
#define GL_STREAM_COPY 0x88E2
#define GL_STATIC_DRAW 0x88E4
#define GL_STATIC_READ 0x88E5
#define GL_STATIC_COPY 0x88E6
#define GL_DYNAMIC_DRAW 0x88E8
#define GL_DYNAMIC_READ 0x88E9
#define GL_DYNAMIC_COPY 0x88EA
#define GL_SAMPLES_PASSED 0x8914
#define GL_SRC1_ALPHA 0x8589
#define GL_BLEND_EQUATION_RGB 0x8009
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
#define GL_STENCIL_BACK_FUNC 0x8800
#define GL_STENCIL_BACK_FAIL 0x8801
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
#define GL_MAX_DRAW_BUFFERS 0x8824
#define GL_DRAW_BUFFER0 0x8825
#define GL_DRAW_BUFFER1 0x8826
#define GL_DRAW_BUFFER2 0x8827
#define GL_DRAW_BUFFER3 0x8828
#define GL_DRAW_BUFFER4 0x8829
#define GL_DRAW_BUFFER5 0x882A
#define GL_DRAW_BUFFER6 0x882B
#define GL_DRAW_BUFFER7 0x882C
#define GL_DRAW_BUFFER8 0x882D
#define GL_DRAW_BUFFER9 0x882E
#define GL_DRAW_BUFFER10 0x882F
#define GL_DRAW_BUFFER11 0x8830
#define GL_DRAW_BUFFER12 0x8831
#define GL_DRAW_BUFFER13 0x8832
#define GL_DRAW_BUFFER14 0x8833
#define GL_DRAW_BUFFER15 0x8834
#define GL_BLEND_EQUATION_ALPHA 0x883D
#define GL_MAX_VERTEX_ATTRIBS 0x8869
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
#define GL_FRAGMENT_SHADER 0x8B30
#define GL_VERTEX_SHADER 0x8B31
#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
#define GL_MAX_VARYING_FLOATS 0x8B4B
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
#define GL_SHADER_TYPE 0x8B4F
#define GL_FLOAT_VEC2 0x8B50
#define GL_FLOAT_VEC3 0x8B51
#define GL_FLOAT_VEC4 0x8B52
#define GL_INT_VEC2 0x8B53
#define GL_INT_VEC3 0x8B54
#define GL_INT_VEC4 0x8B55
#define GL_BOOL 0x8B56
#define GL_BOOL_VEC2 0x8B57
#define GL_BOOL_VEC3 0x8B58
#define GL_BOOL_VEC4 0x8B59
#define GL_FLOAT_MAT2 0x8B5A
#define GL_FLOAT_MAT3 0x8B5B
#define GL_FLOAT_MAT4 0x8B5C
#define GL_SAMPLER_1D 0x8B5D
#define GL_SAMPLER_2D 0x8B5E
#define GL_SAMPLER_3D 0x8B5F
#define GL_SAMPLER_CUBE 0x8B60
#define GL_SAMPLER_1D_SHADOW 0x8B61
#define GL_SAMPLER_2D_SHADOW 0x8B62
#define GL_DELETE_STATUS 0x8B80
#define GL_COMPILE_STATUS 0x8B81
#define GL_LINK_STATUS 0x8B82
#define GL_VALIDATE_STATUS 0x8B83
#define GL_INFO_LOG_LENGTH 0x8B84
#define GL_ATTACHED_SHADERS 0x8B85
#define GL_ACTIVE_UNIFORMS 0x8B86
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
#define GL_SHADER_SOURCE_LENGTH 0x8B88
#define GL_ACTIVE_ATTRIBUTES 0x8B89
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
#define GL_CURRENT_PROGRAM 0x8B8D
#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
#define GL_LOWER_LEFT 0x8CA1
#define GL_UPPER_LEFT 0x8CA2
#define GL_STENCIL_BACK_REF 0x8CA3
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
#define GL_PIXEL_PACK_BUFFER 0x88EB
#define GL_PIXEL_UNPACK_BUFFER 0x88EC
#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
#define GL_FLOAT_MAT2x3 0x8B65
#define GL_FLOAT_MAT2x4 0x8B66
#define GL_FLOAT_MAT3x2 0x8B67
#define GL_FLOAT_MAT3x4 0x8B68
#define GL_FLOAT_MAT4x2 0x8B69
#define GL_FLOAT_MAT4x3 0x8B6A
#define GL_SRGB 0x8C40
#define GL_SRGB8 0x8C41
#define GL_SRGB_ALPHA 0x8C42
#define GL_SRGB8_ALPHA8 0x8C43
#define GL_COMPRESSED_SRGB 0x8C48
#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
#define GL_COMPARE_REF_TO_TEXTURE 0x884E
#define GL_CLIP_DISTANCE0 0x3000
#define GL_CLIP_DISTANCE1 0x3001
#define GL_CLIP_DISTANCE2 0x3002
#define GL_CLIP_DISTANCE3 0x3003
#define GL_CLIP_DISTANCE4 0x3004
#define GL_CLIP_DISTANCE5 0x3005
#define GL_CLIP_DISTANCE6 0x3006
#define GL_CLIP_DISTANCE7 0x3007
#define GL_MAX_CLIP_DISTANCES 0x0D32
#define GL_MAJOR_VERSION 0x821B
#define GL_MINOR_VERSION 0x821C
#define GL_NUM_EXTENSIONS 0x821D
#define GL_CONTEXT_FLAGS 0x821E
#define GL_COMPRESSED_RED 0x8225
#define GL_COMPRESSED_RG 0x8226
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
#define GL_RGBA32F 0x8814
#define GL_RGB32F 0x8815
#define GL_RGBA16F 0x881A
#define GL_RGB16F 0x881B
#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
#define GL_CLAMP_READ_COLOR 0x891C
#define GL_FIXED_ONLY 0x891D
#define GL_MAX_VARYING_COMPONENTS 0x8B4B
#define GL_TEXTURE_1D_ARRAY 0x8C18
#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
#define GL_TEXTURE_2D_ARRAY 0x8C1A
#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
#define GL_R11F_G11F_B10F 0x8C3A
#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
#define GL_RGB9_E5 0x8C3D
#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
#define GL_TEXTURE_SHARED_SIZE 0x8C3F
#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
#define GL_PRIMITIVES_GENERATED 0x8C87
#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
#define GL_RASTERIZER_DISCARD 0x8C89
#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
#define GL_INTERLEAVED_ATTRIBS 0x8C8C
#define GL_SEPARATE_ATTRIBS 0x8C8D
#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
#define GL_RGBA32UI 0x8D70
#define GL_RGB32UI 0x8D71
#define GL_RGBA16UI 0x8D76
#define GL_RGB16UI 0x8D77
#define GL_RGBA8UI 0x8D7C
#define GL_RGB8UI 0x8D7D
#define GL_RGBA32I 0x8D82
#define GL_RGB32I 0x8D83
#define GL_RGBA16I 0x8D88
#define GL_RGB16I 0x8D89
#define GL_RGBA8I 0x8D8E
#define GL_RGB8I 0x8D8F
#define GL_RED_INTEGER 0x8D94
#define GL_GREEN_INTEGER 0x8D95
#define GL_BLUE_INTEGER 0x8D96
#define GL_RGB_INTEGER 0x8D98
#define GL_RGBA_INTEGER 0x8D99
#define GL_BGR_INTEGER 0x8D9A
#define GL_BGRA_INTEGER 0x8D9B
#define GL_SAMPLER_1D_ARRAY 0x8DC0
#define GL_SAMPLER_2D_ARRAY 0x8DC1
#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
#define GL_UNSIGNED_INT_VEC2 0x8DC6
#define GL_UNSIGNED_INT_VEC3 0x8DC7
#define GL_UNSIGNED_INT_VEC4 0x8DC8
#define GL_INT_SAMPLER_1D 0x8DC9
#define GL_INT_SAMPLER_2D 0x8DCA
#define GL_INT_SAMPLER_3D 0x8DCB
#define GL_INT_SAMPLER_CUBE 0x8DCC
#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
#define GL_QUERY_WAIT 0x8E13
#define GL_QUERY_NO_WAIT 0x8E14
#define GL_QUERY_BY_REGION_WAIT 0x8E15
#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
#define GL_BUFFER_ACCESS_FLAGS 0x911F
#define GL_BUFFER_MAP_LENGTH 0x9120
#define GL_BUFFER_MAP_OFFSET 0x9121
#define GL_DEPTH_COMPONENT32F 0x8CAC
#define GL_DEPTH32F_STENCIL8 0x8CAD
#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
#define GL_FRAMEBUFFER_DEFAULT 0x8218
#define GL_FRAMEBUFFER_UNDEFINED 0x8219
#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
#define GL_DEPTH_STENCIL 0x84F9
#define GL_UNSIGNED_INT_24_8 0x84FA
#define GL_DEPTH24_STENCIL8 0x88F0
#define GL_TEXTURE_STENCIL_SIZE 0x88F1
#define GL_TEXTURE_RED_TYPE 0x8C10
#define GL_TEXTURE_GREEN_TYPE 0x8C11
#define GL_TEXTURE_BLUE_TYPE 0x8C12
#define GL_TEXTURE_ALPHA_TYPE 0x8C13
#define GL_TEXTURE_DEPTH_TYPE 0x8C16
#define GL_UNSIGNED_NORMALIZED 0x8C17
#define GL_FRAMEBUFFER_BINDING 0x8CA6
#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
#define GL_RENDERBUFFER_BINDING 0x8CA7
#define GL_READ_FRAMEBUFFER 0x8CA8
#define GL_DRAW_FRAMEBUFFER 0x8CA9
#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
#define GL_RENDERBUFFER_SAMPLES 0x8CAB
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
#define GL_COLOR_ATTACHMENT0 0x8CE0
#define GL_COLOR_ATTACHMENT1 0x8CE1
#define GL_COLOR_ATTACHMENT2 0x8CE2
#define GL_COLOR_ATTACHMENT3 0x8CE3
#define GL_COLOR_ATTACHMENT4 0x8CE4
#define GL_COLOR_ATTACHMENT5 0x8CE5
#define GL_COLOR_ATTACHMENT6 0x8CE6
#define GL_COLOR_ATTACHMENT7 0x8CE7
#define GL_COLOR_ATTACHMENT8 0x8CE8
#define GL_COLOR_ATTACHMENT9 0x8CE9
#define GL_COLOR_ATTACHMENT10 0x8CEA
#define GL_COLOR_ATTACHMENT11 0x8CEB
#define GL_COLOR_ATTACHMENT12 0x8CEC
#define GL_COLOR_ATTACHMENT13 0x8CED
#define GL_COLOR_ATTACHMENT14 0x8CEE
#define GL_COLOR_ATTACHMENT15 0x8CEF
#define GL_COLOR_ATTACHMENT16 0x8CF0
#define GL_COLOR_ATTACHMENT17 0x8CF1
#define GL_COLOR_ATTACHMENT18 0x8CF2
#define GL_COLOR_ATTACHMENT19 0x8CF3
#define GL_COLOR_ATTACHMENT20 0x8CF4
#define GL_COLOR_ATTACHMENT21 0x8CF5
#define GL_COLOR_ATTACHMENT22 0x8CF6
#define GL_COLOR_ATTACHMENT23 0x8CF7
#define GL_COLOR_ATTACHMENT24 0x8CF8
#define GL_COLOR_ATTACHMENT25 0x8CF9
#define GL_COLOR_ATTACHMENT26 0x8CFA
#define GL_COLOR_ATTACHMENT27 0x8CFB
#define GL_COLOR_ATTACHMENT28 0x8CFC
#define GL_COLOR_ATTACHMENT29 0x8CFD
#define GL_COLOR_ATTACHMENT30 0x8CFE
#define GL_COLOR_ATTACHMENT31 0x8CFF
#define GL_DEPTH_ATTACHMENT 0x8D00
#define GL_STENCIL_ATTACHMENT 0x8D20
#define GL_FRAMEBUFFER 0x8D40
#define GL_RENDERBUFFER 0x8D41
#define GL_RENDERBUFFER_WIDTH 0x8D42
#define GL_RENDERBUFFER_HEIGHT 0x8D43
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
#define GL_STENCIL_INDEX1 0x8D46
#define GL_STENCIL_INDEX4 0x8D47
#define GL_STENCIL_INDEX8 0x8D48
#define GL_STENCIL_INDEX16 0x8D49
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
#define GL_MAX_SAMPLES 0x8D57
#define GL_FRAMEBUFFER_SRGB 0x8DB9
#define GL_HALF_FLOAT 0x140B
#define GL_MAP_READ_BIT 0x0001
#define GL_MAP_WRITE_BIT 0x0002
#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
#define GL_COMPRESSED_RED_RGTC1 0x8DBB
#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
#define GL_COMPRESSED_RG_RGTC2 0x8DBD
#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
#define GL_RG 0x8227
#define GL_RG_INTEGER 0x8228
#define GL_R8 0x8229
#define GL_R16 0x822A
#define GL_RG8 0x822B
#define GL_RG16 0x822C
#define GL_R16F 0x822D
#define GL_R32F 0x822E
#define GL_RG16F 0x822F
#define GL_RG32F 0x8230
#define GL_R8I 0x8231
#define GL_R8UI 0x8232
#define GL_R16I 0x8233
#define GL_R16UI 0x8234
#define GL_R32I 0x8235
#define GL_R32UI 0x8236
#define GL_RG8I 0x8237
#define GL_RG8UI 0x8238
#define GL_RG16I 0x8239
#define GL_RG16UI 0x823A
#define GL_RG32I 0x823B
#define GL_RG32UI 0x823C
#define GL_VERTEX_ARRAY_BINDING 0x85B5
#define GL_SAMPLER_2D_RECT 0x8B63
#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
#define GL_SAMPLER_BUFFER 0x8DC2
#define GL_INT_SAMPLER_2D_RECT 0x8DCD
#define GL_INT_SAMPLER_BUFFER 0x8DD0
#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
#define GL_TEXTURE_BUFFER 0x8C2A
#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
#define GL_TEXTURE_RECTANGLE 0x84F5
#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
#define GL_R8_SNORM 0x8F94
#define GL_RG8_SNORM 0x8F95
#define GL_RGB8_SNORM 0x8F96
#define GL_RGBA8_SNORM 0x8F97
#define GL_R16_SNORM 0x8F98
#define GL_RG16_SNORM 0x8F99
#define GL_RGB16_SNORM 0x8F9A
#define GL_RGBA16_SNORM 0x8F9B
#define GL_SIGNED_NORMALIZED 0x8F9C
#define GL_PRIMITIVE_RESTART 0x8F9D
#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
#define GL_COPY_READ_BUFFER 0x8F36
#define GL_COPY_WRITE_BUFFER 0x8F37
#define GL_UNIFORM_BUFFER 0x8A11
#define GL_UNIFORM_BUFFER_BINDING 0x8A28
#define GL_UNIFORM_BUFFER_START 0x8A29
#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
#define GL_UNIFORM_TYPE 0x8A37
#define GL_UNIFORM_SIZE 0x8A38
#define GL_UNIFORM_NAME_LENGTH 0x8A39
#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
#define GL_UNIFORM_OFFSET 0x8A3B
#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
#define GL_INVALID_INDEX 0xFFFFFFFF
#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
#define GL_LINES_ADJACENCY 0x000A
#define GL_LINE_STRIP_ADJACENCY 0x000B
#define GL_TRIANGLES_ADJACENCY 0x000C
#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
#define GL_PROGRAM_POINT_SIZE 0x8642
#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
#define GL_GEOMETRY_SHADER 0x8DD9
#define GL_GEOMETRY_VERTICES_OUT 0x8916
#define GL_GEOMETRY_INPUT_TYPE 0x8917
#define GL_GEOMETRY_OUTPUT_TYPE 0x8918
#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
#define GL_CONTEXT_PROFILE_MASK 0x9126
#define GL_DEPTH_CLAMP 0x864F
#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
#define GL_FIRST_VERTEX_CONVENTION 0x8E4D
#define GL_LAST_VERTEX_CONVENTION 0x8E4E
#define GL_PROVOKING_VERTEX 0x8E4F
#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
#define GL_OBJECT_TYPE 0x9112
#define GL_SYNC_CONDITION 0x9113
#define GL_SYNC_STATUS 0x9114
#define GL_SYNC_FLAGS 0x9115
#define GL_SYNC_FENCE 0x9116
#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
#define GL_UNSIGNALED 0x9118
#define GL_SIGNALED 0x9119
#define GL_ALREADY_SIGNALED 0x911A
#define GL_TIMEOUT_EXPIRED 0x911B
#define GL_CONDITION_SATISFIED 0x911C
#define GL_WAIT_FAILED 0x911D
#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF
#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
#define GL_SAMPLE_POSITION 0x8E50
#define GL_SAMPLE_MASK 0x8E51
#define GL_SAMPLE_MASK_VALUE 0x8E52
#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
#define GL_TEXTURE_SAMPLES 0x9106
#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
#define GL_MAX_INTEGER_SAMPLES 0x9110
#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
#define GL_SRC1_COLOR 0x88F9
#define GL_ONE_MINUS_SRC1_COLOR 0x88FA
#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
#define GL_ANY_SAMPLES_PASSED 0x8C2F
#define GL_SAMPLER_BINDING 0x8919
#define GL_RGB10_A2UI 0x906F
#define GL_TEXTURE_SWIZZLE_R 0x8E42
#define GL_TEXTURE_SWIZZLE_G 0x8E43
#define GL_TEXTURE_SWIZZLE_B 0x8E44
#define GL_TEXTURE_SWIZZLE_A 0x8E45
#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46
#define GL_TIME_ELAPSED 0x88BF
#define GL_TIMESTAMP 0x8E28
#define GL_INT_2_10_10_10_REV 0x8D9F
#ifndef GL_VERSION_1_0
#define GL_VERSION_1_0 1
GLAPI int GLAD_GL_VERSION_1_0;
typedef void (APIENTRYP PFNGLCULLFACEPROC)(GLenum mode);
GLAPI PFNGLCULLFACEPROC glad_glCullFace;
#define glCullFace glad_glCullFace
typedef void (APIENTRYP PFNGLFRONTFACEPROC)(GLenum mode);
GLAPI PFNGLFRONTFACEPROC glad_glFrontFace;
#define glFrontFace glad_glFrontFace
typedef void (APIENTRYP PFNGLHINTPROC)(GLenum target, GLenum mode);
GLAPI PFNGLHINTPROC glad_glHint;
#define glHint glad_glHint
typedef void (APIENTRYP PFNGLLINEWIDTHPROC)(GLfloat width);
GLAPI PFNGLLINEWIDTHPROC glad_glLineWidth;
#define glLineWidth glad_glLineWidth
typedef void (APIENTRYP PFNGLPOINTSIZEPROC)(GLfloat size);
GLAPI PFNGLPOINTSIZEPROC glad_glPointSize;
#define glPointSize glad_glPointSize
typedef void (APIENTRYP PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode);
GLAPI PFNGLPOLYGONMODEPROC glad_glPolygonMode;
#define glPolygonMode glad_glPolygonMode
typedef void (APIENTRYP PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
GLAPI PFNGLSCISSORPROC glad_glScissor;
#define glScissor glad_glScissor
typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param);
GLAPI PFNGLTEXPARAMETERFPROC glad_glTexParameterf;
#define glTexParameterf glad_glTexParameterf
typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat *params);
GLAPI PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv;
#define glTexParameterfv glad_glTexParameterfv
typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
GLAPI PFNGLTEXPARAMETERIPROC glad_glTexParameteri;
#define glTexParameteri glad_glTexParameteri
typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint *params);
GLAPI PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv;
#define glTexParameteriv glad_glTexParameteriv
typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
GLAPI PFNGLTEXIMAGE1DPROC glad_glTexImage1D;
#define glTexImage1D glad_glTexImage1D
typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
GLAPI PFNGLTEXIMAGE2DPROC glad_glTexImage2D;
#define glTexImage2D glad_glTexImage2D
typedef void (APIENTRYP PFNGLDRAWBUFFERPROC)(GLenum buf);
GLAPI PFNGLDRAWBUFFERPROC glad_glDrawBuffer;
#define glDrawBuffer glad_glDrawBuffer
typedef void (APIENTRYP PFNGLCLEARPROC)(GLbitfield mask);
GLAPI PFNGLCLEARPROC glad_glClear;
#define glClear glad_glClear
typedef void (APIENTRYP PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
GLAPI PFNGLCLEARCOLORPROC glad_glClearColor;
#define glClearColor glad_glClearColor
typedef void (APIENTRYP PFNGLCLEARSTENCILPROC)(GLint s);
GLAPI PFNGLCLEARSTENCILPROC glad_glClearStencil;
#define glClearStencil glad_glClearStencil
typedef void (APIENTRYP PFNGLCLEARDEPTHPROC)(GLdouble depth);
GLAPI PFNGLCLEARDEPTHPROC glad_glClearDepth;
#define glClearDepth glad_glClearDepth
typedef void (APIENTRYP PFNGLSTENCILMASKPROC)(GLuint mask);
GLAPI PFNGLSTENCILMASKPROC glad_glStencilMask;
#define glStencilMask glad_glStencilMask
typedef void (APIENTRYP PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
GLAPI PFNGLCOLORMASKPROC glad_glColorMask;
#define glColorMask glad_glColorMask
typedef void (APIENTRYP PFNGLDEPTHMASKPROC)(GLboolean flag);
GLAPI PFNGLDEPTHMASKPROC glad_glDepthMask;
#define glDepthMask glad_glDepthMask
typedef void (APIENTRYP PFNGLDISABLEPROC)(GLenum cap);
GLAPI PFNGLDISABLEPROC glad_glDisable;
#define glDisable glad_glDisable
typedef void (APIENTRYP PFNGLENABLEPROC)(GLenum cap);
GLAPI PFNGLENABLEPROC glad_glEnable;
#define glEnable glad_glEnable
typedef void (APIENTRYP PFNGLFINISHPROC)(void);
GLAPI PFNGLFINISHPROC glad_glFinish;
#define glFinish glad_glFinish
typedef void (APIENTRYP PFNGLFLUSHPROC)(void);
GLAPI PFNGLFLUSHPROC glad_glFlush;
#define glFlush glad_glFlush
typedef void (APIENTRYP PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor);
GLAPI PFNGLBLENDFUNCPROC glad_glBlendFunc;
#define glBlendFunc glad_glBlendFunc
typedef void (APIENTRYP PFNGLLOGICOPPROC)(GLenum opcode);
GLAPI PFNGLLOGICOPPROC glad_glLogicOp;
#define glLogicOp glad_glLogicOp
typedef void (APIENTRYP PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask);
GLAPI PFNGLSTENCILFUNCPROC glad_glStencilFunc;
#define glStencilFunc glad_glStencilFunc
typedef void (APIENTRYP PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass);
GLAPI PFNGLSTENCILOPPROC glad_glStencilOp;
#define glStencilOp glad_glStencilOp
typedef void (APIENTRYP PFNGLDEPTHFUNCPROC)(GLenum func);
GLAPI PFNGLDEPTHFUNCPROC glad_glDepthFunc;
#define glDepthFunc glad_glDepthFunc
typedef void (APIENTRYP PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param);
GLAPI PFNGLPIXELSTOREFPROC glad_glPixelStoref;
#define glPixelStoref glad_glPixelStoref
typedef void (APIENTRYP PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param);
GLAPI PFNGLPIXELSTOREIPROC glad_glPixelStorei;
#define glPixelStorei glad_glPixelStorei
typedef void (APIENTRYP PFNGLREADBUFFERPROC)(GLenum src);
GLAPI PFNGLREADBUFFERPROC glad_glReadBuffer;
#define glReadBuffer glad_glReadBuffer
typedef void (APIENTRYP PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
GLAPI PFNGLREADPIXELSPROC glad_glReadPixels;
#define glReadPixels glad_glReadPixels
typedef void (APIENTRYP PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean *data);
GLAPI PFNGLGETBOOLEANVPROC glad_glGetBooleanv;
#define glGetBooleanv glad_glGetBooleanv
typedef void (APIENTRYP PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data);
GLAPI PFNGLGETDOUBLEVPROC glad_glGetDoublev;
#define glGetDoublev glad_glGetDoublev
typedef GLenum (APIENTRYP PFNGLGETERRORPROC)(void);
GLAPI PFNGLGETERRORPROC glad_glGetError;
#define glGetError glad_glGetError
typedef void (APIENTRYP PFNGLGETFLOATVPROC)(GLenum pname, GLfloat *data);
GLAPI PFNGLGETFLOATVPROC glad_glGetFloatv;
#define glGetFloatv glad_glGetFloatv
typedef void (APIENTRYP PFNGLGETINTEGERVPROC)(GLenum pname, GLint *data);
GLAPI PFNGLGETINTEGERVPROC glad_glGetIntegerv;
#define glGetIntegerv glad_glGetIntegerv
typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC)(GLenum name);
GLAPI PFNGLGETSTRINGPROC glad_glGetString;
#define glGetString glad_glGetString
typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
GLAPI PFNGLGETTEXIMAGEPROC glad_glGetTexImage;
#define glGetTexImage glad_glGetTexImage
typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat *params);
GLAPI PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv;
#define glGetTexParameterfv glad_glGetTexParameterfv
typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params);
GLAPI PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv;
#define glGetTexParameteriv glad_glGetTexParameteriv
typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat *params);
GLAPI PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv;
#define glGetTexLevelParameterfv glad_glGetTexLevelParameterfv
typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint *params);
GLAPI PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv;
#define glGetTexLevelParameteriv glad_glGetTexLevelParameteriv
typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC)(GLenum cap);
GLAPI PFNGLISENABLEDPROC glad_glIsEnabled;
#define glIsEnabled glad_glIsEnabled
typedef void (APIENTRYP PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f);
GLAPI PFNGLDEPTHRANGEPROC glad_glDepthRange;
#define glDepthRange glad_glDepthRange
typedef void (APIENTRYP PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
GLAPI PFNGLVIEWPORTPROC glad_glViewport;
#define glViewport glad_glViewport
#endif
#ifndef GL_VERSION_1_1
#define GL_VERSION_1_1 1
GLAPI int GLAD_GL_VERSION_1_1;
typedef void (APIENTRYP PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count);
GLAPI PFNGLDRAWARRAYSPROC glad_glDrawArrays;
#define glDrawArrays glad_glDrawArrays
typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices);
GLAPI PFNGLDRAWELEMENTSPROC glad_glDrawElements;
#define glDrawElements glad_glDrawElements
typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units);
GLAPI PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset;
#define glPolygonOffset glad_glPolygonOffset
typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
GLAPI PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D;
#define glCopyTexImage1D glad_glCopyTexImage1D
typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
GLAPI PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D;
#define glCopyTexImage2D glad_glCopyTexImage2D
typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
GLAPI PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D;
#define glCopyTexSubImage1D glad_glCopyTexSubImage1D
typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
GLAPI PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D;
#define glCopyTexSubImage2D glad_glCopyTexSubImage2D
typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
GLAPI PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D;
#define glTexSubImage1D glad_glTexSubImage1D
typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
GLAPI PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D;
#define glTexSubImage2D glad_glTexSubImage2D
typedef void (APIENTRYP PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture);
GLAPI PFNGLBINDTEXTUREPROC glad_glBindTexture;
#define glBindTexture glad_glBindTexture
typedef void (APIENTRYP PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint *textures);
GLAPI PFNGLDELETETEXTURESPROC glad_glDeleteTextures;
#define glDeleteTextures glad_glDeleteTextures
typedef void (APIENTRYP PFNGLGENTEXTURESPROC)(GLsizei n, GLuint *textures);
GLAPI PFNGLGENTEXTURESPROC glad_glGenTextures;
#define glGenTextures glad_glGenTextures
typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC)(GLuint texture);
GLAPI PFNGLISTEXTUREPROC glad_glIsTexture;
#define glIsTexture glad_glIsTexture
#endif
#ifndef GL_VERSION_1_2
#define GL_VERSION_1_2 1
GLAPI int GLAD_GL_VERSION_1_2;
typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
GLAPI PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements;
#define glDrawRangeElements glad_glDrawRangeElements
typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
GLAPI PFNGLTEXIMAGE3DPROC glad_glTexImage3D;
#define glTexImage3D glad_glTexImage3D
typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
GLAPI PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D;
#define glTexSubImage3D glad_glTexSubImage3D
typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
GLAPI PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D;
#define glCopyTexSubImage3D glad_glCopyTexSubImage3D
#endif
#ifndef GL_VERSION_1_3
#define GL_VERSION_1_3 1
GLAPI int GLAD_GL_VERSION_1_3;
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture);
GLAPI PFNGLACTIVETEXTUREPROC glad_glActiveTexture;
#define glActiveTexture glad_glActiveTexture
typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert);
GLAPI PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage;
#define glSampleCoverage glad_glSampleCoverage
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
GLAPI PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D;
#define glCompressedTexImage3D glad_glCompressedTexImage3D
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
GLAPI PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D;
#define glCompressedTexImage2D glad_glCompressedTexImage2D
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
GLAPI PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D;
#define glCompressedTexImage1D glad_glCompressedTexImage1D
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D;
#define glCompressedTexSubImage3D glad_glCompressedTexSubImage3D
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D;
#define glCompressedTexSubImage2D glad_glCompressedTexSubImage2D
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D;
#define glCompressedTexSubImage1D glad_glCompressedTexSubImage1D
typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void *img);
GLAPI PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage;
#define glGetCompressedTexImage glad_glGetCompressedTexImage
#endif
#ifndef GL_VERSION_1_4
#define GL_VERSION_1_4 1
GLAPI int GLAD_GL_VERSION_1_4;
typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
GLAPI PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate;
#define glBlendFuncSeparate glad_glBlendFuncSeparate
typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
GLAPI PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays;
#define glMultiDrawArrays glad_glMultiDrawArrays
typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
GLAPI PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements;
#define glMultiDrawElements glad_glMultiDrawElements
typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param);
GLAPI PFNGLPOINTPARAMETERFPROC glad_glPointParameterf;
#define glPointParameterf glad_glPointParameterf
typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat *params);
GLAPI PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv;
#define glPointParameterfv glad_glPointParameterfv
typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param);
GLAPI PFNGLPOINTPARAMETERIPROC glad_glPointParameteri;
#define glPointParameteri glad_glPointParameteri
typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint *params);
GLAPI PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv;
#define glPointParameteriv glad_glPointParameteriv
typedef void (APIENTRYP PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
GLAPI PFNGLBLENDCOLORPROC glad_glBlendColor;
#define glBlendColor glad_glBlendColor
typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC)(GLenum mode);
GLAPI PFNGLBLENDEQUATIONPROC glad_glBlendEquation;
#define glBlendEquation glad_glBlendEquation
#endif
#ifndef GL_VERSION_1_5
#define GL_VERSION_1_5 1
GLAPI int GLAD_GL_VERSION_1_5;
typedef void (APIENTRYP PFNGLGENQUERIESPROC)(GLsizei n, GLuint *ids);
GLAPI PFNGLGENQUERIESPROC glad_glGenQueries;
#define glGenQueries glad_glGenQueries
typedef void (APIENTRYP PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint *ids);
GLAPI PFNGLDELETEQUERIESPROC glad_glDeleteQueries;
#define glDeleteQueries glad_glDeleteQueries
typedef GLboolean (APIENTRYP PFNGLISQUERYPROC)(GLuint id);
GLAPI PFNGLISQUERYPROC glad_glIsQuery;
#define glIsQuery glad_glIsQuery
typedef void (APIENTRYP PFNGLBEGINQUERYPROC)(GLenum target, GLuint id);
GLAPI PFNGLBEGINQUERYPROC glad_glBeginQuery;
#define glBeginQuery glad_glBeginQuery
typedef void (APIENTRYP PFNGLENDQUERYPROC)(GLenum target);
GLAPI PFNGLENDQUERYPROC glad_glEndQuery;
#define glEndQuery glad_glEndQuery
typedef void (APIENTRYP PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint *params);
GLAPI PFNGLGETQUERYIVPROC glad_glGetQueryiv;
#define glGetQueryiv glad_glGetQueryiv
typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint *params);
GLAPI PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv;
#define glGetQueryObjectiv glad_glGetQueryObjectiv
typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint *params);
GLAPI PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv;
#define glGetQueryObjectuiv glad_glGetQueryObjectuiv
typedef void (APIENTRYP PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer);
GLAPI PFNGLBINDBUFFERPROC glad_glBindBuffer;
#define glBindBuffer glad_glBindBuffer
typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint *buffers);
GLAPI PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers;
#define glDeleteBuffers glad_glDeleteBuffers
typedef void (APIENTRYP PFNGLGENBUFFERSPROC)(GLsizei n, GLuint *buffers);
GLAPI PFNGLGENBUFFERSPROC glad_glGenBuffers;
#define glGenBuffers glad_glGenBuffers
typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC)(GLuint buffer);
GLAPI PFNGLISBUFFERPROC glad_glIsBuffer;
#define glIsBuffer glad_glIsBuffer
typedef void (APIENTRYP PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void *data, GLenum usage);
GLAPI PFNGLBUFFERDATAPROC glad_glBufferData;
#define glBufferData glad_glBufferData
typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
GLAPI PFNGLBUFFERSUBDATAPROC glad_glBufferSubData;
#define glBufferSubData glad_glBufferSubData
typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, void *data);
GLAPI PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData;
#define glGetBufferSubData glad_glGetBufferSubData
typedef void * (APIENTRYP PFNGLMAPBUFFERPROC)(GLenum target, GLenum access);
GLAPI PFNGLMAPBUFFERPROC glad_glMapBuffer;
#define glMapBuffer glad_glMapBuffer
typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC)(GLenum target);
GLAPI PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer;
#define glUnmapBuffer glad_glUnmapBuffer
typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params);
GLAPI PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv;
#define glGetBufferParameteriv glad_glGetBufferParameteriv
typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void **params);
GLAPI PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv;
#define glGetBufferPointerv glad_glGetBufferPointerv
#endif
#ifndef GL_VERSION_2_0
#define GL_VERSION_2_0 1
GLAPI int GLAD_GL_VERSION_2_0;
typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha);
GLAPI PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate;
#define glBlendEquationSeparate glad_glBlendEquationSeparate
typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum *bufs);
GLAPI PFNGLDRAWBUFFERSPROC glad_glDrawBuffers;
#define glDrawBuffers glad_glDrawBuffers
typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
GLAPI PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate;
#define glStencilOpSeparate glad_glStencilOpSeparate
typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask);
GLAPI PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate;
#define glStencilFuncSeparate glad_glStencilFuncSeparate
typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask);
GLAPI PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate;
#define glStencilMaskSeparate glad_glStencilMaskSeparate
typedef void (APIENTRYP PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader);
GLAPI PFNGLATTACHSHADERPROC glad_glAttachShader;
#define glAttachShader glad_glAttachShader
typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, const GLchar *name);
GLAPI PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation;
#define glBindAttribLocation glad_glBindAttribLocation
typedef void (APIENTRYP PFNGLCOMPILESHADERPROC)(GLuint shader);
GLAPI PFNGLCOMPILESHADERPROC glad_glCompileShader;
#define glCompileShader glad_glCompileShader
typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC)(void);
GLAPI PFNGLCREATEPROGRAMPROC glad_glCreateProgram;
#define glCreateProgram glad_glCreateProgram
typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC)(GLenum type);
GLAPI PFNGLCREATESHADERPROC glad_glCreateShader;
#define glCreateShader glad_glCreateShader
typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC)(GLuint program);
GLAPI PFNGLDELETEPROGRAMPROC glad_glDeleteProgram;
#define glDeleteProgram glad_glDeleteProgram
typedef void (APIENTRYP PFNGLDELETESHADERPROC)(GLuint shader);
GLAPI PFNGLDELETESHADERPROC glad_glDeleteShader;
#define glDeleteShader glad_glDeleteShader
typedef void (APIENTRYP PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader);
GLAPI PFNGLDETACHSHADERPROC glad_glDetachShader;
#define glDetachShader glad_glDetachShader
typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index);
GLAPI PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray;
#define glDisableVertexAttribArray glad_glDisableVertexAttribArray
typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index);
GLAPI PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray;
#define glEnableVertexAttribArray glad_glEnableVertexAttribArray
typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
GLAPI PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib;
#define glGetActiveAttrib glad_glGetActiveAttrib
typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
GLAPI PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform;
#define glGetActiveUniform glad_glGetActiveUniform
typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
GLAPI PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders;
#define glGetAttachedShaders glad_glGetAttachedShaders
typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar *name);
GLAPI PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation;
#define glGetAttribLocation glad_glGetAttribLocation
typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint *params);
GLAPI PFNGLGETPROGRAMIVPROC glad_glGetProgramiv;
#define glGetProgramiv glad_glGetProgramiv
typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
GLAPI PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog;
#define glGetProgramInfoLog glad_glGetProgramInfoLog
typedef void (APIENTRYP PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint *params);
GLAPI PFNGLGETSHADERIVPROC glad_glGetShaderiv;
#define glGetShaderiv glad_glGetShaderiv
typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
GLAPI PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog;
#define glGetShaderInfoLog glad_glGetShaderInfoLog
typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
GLAPI PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource;
#define glGetShaderSource glad_glGetShaderSource
typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar *name);
GLAPI PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation;
#define glGetUniformLocation glad_glGetUniformLocation
typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat *params);
GLAPI PFNGLGETUNIFORMFVPROC glad_glGetUniformfv;
#define glGetUniformfv glad_glGetUniformfv
typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint *params);
GLAPI PFNGLGETUNIFORMIVPROC glad_glGetUniformiv;
#define glGetUniformiv glad_glGetUniformiv
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC)(GLui
gitextract_k9sxd0lm/
├── .clang-tidy
├── .gitattributes
├── .github/
│ └── workflows/
│ ├── cmake_linux.yml
│ ├── cmake_macos.yml
│ └── cmake_windows.yml
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── LICENSE
├── OPCODE_CORE.md
├── OPCODE_EXT.md
├── README.md
├── example/
│ ├── CMakeLists.txt
│ ├── main.cpp
│ └── shaders/
│ ├── simple.frag
│ ├── simple.frag.spv
│ └── simple.frag.spv.txt
├── shadertoy/
│ ├── CMakeLists.txt
│ ├── assets/
│ │ ├── shaders/
│ │ │ ├── Nt3BzM.frag
│ │ │ ├── XdlSDs.frag
│ │ │ ├── basic.frag
│ │ │ ├── fstyD4.frag
│ │ │ └── ftdfWn.frag
│ │ └── wrapper.frag
│ ├── compiler.cpp
│ ├── compiler.h
│ ├── main.cpp
│ ├── renderer.cpp
│ ├── renderer.h
│ ├── resourcelimits.cpp
│ ├── resourcelimits.h
│ ├── settingpanel.cpp
│ ├── settingpanel.h
│ ├── settings.h
│ ├── third_party/
│ │ ├── glad/
│ │ │ ├── include/
│ │ │ │ ├── KHR/
│ │ │ │ │ └── khrplatform.h
│ │ │ │ └── glad/
│ │ │ │ └── glad.h
│ │ │ └── src/
│ │ │ └── glad.c
│ │ ├── glfw/
│ │ │ ├── include/
│ │ │ │ └── GLFW/
│ │ │ │ ├── glfw3.h
│ │ │ │ └── glfw3native.h
│ │ │ ├── lib-macos-universal/
│ │ │ │ └── libglfw3.a
│ │ │ ├── lib-mingw-w64/
│ │ │ │ ├── libglfw3.a
│ │ │ │ └── libglfw3dll.a
│ │ │ └── lib-vc2022/
│ │ │ ├── glfw3.lib
│ │ │ ├── glfw3_mt.lib
│ │ │ └── glfw3dll.lib
│ │ ├── imgui/
│ │ │ └── imgui/
│ │ │ ├── imconfig.h
│ │ │ ├── imgui.cpp
│ │ │ ├── imgui.h
│ │ │ ├── imgui_demo.cpp
│ │ │ ├── imgui_draw.cpp
│ │ │ ├── imgui_impl_glfw.cpp
│ │ │ ├── imgui_impl_glfw.h
│ │ │ ├── imgui_impl_opengl3.cpp
│ │ │ ├── imgui_impl_opengl3.h
│ │ │ ├── imgui_impl_opengl3_loader.h
│ │ │ ├── imgui_internal.h
│ │ │ ├── imgui_tables.cpp
│ │ │ ├── imgui_widgets.cpp
│ │ │ ├── imstb_rectpack.h
│ │ │ ├── imstb_textedit.h
│ │ │ └── imstb_truetype.h
│ │ └── stb/
│ │ └── include/
│ │ └── stb/
│ │ ├── stb_image.h
│ │ └── stb_image_write.h
│ ├── threadpool.h
│ ├── timer.cpp
│ └── timer.h
├── src/
│ ├── CMakeLists.txt
│ ├── decoder.cpp
│ ├── decoder.h
│ ├── ext/
│ │ ├── GLSL.std.450.h
│ │ └── GLSL.std.450.inc
│ ├── image.cpp
│ ├── image.h
│ ├── interface.cpp
│ ├── interface.h
│ ├── logger.cpp
│ ├── logger.h
│ ├── module.cpp
│ ├── module.h
│ ├── opcodes.inc
│ ├── opstrings.h
│ ├── runtime.cpp
│ ├── runtime.h
│ ├── spirv.h
│ ├── spvm.cpp
│ ├── spvm.h
│ └── utils.h
└── test/
├── CMakeLists.txt
├── assets/
│ ├── arithmetic_0.frag
│ ├── arithmetic_0.frag.spv
│ ├── arithmetic_0.frag.spv.txt
│ ├── arithmetic_1.frag
│ ├── arithmetic_1.frag.spv
│ ├── arithmetic_1.frag.spv.txt
│ ├── array.frag
│ ├── array.frag.spv
│ ├── array.frag.spv.txt
│ ├── assert.glsl
│ ├── bit.frag
│ ├── bit.frag.spv
│ ├── bit.frag.spv.txt
│ ├── built_in.vert
│ ├── built_in.vert.spv
│ ├── built_in.vert.spv.txt
│ ├── composite.frag
│ ├── composite.frag.spv
│ ├── composite.frag.spv.txt
│ ├── control_flow.frag
│ ├── control_flow.frag.spv
│ ├── control_flow.frag.spv.txt
│ ├── conversion.frag
│ ├── conversion.frag.spv
│ ├── conversion.frag.spv.txt
│ ├── derivative.frag
│ ├── derivative.frag.spv
│ ├── derivative.frag.spv.txt
│ ├── function.frag
│ ├── function.frag.spv
│ ├── function.frag.spv.txt
│ ├── glsl_std_450_0.frag
│ ├── glsl_std_450_0.frag.spv
│ ├── glsl_std_450_0.frag.spv.txt
│ ├── glsl_std_450_1.frag
│ ├── glsl_std_450_1.frag.spv
│ ├── glsl_std_450_1.frag.spv.txt
│ ├── glsl_std_450_2.frag
│ ├── glsl_std_450_2.frag.spv
│ ├── glsl_std_450_2.frag.spv.txt
│ ├── image.frag
│ ├── image.frag.spv
│ ├── image.frag.spv.txt
│ ├── location.frag
│ ├── location.frag.spv
│ ├── location.frag.spv.txt
│ ├── relational_logical.frag
│ ├── relational_logical.frag.spv
│ ├── relational_logical.frag.spv.txt
│ ├── uniform_block.vert
│ ├── uniform_block.vert.spv
│ └── uniform_block.vert.spv.txt
├── main.cpp
├── test.h
├── test_core.cpp
├── test_ext.cpp
├── test_image.cpp
└── tools/
└── glsl.py
SYMBOL INDEX (1574 symbols across 57 files)
FILE: example/main.cpp
function main (line 15) | int main(int argc, char *argv[]) {
FILE: shadertoy/compiler.cpp
type SPVM (line 13) | namespace SPVM {
type ShaderToy (line 14) | namespace ShaderToy {
function compileShaderInternal (line 16) | static std::vector<uint32_t> compileShaderInternal(glslang_stage_t s...
FILE: shadertoy/compiler.h
function namespace (line 12) | namespace SPVM {
FILE: shadertoy/main.cpp
function checkCompileErrors (line 60) | void checkCompileErrors(GLuint shader, const std::string &type) {
function glfw_error_callback (line 80) | static void glfw_error_callback(int error, const char *description) {
function main (line 84) | int main() {
function processInput (line 259) | void processInput(GLFWwindow *window) {
function framebuffer_size_callback (line 283) | void framebuffer_size_callback(GLFWwindow *window, int width, int height) {
function mouse_callback (line 293) | void mouse_callback(GLFWwindow *window, double xPos, double yPos) {
function scroll_callback (line 316) | void scroll_callback(GLFWwindow *window, double xOffset, double yOffset) {
FILE: shadertoy/renderer.cpp
type SPVM (line 23) | namespace SPVM {
type ShaderToy (line 24) | namespace ShaderToy {
FILE: shadertoy/renderer.h
function namespace (line 17) | namespace SPVM {
FILE: shadertoy/resourcelimits.cpp
type glslang (line 42) | namespace glslang {
function GetDefaultTBuiltInResourceString (line 160) | std::string GetDefaultTBuiltInResourceString()
function DecodeResourceLimits (line 280) | void DecodeResourceLimits(TBuiltInResource* resources, char* config)
FILE: shadertoy/resourcelimits.h
function namespace (line 42) | namespace glslang {
FILE: shadertoy/settingpanel.cpp
type SPVM (line 11) | namespace SPVM {
type ShaderToy (line 12) | namespace ShaderToy {
FILE: shadertoy/settingpanel.h
function namespace (line 12) | namespace SPVM {
FILE: shadertoy/settings.h
function namespace (line 14) | namespace SPVM {
FILE: shadertoy/third_party/glad/include/KHR/khrplatform.h
type khronos_int32_t (line 150) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 151) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 152) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 153) | typedef uint64_t khronos_uint64_t;
type khronos_int32_t (line 177) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 178) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 179) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 180) | typedef uint64_t khronos_uint64_t;
type __int32 (line 189) | typedef __int32 khronos_int32_t;
type khronos_uint32_t (line 190) | typedef unsigned __int32 khronos_uint32_t;
type __int64 (line 191) | typedef __int64 khronos_int64_t;
type khronos_uint64_t (line 192) | typedef unsigned __int64 khronos_uint64_t;
type khronos_int32_t (line 201) | typedef int khronos_int32_t;
type khronos_uint32_t (line 202) | typedef unsigned int khronos_uint32_t;
type khronos_int64_t (line 204) | typedef long int khronos_int64_t;
type khronos_uint64_t (line 205) | typedef unsigned long int khronos_uint64_t;
type khronos_int64_t (line 207) | typedef long long int khronos_int64_t;
type khronos_uint64_t (line 208) | typedef unsigned long long int khronos_uint64_t;
type khronos_int32_t (line 218) | typedef int khronos_int32_t;
type khronos_uint32_t (line 219) | typedef unsigned int khronos_uint32_t;
type khronos_int32_t (line 229) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 230) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 231) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 232) | typedef uint64_t khronos_uint64_t;
type khronos_int8_t (line 242) | typedef signed char khronos_int8_t;
type khronos_uint8_t (line 243) | typedef unsigned char khronos_uint8_t;
type khronos_int16_t (line 244) | typedef signed short int khronos_int16_t;
type khronos_uint16_t (line 245) | typedef unsigned short int khronos_uint16_t;
type khronos_intptr_t (line 253) | typedef intptr_t khronos_intptr_t;
type khronos_uintptr_t (line 254) | typedef uintptr_t khronos_uintptr_t;
type khronos_intptr_t (line 256) | typedef signed long long int khronos_intptr_t;
type khronos_uintptr_t (line 257) | typedef unsigned long long int khronos_uintptr_t;
type khronos_intptr_t (line 259) | typedef signed long int khronos_intptr_t;
type khronos_uintptr_t (line 260) | typedef unsigned long int khronos_uintptr_t;
type khronos_ssize_t (line 264) | typedef signed long long int khronos_ssize_t;
type khronos_usize_t (line 265) | typedef unsigned long long int khronos_usize_t;
type khronos_ssize_t (line 267) | typedef signed long int khronos_ssize_t;
type khronos_usize_t (line 268) | typedef unsigned long int khronos_usize_t;
type khronos_float_t (line 275) | typedef float khronos_float_t;
type khronos_uint64_t (line 288) | typedef khronos_uint64_t khronos_utime_nanoseconds_t;
type khronos_int64_t (line 289) | typedef khronos_int64_t khronos_stime_nanoseconds_t;
type khronos_boolean_enum_t (line 305) | typedef enum {
FILE: shadertoy/third_party/glad/include/glad/glad.h
type gladGLversionStruct (line 50) | struct gladGLversionStruct {
type GLenum (line 90) | typedef unsigned int GLenum;
type GLboolean (line 91) | typedef unsigned char GLboolean;
type GLbitfield (line 92) | typedef unsigned int GLbitfield;
type GLvoid (line 93) | typedef void GLvoid;
type khronos_int8_t (line 94) | typedef khronos_int8_t GLbyte;
type khronos_uint8_t (line 95) | typedef khronos_uint8_t GLubyte;
type khronos_int16_t (line 96) | typedef khronos_int16_t GLshort;
type khronos_uint16_t (line 97) | typedef khronos_uint16_t GLushort;
type GLint (line 98) | typedef int GLint;
type GLuint (line 99) | typedef unsigned int GLuint;
type khronos_int32_t (line 100) | typedef khronos_int32_t GLclampx;
type GLsizei (line 101) | typedef int GLsizei;
type khronos_float_t (line 102) | typedef khronos_float_t GLfloat;
type khronos_float_t (line 103) | typedef khronos_float_t GLclampf;
type GLdouble (line 104) | typedef double GLdouble;
type GLclampd (line 105) | typedef double GLclampd;
type GLchar (line 108) | typedef char GLchar;
type GLcharARB (line 109) | typedef char GLcharARB;
type GLhandleARB (line 113) | typedef unsigned int GLhandleARB;
type khronos_uint16_t (line 115) | typedef khronos_uint16_t GLhalf;
type khronos_uint16_t (line 116) | typedef khronos_uint16_t GLhalfARB;
type khronos_int32_t (line 117) | typedef khronos_int32_t GLfixed;
type khronos_intptr_t (line 118) | typedef khronos_intptr_t GLintptr;
type khronos_intptr_t (line 119) | typedef khronos_intptr_t GLintptrARB;
type khronos_ssize_t (line 120) | typedef khronos_ssize_t GLsizeiptr;
type khronos_ssize_t (line 121) | typedef khronos_ssize_t GLsizeiptrARB;
type khronos_int64_t (line 122) | typedef khronos_int64_t GLint64;
type khronos_int64_t (line 123) | typedef khronos_int64_t GLint64EXT;
type khronos_uint64_t (line 124) | typedef khronos_uint64_t GLuint64;
type khronos_uint64_t (line 125) | typedef khronos_uint64_t GLuint64EXT;
type __GLsync (line 126) | struct __GLsync
type _cl_context (line 127) | struct _cl_context
type _cl_event (line 128) | struct _cl_event
type GLhalfNV (line 133) | typedef unsigned short GLhalfNV;
type GLintptr (line 134) | typedef GLintptr GLvdpauSurfaceNV;
type GLubyte (line 1074) | typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC)(GLenum name);
type GLubyte (line 1763) | typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC)(GLenum name, GLu...
FILE: shadertoy/third_party/glad/src/glad.c
function open_gl (line 56) | static
function close_gl (line 71) | static
function open_gl (line 87) | static
function close_gl (line 118) | static
function gladLoadGL (line 148) | int gladLoadGL(void) {
type gladGLversionStruct (line 159) | struct gladGLversionStruct
function get_exts (line 172) | static int get_exts(void) {
function free_exts (line 206) | static void free_exts(void) {
function has_ext (line 217) | static int has_ext(const char *ext) {
function load_GL_VERSION_1_0 (line 644) | static void load_GL_VERSION_1_0(GLADloadproc load) {
function load_GL_VERSION_1_1 (line 695) | static void load_GL_VERSION_1_1(GLADloadproc load) {
function load_GL_VERSION_1_2 (line 711) | static void load_GL_VERSION_1_2(GLADloadproc load) {
function load_GL_VERSION_1_3 (line 718) | static void load_GL_VERSION_1_3(GLADloadproc load) {
function load_GL_VERSION_1_4 (line 730) | static void load_GL_VERSION_1_4(GLADloadproc load) {
function load_GL_VERSION_1_5 (line 742) | static void load_GL_VERSION_1_5(GLADloadproc load) {
function load_GL_VERSION_2_0 (line 764) | static void load_GL_VERSION_2_0(GLADloadproc load) {
function load_GL_VERSION_2_1 (line 860) | static void load_GL_VERSION_2_1(GLADloadproc load) {
function load_GL_VERSION_3_0 (line 869) | static void load_GL_VERSION_3_0(GLADloadproc load) {
function load_GL_VERSION_3_1 (line 956) | static void load_GL_VERSION_3_1(GLADloadproc load) {
function load_GL_VERSION_3_2 (line 974) | static void load_GL_VERSION_3_2(GLADloadproc load) {
function load_GL_VERSION_3_3 (line 996) | static void load_GL_VERSION_3_3(GLADloadproc load) {
function find_extensionsGL (line 1057) | static int find_extensionsGL(void) {
function find_coreGL (line 1064) | static void find_coreGL(void) {
function gladLoadGLLoader (line 1118) | int gladLoadGLLoader(GLADloadproc load) {
FILE: shadertoy/third_party/glfw/include/GLFW/glfw3.h
type GLFWmonitor (line 1174) | typedef struct GLFWmonitor GLFWmonitor;
type GLFWwindow (line 1186) | typedef struct GLFWwindow GLFWwindow;
type GLFWcursor (line 1198) | typedef struct GLFWcursor GLFWcursor;
type GLFWvidmode (line 1658) | typedef struct GLFWvidmode
type GLFWgammaramp (line 1692) | typedef struct GLFWgammaramp
type GLFWimage (line 1721) | typedef struct GLFWimage
type GLFWgamepadstate (line 1745) | typedef struct GLFWgamepadstate
FILE: shadertoy/third_party/imgui/imgui/imgui.cpp
type ImGui (line 940) | namespace ImGui
function FreeWrapper (line 1021) | static void FreeWrapper(void* ptr, void* user_data) { IM_UNUSE...
function FreeWrapper (line 1024) | static void FreeWrapper(void* ptr, void* user_data) { IM_UNUSE...
function ImVec2 (line 1392) | ImVec2 ImBezierCubicClosestPoint(const ImVec2& p1, const ImVec2& p2, con...
function ImBezierCubicClosestPointCasteljauStep (line 1415) | static void ImBezierCubicClosestPointCasteljauStep(const ImVec2& p, ImVe...
function ImVec2 (line 1450) | ImVec2 ImBezierCubicClosestPointCasteljau(const ImVec2& p1, const ImVec2...
function ImVec2 (line 1460) | ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2...
function ImTriangleContainsPoint (line 1473) | bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImV...
function ImTriangleBarycentricCoords (line 1481) | void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const...
function ImVec2 (line 1492) | ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const Im...
function ImStricmp (line 1513) | int ImStricmp(const char* str1, const char* str2)
function ImStrnicmp (line 1520) | int ImStrnicmp(const char* str1, const char* str2, size_t count)
function ImStrncpy (line 1527) | void ImStrncpy(char* dst, const char* src, size_t count)
function ImStrlenW (line 1563) | int ImStrlenW(const ImWchar* str)
function ImWchar (line 1578) | const ImWchar* ImStrbolW(const ImWchar* buf_mid_line, const ImWchar* buf...
function ImStrTrimBlanks (line 1608) | void ImStrTrimBlanks(char* buf)
function ImFormatString (line 1648) | int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
function ImFormatStringV (line 1666) | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list...
function ImGuiID (line 1708) | ImGuiID ImHashData(const void* data_p, size_t data_size, ImU32 seed)
function ImGuiID (line 1724) | ImGuiID ImHashStr(const char* data_p, size_t data_size, ImU32 seed)
function ImFileHandle (line 1759) | ImFileHandle ImFileOpen(const char* filename, const char* mode)
function ImFileClose (line 1777) | bool ImFileClose(ImFileHandle f) { return fclose(f) == 0; }
function ImU64 (line 1778) | ImU64 ImFileGetSize(ImFileHandle f) { long off = 0, sz = 0; return (...
function ImU64 (line 1779) | ImU64 ImFileRead(void* data, ImU64 sz, ImU64 count, ImFileHandle f) ...
function ImU64 (line 1780) | ImU64 ImFileWrite(const void* data, ImU64 sz, ImU64 count, ImFileHandl...
function ImTextCharFromUtf8 (line 1832) | int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, cons...
function ImTextStrFromUtf8 (line 1884) | int ImTextStrFromUtf8(ImWchar* buf, int buf_size, const char* in_text, c...
function ImTextCountCharsFromUtf8 (line 1902) | int ImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end)
function ImTextCharToUtf8_inline (line 1917) | static inline int ImTextCharToUtf8_inline(char* buf, int buf_size, unsig...
function ImTextCountUtf8BytesFromChar (line 1960) | int ImTextCountUtf8BytesFromChar(const char* in_text, const char* in_tex...
function ImTextCountUtf8BytesFromChar (line 1966) | static inline int ImTextCountUtf8BytesFromChar(unsigned int c)
function ImTextStrToUtf8 (line 1975) | int ImTextStrToUtf8(char* out_buf, int out_buf_size, const ImWchar* in_t...
function ImTextCountUtf8BytesFromStr (line 1991) | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* i...
function IMGUI_API (line 2010) | IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b)
function ImVec4 (line 2019) | ImVec4 ImGui::ColorConvertU32ToFloat4(ImU32 in)
function ImU32 (line 2029) | ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in)
type StaticFunc (line 2121) | struct StaticFunc
method PairComparerByID (line 2123) | PairComparerByID(const void* lhs, const void* rhs)
function GetSkipItemForListClipping (line 2417) | static bool GetSkipItemForListClipping()
function ImGuiListClipper_SortAndFuseRanges (line 2471) | static void ImGuiListClipper_SortAndFuseRanges(ImVector<ImGuiListClipper...
function ImGuiListClipper_SeekCursorAndSetupPrevLine (line 2495) | static void ImGuiListClipper_SeekCursorAndSetupPrevLine(float pos_y, flo...
function ImGuiListClipper_SeekCursorForItem (line 2520) | static void ImGuiListClipper_SeekCursorForItem(ImGuiListClipper* clipper...
function ImGuiStyle (line 2728) | ImGuiStyle& ImGui::GetStyle()
function ImU32 (line 2734) | ImU32 ImGui::GetColorU32(ImGuiCol idx, float alpha_mul)
function ImU32 (line 2742) | ImU32 ImGui::GetColorU32(const ImVec4& col)
function ImVec4 (line 2750) | const ImVec4& ImGui::GetStyleColorVec4(ImGuiCol idx)
function ImU32 (line 2756) | ImU32 ImGui::GetColorU32(ImU32 col)
type ImGuiStyleVarInfo (line 2799) | struct ImGuiStyleVarInfo
function ImGuiStyleVarInfo (line 2836) | static const ImGuiStyleVarInfo* GetStyleVarInfo(ImGuiStyleVar idx)
function ImGuiID (line 3232) | ImGuiID ImGuiWindow::GetID(const char* str, const char* str_end)
function ImGuiID (line 3243) | ImGuiID ImGuiWindow::GetID(const void* ptr)
function ImGuiID (line 3254) | ImGuiID ImGuiWindow::GetID(int n)
function ImGuiID (line 3265) | ImGuiID ImGuiWindow::GetIDNoKeepAlive(const char* str, const char* str_end)
function ImGuiID (line 3275) | ImGuiID ImGuiWindow::GetIDNoKeepAlive(const void* ptr)
function ImGuiID (line 3285) | ImGuiID ImGuiWindow::GetIDNoKeepAlive(int n)
function ImGuiID (line 3296) | ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs)
function SetCurrentWindow (line 3305) | static void SetCurrentWindow(ImGuiWindow* window)
function ImGuiID (line 3398) | ImGuiID ImGui::GetHoveredID()
function IsWindowContentHoverable (line 3426) | static inline bool IsWindowContentHoverable(ImGuiWindow* window, ImGuiHo...
function ImGuiContext (line 3636) | ImGuiContext* ImGui::GetCurrentContext()
function ImGuiContext (line 3665) | ImGuiContext* ImGui::CreateContext(ImFontAtlas* shared_font_atlas)
function ImGuiID (line 3685) | ImGuiID ImGui::AddContextHook(ImGuiContext* ctx, const ImGuiContextHook*...
function ImGuiIO (line 3714) | ImGuiIO& ImGui::GetIO()
function ImDrawData (line 3721) | ImDrawData* ImGui::GetDrawData()
function ImDrawList (line 3738) | static ImDrawList* GetViewportDrawList(ImGuiViewportP* viewport, size_t ...
function ImDrawList (line 3762) | ImDrawList* ImGui::GetBackgroundDrawList(ImGuiViewport* viewport)
function ImDrawList (line 3767) | ImDrawList* ImGui::GetBackgroundDrawList()
function ImDrawList (line 3773) | ImDrawList* ImGui::GetForegroundDrawList(ImGuiViewport* viewport)
function ImDrawList (line 3778) | ImDrawList* ImGui::GetForegroundDrawList()
function ImDrawListSharedData (line 3784) | ImDrawListSharedData* ImGui::GetDrawListSharedData()
function IsWindowActiveAndVisible (line 3906) | static bool IsWindowActiveAndVisible(ImGuiWindow* window)
function StartLockWheelingWindow (line 4038) | static void StartLockWheelingWindow(ImGuiWindow* window)
function ImGuiKeyModFlags (line 4210) | ImGuiKeyModFlags ImGui::GetMergedKeyModFlags()
function AddWindowToSortBuffer (line 4551) | static void AddWindowToSortBuffer(ImVector<ImGuiWindow*>* out_sorted_win...
function AddDrawListToDrawData (line 4567) | static void AddDrawListToDrawData(ImVector<ImDrawList*>* out_list, ImDra...
function AddWindowToDrawData (line 4602) | static void AddWindowToDrawData(ImGuiWindow* window, int layer)
function GetWindowDisplayLayer (line 4616) | static inline int GetWindowDisplayLayer(ImGuiWindow* window)
function AddRootWindowToDrawData (line 4622) | static inline void AddRootWindowToDrawData(ImGuiWindow* window)
function SetupViewportDrawData (line 4645) | static void SetupViewportDrawData(ImGuiViewportP* viewport, ImVector<ImD...
function ImGuiWindow (line 4712) | ImGuiWindow* ImGui::FindBottomMostVisibleWindowWithinBeginStack(ImGuiWin...
function ImVec2 (line 4918) | ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool ...
function FindHoveredWindow (line 4948) | static void FindHoveredWindow()
function ImVec2 (line 5121) | ImVec2 ImGui::GetItemRectMin()
function ImVec2 (line 5127) | ImVec2 ImGui::GetItemRectMax()
function ImVec2 (line 5133) | ImVec2 ImGui::GetItemRectSize()
function SetWindowConditionAllowFlags (line 5267) | static void SetWindowConditionAllowFlags(ImGuiWindow* window, ImGuiCond ...
function ImGuiWindow (line 5274) | ImGuiWindow* ImGui::FindWindowByID(ImGuiID id)
function ImGuiWindow (line 5280) | ImGuiWindow* ImGui::FindWindowByName(const char* name)
function ApplyWindowSettings (line 5286) | static void ApplyWindowSettings(ImGuiWindow* window, ImGuiWindowSettings...
function UpdateWindowInFocusOrderList (line 5294) | static void UpdateWindowInFocusOrderList(ImGuiWindow* window, bool just_...
function ImGuiWindow (line 5317) | static ImGuiWindow* CreateNewWindow(const char* name, ImGuiWindowFlags f...
function ImVec2 (line 5365) | static ImVec2 CalcWindowSizeAfterConstraint(ImGuiWindow* window, const I...
function CalcWindowContentSizes (line 5400) | static void CalcWindowContentSizes(ImGuiWindow* window, ImVec2* content_...
function ImVec2 (line 5420) | static ImVec2 CalcWindowAutoFitSize(ImGuiWindow* window, const ImVec2& s...
function ImVec2 (line 5458) | ImVec2 ImGui::CalcWindowNextAutoFitSize(ImGuiWindow* window)
function ImGuiCol (line 5468) | static ImGuiCol GetWindowBgColorIdx(ImGuiWindow* window)
function CalcResizePosSizeFromAnyCorner (line 5477) | static void CalcResizePosSizeFromAnyCorner(ImGuiWindow* window, const Im...
type ImGuiResizeGripDef (line 5492) | struct ImGuiResizeGripDef
type ImGuiResizeBorderDef (line 5507) | struct ImGuiResizeBorderDef
function ImRect (line 5521) | static ImRect GetResizeBorderRect(ImGuiWindow* window, int border_n, flo...
function ImGuiID (line 5535) | ImGuiID ImGui::GetWindowResizeCornerID(ImGuiWindow* window, int n)
function ImGuiID (line 5545) | ImGuiID ImGui::GetWindowResizeBorderID(ImGuiWindow* window, ImGuiDir dir)
function ClampWindowRect (line 5687) | static inline void ClampWindowRect(ImGuiWindow* window, const ImRect& vi...
function ImGuiWindow (line 5920) | static ImGuiWindow* ImGui::FindBlockingModal(ImGuiWindow* window)
function ImGuiWindow (line 6916) | static ImGuiWindow* GetCombinedRootWindow(ImGuiWindow* window, bool popu...
function ImVec2 (line 7053) | ImVec2 ImGui::GetWindowPos()
function ImVec2 (line 7092) | ImVec2 ImGui::GetWindowSize()
function ImDrawList (line 7266) | ImDrawList* ImGui::GetWindowDrawList()
function ImFont (line 7272) | ImFont* ImGui::GetFont()
function ImVec2 (line 7282) | ImVec2 ImGui::GetFontTexUvWhitePixel()
function ImGuiStorage (line 7364) | ImGuiStorage* ImGui::GetStateStorage()
function ImGuiID (line 7415) | ImGuiID ImGui::GetIDWithSeed(const char* str, const char* str_end, ImGui...
function ImGuiID (line 7432) | ImGuiID ImGui::GetID(const char* str_id)
function ImGuiID (line 7438) | ImGuiID ImGui::GetID(const char* str_id_begin, const char* str_id_end)
function ImGuiID (line 7444) | ImGuiID ImGui::GetID(const void* ptr_id)
function ImGuiKeyData (line 7486) | ImGuiKeyData* ImGui::GetKeyData(ImGuiKey key)
function ImVec2 (line 7676) | ImVec2 ImGui::GetMousePos()
function ImVec2 (line 7683) | ImVec2 ImGui::GetMousePosOnOpeningCurrentPopup()
function ImVec2 (line 7715) | ImVec2 ImGui::GetMouseDragDelta(ImGuiMouseButton button, float lock_thre...
function ImGuiMouseCursor (line 7736) | ImGuiMouseCursor ImGui::GetMouseCursor()
function ImVec2 (line 8287) | ImVec2 ImGui::GetCursorScreenPos()
function ImVec2 (line 8302) | ImVec2 ImGui::GetCursorPos()
function ImVec2 (line 8341) | ImVec2 ImGui::GetCursorStartPos()
function ImVec2 (line 8427) | ImVec2 ImGui::CalcItemSize(ImVec2 size, float default_w, float default_h)
function ImVec2 (line 8475) | ImVec2 ImGui::GetContentRegionMax()
function ImVec2 (line 8486) | ImVec2 ImGui::GetContentRegionMaxAbs()
function ImVec2 (line 8496) | ImVec2 ImGui::GetContentRegionAvail()
function ImVec2 (line 8503) | ImVec2 ImGui::GetWindowContentRegionMin()
function ImVec2 (line 8509) | ImVec2 ImGui::GetWindowContentRegionMax()
function CalcScrollEdgeSnap (line 8614) | static float CalcScrollEdgeSnap(float target, float snap_min, float snap...
function ImVec2 (line 8623) | static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window)
function ImVec2 (line 8675) | ImVec2 ImGui::ScrollToRectEx(ImGuiWindow* window, const ImRect& item_rec...
function ImGuiWindow (line 8963) | ImGuiWindow* ImGui::GetTopMostPopupModal()
function ImGuiWindow (line 8973) | ImGuiWindow* ImGui::GetTopMostAndVisiblePopupModal()
function ImVec2 (line 9332) | ImVec2 ImGui::FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const I...
function ImRect (line 9407) | ImRect ImGui::GetPopupAllowedExtentRect(ImGuiWindow* window)
function ImVec2 (line 9417) | ImVec2 ImGui::FindBestWindowPosForPopup(ImGuiWindow* window)
function ImGuiDir (line 9498) | ImGuiDir ImGetDirQuadrantFromDelta(float dx, float dy)
function NavScoreItemDistInterval (line 9505) | static float inline NavScoreItemDistInterval(float a0, float a1, float b...
function NavClampRectToVisibleAreaForMoveDir (line 9514) | static void inline NavClampRectToVisibleAreaForMoveDir(ImGuiDir move_dir...
function ImGuiWindow (line 9869) | static ImGuiWindow* ImGui::NavRestoreLastChildNavWindow(ImGuiWindow* win...
function ImVec2 (line 9940) | static ImVec2 ImGui::NavCalcPreferredRefPos()
function ImVec2 (line 10002) | ImVec2 ImGui::GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, Im...
function ImGuiWindow (line 10660) | static ImGuiWindow* FindWindowNavFocusable(int i_start, int i_stop, int ...
function NavUpdateWindowingHighlightWindow (line 10669) | static void NavUpdateWindowingHighlightWindow(int focus_change_dir)
function ImGuiPayload (line 11159) | const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGui...
function ImGuiPayload (line 11196) | const ImGuiPayload* ImGui::GetDragDropPayload()
function LogTextV (line 11219) | static inline void LogTextV(ImGuiContext& g, const char* fmt, va_list args)
function ImGuiWindowSettings (line 11518) | ImGuiWindowSettings* ImGui::CreateNewWindowSettings(const char* name)
function ImGuiWindowSettings (line 11540) | ImGuiWindowSettings* ImGui::FindWindowSettings(ImGuiID id)
function ImGuiWindowSettings (line 11549) | ImGuiWindowSettings* ImGui::FindOrCreateWindowSettings(const char* name)
function ImGuiSettingsHandler (line 11556) | ImGuiSettingsHandler* ImGui::FindSettingsHandler(const char* type_name)
function WindowSettingsHandler_ClearAll (line 11689) | static void WindowSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSetti...
function WindowSettingsHandler_ReadLine (line 11707) | static void WindowSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsH...
function WindowSettingsHandler_ApplyAll (line 11718) | static void WindowSettingsHandler_ApplyAll(ImGuiContext* ctx, ImGuiSetti...
function WindowSettingsHandler_WriteAll (line 11730) | static void WindowSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSetti...
function ImGuiViewport (line 11776) | ImGuiViewport* ImGui::GetMainViewport()
function SetClipboardTextFn_DefaultImpl (line 11850) | static void SetClipboardTextFn_DefaultImpl(void*, const char* text)
function SetClipboardTextFn_DefaultImpl (line 11877) | static void SetClipboardTextFn_DefaultImpl(void*, const char* text)
function SetClipboardTextFn_DefaultImpl (line 11932) | static void SetClipboardTextFn_DefaultImpl(void*, const char* text)
function SetPlatformImeDataFn_DefaultImpl (line 11952) | static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport* viewport, Im...
function SetPlatformImeDataFn_DefaultImpl (line 11983) | static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport*, ImGuiPlatfo...
function RenderViewportsThumbnails (line 12038) | static void RenderViewportsThumbnails()
function MetricsHelpMarker (line 12060) | static void MetricsHelpMarker(const char* desc)
type ImGui (line 12074) | namespace ImGui { void ShowFontAtlas(ImFontAtlas* atlas); }
type Funcs (line 12110) | struct Funcs
method ImRect (line 12112) | static ImRect GetTableRect(ImGuiTable* table, int rect_type, int n)
method ImRect (line 12131) | static ImRect GetWindowRect(ImGuiWindow* window, int rect_type)
type Func (line 12239) | struct Func { static int IMGUI_CDECL WindowComparerByBeginOrder(const vo...
method WindowComparerByBeginOrder (line 12239) | WindowComparerByBeginOrder(const void* lhs, const void* rhs) { return ...
FILE: shadertoy/third_party/imgui/imgui/imgui.h
type ImDrawChannel (line 134) | struct ImDrawChannel
type ImDrawCmd (line 135) | struct ImDrawCmd
type ImDrawData (line 136) | struct ImDrawData
type ImDrawList (line 137) | struct ImDrawList
type ImDrawListSharedData (line 138) | struct ImDrawListSharedData
type ImDrawListSplitter (line 139) | struct ImDrawListSplitter
type ImDrawVert (line 140) | struct ImDrawVert
type ImFont (line 141) | struct ImFont
type ImFontAtlas (line 142) | struct ImFontAtlas
type ImFontBuilderIO (line 143) | struct ImFontBuilderIO
type ImFontConfig (line 144) | struct ImFontConfig
type ImFontGlyph (line 145) | struct ImFontGlyph
type ImFontGlyphRangesBuilder (line 146) | struct ImFontGlyphRangesBuilder
type ImColor (line 147) | struct ImColor
type ImGuiContext (line 148) | struct ImGuiContext
type ImGuiIO (line 149) | struct ImGuiIO
type ImGuiInputTextCallbackData (line 150) | struct ImGuiInputTextCallbackData
type ImGuiKeyData (line 151) | struct ImGuiKeyData
type ImGuiListClipper (line 152) | struct ImGuiListClipper
type ImGuiOnceUponAFrame (line 153) | struct ImGuiOnceUponAFrame
type ImGuiPayload (line 154) | struct ImGuiPayload
type ImGuiPlatformImeData (line 155) | struct ImGuiPlatformImeData
type ImGuiSizeCallbackData (line 156) | struct ImGuiSizeCallbackData
type ImGuiStorage (line 157) | struct ImGuiStorage
type ImGuiStyle (line 158) | struct ImGuiStyle
type ImGuiTableSortSpecs (line 159) | struct ImGuiTableSortSpecs
type ImGuiTableColumnSortSpecs (line 160) | struct ImGuiTableColumnSortSpecs
type ImGuiTextBuffer (line 161) | struct ImGuiTextBuffer
type ImGuiTextFilter (line 162) | struct ImGuiTextFilter
type ImGuiViewport (line 163) | struct ImGuiViewport
type ImGuiCol (line 169) | typedef int ImGuiCol;
type ImGuiCond (line 170) | typedef int ImGuiCond;
type ImGuiDataType (line 171) | typedef int ImGuiDataType;
type ImGuiDir (line 172) | typedef int ImGuiDir;
type ImGuiKey (line 173) | typedef int ImGuiKey;
type ImGuiNavInput (line 174) | typedef int ImGuiNavInput;
type ImGuiMouseButton (line 175) | typedef int ImGuiMouseButton;
type ImGuiMouseCursor (line 176) | typedef int ImGuiMouseCursor;
type ImGuiSortDirection (line 177) | typedef int ImGuiSortDirection;
type ImGuiStyleVar (line 178) | typedef int ImGuiStyleVar;
type ImGuiTableBgTarget (line 179) | typedef int ImGuiTableBgTarget;
type ImDrawFlags (line 180) | typedef int ImDrawFlags;
type ImDrawListFlags (line 181) | typedef int ImDrawListFlags;
type ImFontAtlasFlags (line 182) | typedef int ImFontAtlasFlags;
type ImGuiBackendFlags (line 183) | typedef int ImGuiBackendFlags;
type ImGuiButtonFlags (line 184) | typedef int ImGuiButtonFlags;
type ImGuiColorEditFlags (line 185) | typedef int ImGuiColorEditFlags;
type ImGuiConfigFlags (line 186) | typedef int ImGuiConfigFlags;
type ImGuiComboFlags (line 187) | typedef int ImGuiComboFlags;
type ImGuiDragDropFlags (line 188) | typedef int ImGuiDragDropFlags;
type ImGuiFocusedFlags (line 189) | typedef int ImGuiFocusedFlags;
type ImGuiHoveredFlags (line 190) | typedef int ImGuiHoveredFlags;
type ImGuiInputTextFlags (line 191) | typedef int ImGuiInputTextFlags;
type ImGuiKeyModFlags (line 192) | typedef int ImGuiKeyModFlags;
type ImGuiPopupFlags (line 193) | typedef int ImGuiPopupFlags;
type ImGuiSelectableFlags (line 194) | typedef int ImGuiSelectableFlags;
type ImGuiSliderFlags (line 195) | typedef int ImGuiSliderFlags;
type ImGuiTabBarFlags (line 196) | typedef int ImGuiTabBarFlags;
type ImGuiTabItemFlags (line 197) | typedef int ImGuiTabItemFlags;
type ImGuiTableFlags (line 198) | typedef int ImGuiTableFlags;
type ImGuiTableColumnFlags (line 199) | typedef int ImGuiTableColumnFlags;
type ImGuiTableRowFlags (line 200) | typedef int ImGuiTableRowFlags;
type ImGuiTreeNodeFlags (line 201) | typedef int ImGuiTreeNodeFlags;
type ImGuiViewportFlags (line 202) | typedef int ImGuiViewportFlags;
type ImGuiWindowFlags (line 203) | typedef int ImGuiWindowFlags;
type ImDrawIdx (line 216) | typedef unsigned short ImDrawIdx;
type ImGuiID (line 220) | typedef unsigned int ImGuiID;
type ImS8 (line 221) | typedef signed char ImS8;
type ImU8 (line 222) | typedef unsigned char ImU8;
type ImS16 (line 223) | typedef signed short ImS16;
type ImU16 (line 224) | typedef unsigned short ImU16;
type ImS32 (line 225) | typedef signed int ImS32;
type ImU32 (line 226) | typedef unsigned int ImU32;
type ImS64 (line 227) | typedef signed long long ImS64;
type ImU64 (line 228) | typedef unsigned long long ImU64;
type ImWchar16 (line 232) | typedef unsigned short ImWchar16;
type ImWchar32 (line 233) | typedef unsigned int ImWchar32;
type ImWchar32 (line 235) | typedef ImWchar32 ImWchar;
type ImWchar16 (line 237) | typedef ImWchar16 ImWchar;
function IM_MSVC_RUNTIME_CHECKS_OFF (line 248) | IM_MSVC_RUNTIME_CHECKS_OFF
function const (line 254) | float operator[] (size_t idx) const { IM_ASSERT(idx <= 1); return (&...
function ImVec4 (line 262) | struct ImVec4
function IM_MSVC_RUNTIME_CHECKS_RESTORE (line 271) | IM_MSVC_RUNTIME_CHECKS_RESTORE
type ImGuiWindowFlags_ (line 943) | enum ImGuiWindowFlags_
type ImGuiInputTextFlags_ (line 981) | enum ImGuiInputTextFlags_
type ImGuiTreeNodeFlags_ (line 1012) | enum ImGuiTreeNodeFlags_
type ImGuiPopupFlags_ (line 1041) | enum ImGuiPopupFlags_
type ImGuiSelectableFlags_ (line 1057) | enum ImGuiSelectableFlags_
type ImGuiComboFlags_ (line 1068) | enum ImGuiComboFlags_
type ImGuiTabBarFlags_ (line 1082) | enum ImGuiTabBarFlags_
type ImGuiTabItemFlags_ (line 1098) | enum ImGuiTabItemFlags_
type ImGuiTableFlags_ (line 1133) | enum ImGuiTableFlags_
type ImGuiTableColumnFlags_ (line 1190) | enum ImGuiTableColumnFlags_
type ImGuiTableRowFlags_ (line 1232) | enum ImGuiTableRowFlags_
type ImGuiTableBgTarget_ (line 1247) | enum ImGuiTableBgTarget_
type ImGuiFocusedFlags_ (line 1256) | enum ImGuiFocusedFlags_
type ImGuiHoveredFlags_ (line 1270) | enum ImGuiHoveredFlags_
type ImGuiDragDropFlags_ (line 1288) | enum ImGuiDragDropFlags_
type ImGuiDataType_ (line 1310) | enum ImGuiDataType_
type ImGuiDir_ (line 1326) | enum ImGuiDir_
type ImGuiSortDirection_ (line 1337) | enum ImGuiSortDirection_
type ImGuiKey_ (line 1344) | enum ImGuiKey_
type ImGuiNavInput_ (line 1461) | enum ImGuiNavInput_
type ImGuiConfigFlags_ (line 1491) | enum ImGuiConfigFlags_
type ImGuiBackendFlags_ (line 1507) | enum ImGuiBackendFlags_
type ImGuiCol_ (line 1517) | enum ImGuiCol_
type ImGuiStyleVar_ (line 1582) | enum ImGuiStyleVar_
type ImGuiButtonFlags_ (line 1614) | enum ImGuiButtonFlags_
type ImGuiColorEditFlags_ (line 1627) | enum ImGuiColorEditFlags_
type ImGuiSliderFlags_ (line 1672) | enum ImGuiSliderFlags_
type ImGuiMouseButton_ (line 1689) | enum ImGuiMouseButton_
type ImGuiMouseCursor_ (line 1699) | enum ImGuiMouseCursor_
type ImGuiCond_ (line 1717) | enum ImGuiCond_
type ImNewWrapper (line 1736) | struct ImNewWrapper {}
function delete (line 1738) | inline void operator delete(void*, ImNewWrapper, void*) {}
function IM_MSVC_RUNTIME_CHECKS_OFF (line 1756) | IM_MSVC_RUNTIME_CHECKS_OFF
function clear (line 1775) | inline void clear() { if (Data) { Si...
function clear_delete (line 1776) | inline void clear_delete() { for (int n = 0...
function clear_destruct (line 1777) | inline void clear_destruct() { for (int n = 0...
function size_in_bytes (line 1781) | inline int size_in_bytes() const { return Size * ...
function T (line 1784) | inline T& operator[](int i) { IM_ASSERT(i >=...
function T (line 1785) | inline const T& operator[](int i) const { IM_ASSERT(i >=...
function T (line 1787) | inline T* begin() { return Data; }
function T (line 1788) | inline const T* begin() const { return Data; }
function T (line 1789) | inline T* end() { return Data + ...
function T (line 1790) | inline const T* end() const { return Data + ...
function T (line 1791) | inline T& front() { IM_ASSERT(Size...
function T (line 1792) | inline const T& front() const { IM_ASSERT(Size...
function T (line 1794) | inline const T& back() const { IM_ASSERT(Size...
function _grow_capacity (line 1797) | inline int _grow_capacity(int sz) const { int new_capaci...
function resize (line 1798) | inline void resize(int new_size) { if (new_size >...
function resize (line 1799) | inline void resize(int new_size, const T& v) { if (new_size >...
function shrink (line 1800) | inline void shrink(int new_size) { IM_ASSERT(new_...
function reserve (line 1801) | inline void reserve(int new_capacity) { if (new_capaci...
function push_back (line 1804) | inline void push_back(const T& v) { if (Size == Ca...
function pop_back (line 1805) | inline void pop_back() { IM_ASSERT(Size...
function push_front (line 1806) | inline void push_front(const T& v) { if (Size == 0)...
function T (line 1807) | inline T* erase(const T* it) { IM_ASSERT(it >...
function T (line 1808) | inline T* erase(const T* it, const T* it_last){ IM_ASSERT(it >...
function T (line 1809) | inline T* erase_unsorted(const T* it) { IM_ASSERT(it >...
function T (line 1810) | inline T* insert(const T* it, const T& v) { IM_ASSERT(it >...
function contains (line 1811) | inline bool contains(const T& v) const { const T* data ...
function T (line 1812) | inline T* find(const T& v) { T* data = Data...
function T (line 1813) | inline const T* find(const T& v) const { const T* data ...
function find_erase (line 1814) | inline bool find_erase(const T& v) { const T* it = ...
function find_erase_unsorted (line 1815) | inline bool find_erase_unsorted(const T& v) { const T* it = ...
function index_from_ptr (line 1816) | inline int index_from_ptr(const T* it) const { IM_ASSERT(it >...
function IM_MSVC_RUNTIME_CHECKS_RESTORE (line 1818) | IM_MSVC_RUNTIME_CHECKS_RESTORE
type ImGuiKeyData (line 1885) | struct ImGuiKeyData
type ImGuiIO (line 1893) | struct ImGuiIO
function ClearSelection (line 2063) | struct ImGuiInputTextCallbackData
type ImGuiSizeCallbackData (line 2094) | struct ImGuiSizeCallbackData
function Clear (line 2103) | struct ImGuiPayload
function IsDataType (line 2119) | bool IsDataType(const char* type) const { return DataFrameCount != -1 &&...
type ImGuiTableColumnSortSpecs (line 2125) | struct ImGuiTableColumnSortSpecs
type ImGuiTableSortSpecs (line 2139) | struct ImGuiTableSortSpecs
type ImGuiOnceUponAFrame (line 2162) | struct ImGuiOnceUponAFrame
function IsActive (line 2170) | struct ImGuiTextFilter
type ImGuiTextBuffer (line 2197) | struct ImGuiTextBuffer
function clear (line 2208) | void clear() { Buf.clear(); }
function reserve (line 2209) | void reserve(int capacity) { Buf.reserve(capacity); }
function ImGuiStoragePair (line 2224) | struct ImGuiStorage
function Clear (line 2241) | void Clear() { Data.clear(); }
type ImGuiListClipper (line 2287) | struct ImGuiListClipper
type ImColor (line 2335) | struct ImColor
function operator (line 2344) | inline operator ImU32() const { return...
function GetTexID (line 2384) | struct ImDrawCmd
type ImDrawFlags_ (line 2451) | enum ImDrawFlags_
type ImDrawListFlags_ (line 2471) | enum ImDrawListFlags_
function ImDrawList (line 2489) | struct ImDrawList
function ImVec2 (line 2519) | inline ImVec2 GetClipRectMin() const { const ImVec4& cr = _ClipRectSta...
function PathClear (line 2556) | inline void PathClear() ...
function PathLineTo (line 2557) | inline void PathLineTo(const ImVec2& pos) ...
function PathLineToMergeDuplicate (line 2558) | inline void PathLineToMergeDuplicate(const ImVec2& pos) ...
function PathFillConvex (line 2559) | inline void PathFillConvex(ImU32 col) ...
function ChannelsSplit (line 2578) | inline void ChannelsSplit(int count) { _Splitter.Split(this, coun...
function ChannelsMerge (line 2579) | inline void ChannelsMerge() { _Splitter.Merge(this); }
function ChannelsSetCurrent (line 2580) | inline void ChannelsSetCurrent(int n) { _Splitter.SetCurrentChanne...
function PrimWriteVtx (line 2590) | inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU32 ...
function PrimWriteIdx (line 2591) | inline void PrimWriteIdx(ImDrawIdx idx) ...
function PrimVtx (line 2592) | inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) ...
function Clear (line 2615) | struct ImDrawData
type ImFontConfig (line 2637) | struct ImFontConfig
type ImFontGlyph (line 2666) | struct ImFontGlyph
function Clear (line 2678) | struct ImFontGlyphRangesBuilder
function GetBit (line 2684) | inline bool GetBit(size_t n) const { int off = (int)(n >> 5); ImU32...
function SetBit (line 2685) | inline void SetBit(size_t n) { int off = (int)(n >> 5); ImU32...
function AddChar (line 2686) | inline void AddChar(ImWchar c) { SetBit(c); }
type ImFontAtlasFlags_ (line 2706) | enum ImFontAtlasFlags_
function SetTexID (line 2731) | struct ImFontAtlas
function ImFontAtlasCustomRect (line 2786) | ImFontAtlasCustomRect* GetCustomRectByIndex(int index) { IM_ASSERT(...
type ImFont (line 2832) | struct ImFont
type ImGuiViewportFlags_ (line 2888) | enum ImGuiViewportFlags_
function GetCenter (line 2903) | struct ImGuiViewport
function namespace (line 2951) | namespace ImGui
function ListBoxFooter (line 2960) | static inline void ListBoxFooter() { EndListBox(); }
function DragFloat (line 2968) | static inline bool DragFloat(const char* label, float* v, float v_speed...
function DragFloat2 (line 2969) | static inline bool DragFloat2(const char* label, float v[2], float v_sp...
function DragFloat3 (line 2970) | static inline bool DragFloat3(const char* label, float v[3], float v_sp...
function DragFloat4 (line 2971) | static inline bool DragFloat4(const char* label, float v[4], float v_sp...
function SliderFloat (line 2974) | static inline bool SliderFloat(const char* label, float* v, float v_min...
function SliderFloat2 (line 2975) | static inline bool SliderFloat2(const char* label, float v[2], float v_...
function SliderFloat3 (line 2976) | static inline bool SliderFloat3(const char* label, float v[3], float v_...
function SliderFloat4 (line 2977) | static inline bool SliderFloat4(const char* label, float v[4], float v_...
function BeginPopupContextWindow (line 2979) | static inline bool BeginPopupContextWindow(const char* str_id, ImGuiMou...
type ImDrawFlags (line 2998) | typedef ImDrawFlags ImDrawCornerFlags;
type ImDrawCornerFlags_ (line 2999) | enum ImDrawCornerFlags_
FILE: shadertoy/third_party/imgui/imgui/imgui_demo.cpp
function HelpMarker (line 191) | static void HelpMarker(const char* desc)
function ShowDemoWindowWidgets (line 557) | static void ShowDemoWindowWidgets()
function ShowDemoWindowLayout (line 2471) | static void ShowDemoWindowLayout()
function ShowDemoWindowPopups (line 3254) | static void ShowDemoWindowPopups()
type MyItemColumnID (line 3566) | enum MyItemColumnID
type MyItem (line 3575) | struct MyItem
method CompareWithSortSpecs (line 3591) | CompareWithSortSpecs(const void* lhs, const void* rhs)
function PushStyleCompact (line 3624) | static void PushStyleCompact()
function PopStyleCompact (line 3631) | static void PopStyleCompact()
function EditTableSizingFlags (line 3637) | static void EditTableSizingFlags(ImGuiTableFlags* p_flags)
function EditTableColumnsFlags (line 3679) | static void EditTableColumnsFlags(ImGuiTableColumnFlags* p_flags)
function ShowTableColumnsStatusFlags (line 3703) | static void ShowTableColumnsStatusFlags(ImGuiTableColumnFlags flags)
function ShowDemoWindowTables (line 3711) | static void ShowDemoWindowTables()
function ShowExampleAppConsole (line 6806) | static void ShowExampleAppConsole(bool* p_open)
function Draw (line 6820) | struct ExampleAppLog
function ShowExampleAppLog (line 6941) | static void ShowExampleAppLog(bool* p_open)
function ShowExampleAppLayout (line 6976) | static void ShowExampleAppLayout(bool* p_open)
function ShowPlaceholderObject (line 7042) | static void ShowPlaceholderObject(const char* prefix, int uid)
function ShowExampleAppPropertyEditor (line 7090) | static void ShowExampleAppPropertyEditor(bool* p_open)
function ShowExampleAppLongText (line 7126) | static void ShowExampleAppLongText(bool* p_open)
function ShowExampleAppAutoResize (line 7189) | static void ShowExampleAppAutoResize(bool* p_open)
function ShowExampleAppConstrainedResize (line 7214) | static void ShowExampleAppConstrainedResize(bool* p_open)
function ShowExampleAppSimpleOverlay (line 7269) | static void ShowExampleAppSimpleOverlay(bool* p_open)
function ShowExampleAppFullscreen (line 7317) | static void ShowExampleAppFullscreen(bool* p_open)
function ShowExampleAppWindowTitles (line 7355) | static void ShowExampleAppWindowTitles(bool*)
function ShowExampleAppCustomRendering (line 7389) | static void ShowExampleAppCustomRendering(bool* p_open)
type MyDocument (line 7631) | struct MyDocument
method MyDocument (line 7640) | MyDocument(const char* name, bool open = true, const ImVec4& color = I...
method DoOpen (line 7648) | void DoOpen() { Open = true; }
method DoQueueClose (line 7649) | void DoQueueClose() { WantClose = true; }
method DoForceClose (line 7650) | void DoForceClose() { Open = false; Dirty = false; }
method DoSave (line 7651) | void DoSave() { Dirty = false; }
method DisplayContents (line 7654) | static void DisplayContents(MyDocument* doc)
method DisplayContextMenu (line 7671) | static void DisplayContextMenu(MyDocument* doc)
type ExampleAppDocuments (line 7686) | struct ExampleAppDocuments
method ExampleAppDocuments (line 7690) | ExampleAppDocuments()
function NotifyOfDocumentsClosedElsewhere (line 7709) | static void NotifyOfDocumentsClosedElsewhere(ExampleAppDocuments& app)
function ShowExampleAppDocuments (line 7720) | void ShowExampleAppDocuments(bool* p_open)
FILE: shadertoy/third_party/imgui/imgui/imgui_draw.cpp
function ImDrawList (line 441) | ImDrawList* ImDrawList::CloneOutput() const
function ImVec2 (line 1230) | ImVec2 ImBezierCubicCalc(const ImVec2& p1, const ImVec2& p2, const ImVec...
function ImVec2 (line 1240) | ImVec2 ImBezierQuadraticCalc(const ImVec2& p1, const ImVec2& p2, const I...
function PathBezierCubicCurveToCasteljau (line 1250) | static void PathBezierCubicCurveToCasteljau(ImVector<ImVec2>* path, floa...
function PathBezierQuadraticCurveToCasteljau (line 1275) | static void PathBezierQuadraticCurveToCasteljau(ImVector<ImVec2>* path, ...
function ImDrawFlags (line 1324) | static inline ImDrawFlags FixRectCornerFlags(ImDrawFlags flags)
function ImFont (line 2075) | ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg)
function Decode85Byte (line 2111) | static unsigned int Decode85Byte(char c) ...
function Decode85 (line 2112) | static void Decode85(const unsigned char* src, unsigned char* dst)
function ImFont (line 2124) | ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
function ImFont (line 2145) | ImFont* ImFontAtlas::AddFontFromFileTTF(const char* filename, float size...
function ImFont (line 2167) | ImFont* ImFontAtlas::AddFontFromMemoryTTF(void* ttf_data, int ttf_size, ...
function ImFont (line 2180) | ImFont* ImFontAtlas::AddFontFromMemoryCompressedTTF(const void* compress...
function ImFont (line 2192) | ImFont* ImFontAtlas::AddFontFromMemoryCompressedBase85TTF(const char* co...
function ImFontAtlasBuildMultiplyCalcLookupTable (line 2290) | void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[...
function ImFontAtlasBuildMultiplyRectAlpha8 (line 2299) | void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256...
type ImFontBuildSrcData (line 2310) | struct ImFontBuildSrcData
type ImFontBuildDstData (line 2325) | struct ImFontBuildDstData
function UnpackBitVectorToFlatIndexList (line 2333) | static void UnpackBitVectorToFlatIndexList(const ImBitVector* in, ImVect...
function ImFontAtlasBuildWithStbTruetype (line 2345) | static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
function ImFontBuilderIO (line 2597) | const ImFontBuilderIO* ImFontAtlasGetBuilderForStbTruetype()
function ImFontAtlasBuildSetupFont (line 2606) | void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontC...
function ImFontAtlasBuildPackCustomRects (line 2621) | void ImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas, void* stbrp_con...
function ImFontAtlasBuildRender8bppRectFromString (line 2648) | void ImFontAtlasBuildRender8bppRectFromString(ImFontAtlas* atlas, int x,...
function ImFontAtlasBuildRender32bppRectFromString (line 2658) | void ImFontAtlasBuildRender32bppRectFromString(ImFontAtlas* atlas, int x...
function ImFontAtlasBuildRenderDefaultTexData (line 2668) | static void ImFontAtlasBuildRenderDefaultTexData(ImFontAtlas* atlas)
function ImFontAtlasBuildRenderLinesTexData (line 2708) | static void ImFontAtlasBuildRenderLinesTexData(ImFontAtlas* atlas)
function ImFontAtlasBuildInit (line 2760) | void ImFontAtlasBuildInit(ImFontAtlas* atlas)
function ImFontAtlasBuildFinish (line 2781) | void ImFontAtlasBuildFinish(ImFontAtlas* atlas)
function ImWchar (line 2811) | const ImWchar* ImFontAtlas::GetGlyphRangesDefault()
function ImWchar (line 2821) | const ImWchar* ImFontAtlas::GetGlyphRangesKorean()
function ImWchar (line 2834) | const ImWchar* ImFontAtlas::GetGlyphRangesChineseFull()
function UnpackAccumulativeOffsetsIntoRanges (line 2850) | static void UnpackAccumulativeOffsetsIntoRanges(int base_codepoint, cons...
function ImWchar (line 2864) | const ImWchar* ImFontAtlas::GetGlyphRangesChineseSimplifiedCommon()
function ImWchar (line 2932) | const ImWchar* ImFontAtlas::GetGlyphRangesJapanese()
function ImWchar (line 3022) | const ImWchar* ImFontAtlas::GetGlyphRangesCyrillic()
function ImWchar (line 3035) | const ImWchar* ImFontAtlas::GetGlyphRangesThai()
function ImWchar (line 3047) | const ImWchar* ImFontAtlas::GetGlyphRangesVietnamese()
function ImWchar (line 3143) | static ImWchar FindFirstExistingGlyph(ImFont* font, const ImWchar* candi...
function ImFontGlyph (line 3313) | const ImFontGlyph* ImFont::FindGlyph(ImWchar c) const
function ImFontGlyph (line 3323) | const ImFontGlyph* ImFont::FindGlyphNoFallback(ImWchar c) const
function ImVec2 (line 3432) | ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_wid...
function ImAcos01 (line 3835) | static inline float ImAcos01(float x)
function stb_decompress_length (line 3970) | static unsigned int stb_decompress_length(const unsigned char *input)
function stb__match (line 3978) | static void stb__match(const unsigned char *data, unsigned int length)
function stb__lit (line 3987) | static void stb__lit(const unsigned char *data, unsigned int length)
function stb_adler32 (line 4017) | static unsigned int stb_adler32(unsigned int adler32, unsigned char *buf...
function stb_decompress (line 4048) | static unsigned int stb_decompress(unsigned char *output, const unsigned...
FILE: shadertoy/third_party/imgui/imgui/imgui_impl_glfw.cpp
type GlfwClientApi (line 80) | enum GlfwClientApi
type ImGui_ImplGlfw_Data (line 87) | struct ImGui_ImplGlfw_Data
method ImGui_ImplGlfw_Data (line 106) | ImGui_ImplGlfw_Data() { memset(this, 0, sizeof(*this)); }
function ImGui_ImplGlfw_Data (line 116) | static ImGui_ImplGlfw_Data* ImGui_ImplGlfw_GetBackendData()
method ImGui_ImplGlfw_Data (line 106) | ImGui_ImplGlfw_Data() { memset(this, 0, sizeof(*this)); }
function ImGui_ImplGlfw_SetClipboardText (line 127) | static void ImGui_ImplGlfw_SetClipboardText(void* user_data, const char*...
function ImGuiKey (line 132) | static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(int key)
function ImGui_ImplGlfw_UpdateKeyModifiers (line 245) | static void ImGui_ImplGlfw_UpdateKeyModifiers(int mods)
function ImGui_ImplGlfw_MouseButtonCallback (line 254) | void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, ...
function ImGui_ImplGlfw_ScrollCallback (line 267) | void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, d...
function ImGui_ImplGlfw_TranslateUntranslatedKey (line 277) | static int ImGui_ImplGlfw_TranslateUntranslatedKey(int key, int scancode)
function ImGui_ImplGlfw_KeyCallback (line 302) | void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int keycode, int sca...
function ImGui_ImplGlfw_WindowFocusCallback (line 321) | void ImGui_ImplGlfw_WindowFocusCallback(GLFWwindow* window, int focused)
function ImGui_ImplGlfw_CursorPosCallback (line 331) | void ImGui_ImplGlfw_CursorPosCallback(GLFWwindow* window, double x, doub...
function ImGui_ImplGlfw_CursorEnterCallback (line 341) | void ImGui_ImplGlfw_CursorEnterCallback(GLFWwindow* window, int entered)
function ImGui_ImplGlfw_CharCallback (line 357) | void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c)
function ImGui_ImplGlfw_MonitorCallback (line 367) | void ImGui_ImplGlfw_MonitorCallback(GLFWmonitor*, int)
function ImGui_ImplGlfw_Init (line 372) | static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbac...
function ImGui_ImplGlfw_InitForOpenGL (line 444) | bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callb...
function ImGui_ImplGlfw_InitForVulkan (line 449) | bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callb...
function ImGui_ImplGlfw_InitForOther (line 454) | bool ImGui_ImplGlfw_InitForOther(GLFWwindow* window, bool install_callba...
function ImGui_ImplGlfw_Shutdown (line 459) | void ImGui_ImplGlfw_Shutdown()
function ImGui_ImplGlfw_UpdateMouseData (line 485) | static void ImGui_ImplGlfw_UpdateMouseData()
function ImGui_ImplGlfw_UpdateMouseCursor (line 511) | static void ImGui_ImplGlfw_UpdateMouseCursor()
function Saturate (line 534) | static inline float Saturate(float v) { return v < 0.0f ? 0.0f : v > 1....
function ImGui_ImplGlfw_UpdateGamepads (line 535) | static void ImGui_ImplGlfw_UpdateGamepads()
function ImGui_ImplGlfw_NewFrame (line 586) | void ImGui_ImplGlfw_NewFrame()
FILE: shadertoy/third_party/imgui/imgui/imgui_impl_glfw.h
type GLFWwindow (line 23) | struct GLFWwindow
type GLFWmonitor (line 24) | struct GLFWmonitor
FILE: shadertoy/third_party/imgui/imgui/imgui_impl_opengl3.cpp
type ImGui_ImplOpenGL3_Data (line 176) | struct ImGui_ImplOpenGL3_Data
method ImGui_ImplOpenGL3_Data (line 192) | ImGui_ImplOpenGL3_Data() { memset(this, 0, sizeof(*this)); }
function ImGui_ImplOpenGL3_Data (line 197) | static ImGui_ImplOpenGL3_Data* ImGui_ImplOpenGL3_GetBackendData()
method ImGui_ImplOpenGL3_Data (line 192) | ImGui_ImplOpenGL3_Data() { memset(this, 0, sizeof(*this)); }
function ImGui_ImplOpenGL3_Init (line 203) | bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
function ImGui_ImplOpenGL3_Shutdown (line 283) | void ImGui_ImplOpenGL3_Shutdown()
function ImGui_ImplOpenGL3_NewFrame (line 295) | void ImGui_ImplOpenGL3_NewFrame()
function ImGui_ImplOpenGL3_SetupRenderState (line 304) | static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, in...
function ImGui_ImplOpenGL3_RenderDrawData (line 380) | void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data)
function ImGui_ImplOpenGL3_CreateFontsTexture (line 527) | bool ImGui_ImplOpenGL3_CreateFontsTexture()
function ImGui_ImplOpenGL3_DestroyFontsTexture (line 558) | void ImGui_ImplOpenGL3_DestroyFontsTexture()
function CheckShader (line 571) | static bool CheckShader(GLuint handle, const char* desc)
function CheckProgram (line 590) | static bool CheckProgram(GLuint handle, const char* desc)
function ImGui_ImplOpenGL3_CreateDeviceObjects (line 608) | bool ImGui_ImplOpenGL3_CreateDeviceObjects()
function ImGui_ImplOpenGL3_DestroyDeviceObjects (line 796) | void ImGui_ImplOpenGL3_DestroyDeviceObjects()
FILE: shadertoy/third_party/imgui/imgui/imgui_impl_opengl3_loader.h
type khronos_float_t (line 53) | typedef float khronos_float_t;
type khronos_int8_t (line 54) | typedef signed char khronos_int8_t;
type khronos_uint8_t (line 55) | typedef unsigned char khronos_uint8_t;
type khronos_int16_t (line 56) | typedef signed short int khronos_int16_t;
type khronos_uint16_t (line 57) | typedef unsigned short int khronos_uint16_t;
type khronos_intptr_t (line 59) | typedef signed long long int khronos_intptr_t;
type khronos_ssize_t (line 60) | typedef signed long long int khronos_ssize_t;
type khronos_intptr_t (line 62) | typedef signed long int khronos_intptr_t;
type khronos_ssize_t (line 63) | typedef signed long int khronos_ssize_t;
type khronos_int64_t (line 67) | typedef signed __int64 khronos_int64_t;
type khronos_uint64_t (line 68) | typedef unsigned __int64 khronos_uint64_t;
type khronos_int64_t (line 71) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 72) | typedef uint64_t khronos_uint64_t;
type khronos_int64_t (line 74) | typedef signed long long khronos_int64_t;
type khronos_uint64_t (line 75) | typedef unsigned long long khronos_uint64_t;
type GLvoid (line 131) | typedef void GLvoid;
type GLenum (line 132) | typedef unsigned int GLenum;
type khronos_float_t (line 134) | typedef khronos_float_t GLfloat;
type GLint (line 135) | typedef int GLint;
type GLsizei (line 136) | typedef int GLsizei;
type GLbitfield (line 137) | typedef unsigned int GLbitfield;
type GLdouble (line 138) | typedef double GLdouble;
type GLuint (line 139) | typedef unsigned int GLuint;
type GLboolean (line 140) | typedef unsigned char GLboolean;
type khronos_uint8_t (line 141) | typedef khronos_uint8_t GLubyte;
type GLubyte (line 184) | typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
type khronos_float_t (line 206) | typedef khronos_float_t GLclampf;
type GLclampd (line 207) | typedef double GLclampd;
type khronos_ssize_t (line 242) | typedef khronos_ssize_t GLsizeiptr;
type khronos_intptr_t (line 243) | typedef khronos_intptr_t GLintptr;
type GLchar (line 262) | typedef char GLchar;
type khronos_int16_t (line 263) | typedef khronos_int16_t GLshort;
type khronos_int8_t (line 264) | typedef khronos_int8_t GLbyte;
type khronos_uint16_t (line 265) | typedef khronos_uint16_t GLushort;
type khronos_uint16_t (line 321) | typedef khronos_uint16_t GLhalf;
type GLubyte (line 329) | typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLu...
type __GLsync (line 346) | struct __GLsync
type khronos_uint64_t (line 347) | typedef khronos_uint64_t GLuint64;
type khronos_int64_t (line 348) | typedef khronos_int64_t GLint64;
type khronos_uint64_t (line 376) | typedef khronos_uint64_t GLuint64EXT;
type _cl_context (line 379) | struct _cl_context
type _cl_event (line 380) | struct _cl_event
type khronos_int64_t (line 402) | typedef khronos_int64_t GLint64EXT;
type GL3WglProc (line 430) | typedef GL3WglProc (*GL3WGetProcAddressProc)(const char *proc);
type PROC (line 579) | typedef PROC(__stdcall* GL3WglGetProcAddr)(LPCSTR);
function open_libgl (line 582) | static int open_libgl(void)
function close_libgl (line 591) | static void close_libgl(void) { FreeLibrary(libgl); }
function GL3WglProc (line 592) | static GL3WglProc get_proc(const char *proc)
function open_libgl (line 604) | static int open_libgl(void)
function close_libgl (line 612) | static void close_libgl(void) { dlclose(libgl); }
function GL3WglProc (line 614) | static GL3WglProc get_proc(const char *proc)
function open_libgl (line 626) | static int open_libgl(void)
function close_libgl (line 635) | static void close_libgl(void) { dlclose(libgl); }
function GL3WglProc (line 637) | static GL3WglProc get_proc(const char *proc)
function parse_version (line 649) | static int parse_version(void)
function imgl3wInit (line 662) | int imgl3wInit(void)
function imgl3wInit2 (line 671) | int imgl3wInit2(GL3WGetProcAddressProc proc)
function imgl3wIsSupported (line 677) | int imgl3wIsSupported(int major, int minor)
function GL3WglProc (line 686) | GL3WglProc imgl3wGetProcAddress(const char *proc) { return get_proc(proc...
function load_procs (line 747) | static void load_procs(GL3WGetProcAddressProc proc)
FILE: shadertoy/third_party/imgui/imgui/imgui_internal.h
type ImBitVector (line 113) | struct ImBitVector
type ImRect (line 114) | struct ImRect
type ImDrawDataBuilder (line 115) | struct ImDrawDataBuilder
type ImDrawListSharedData (line 116) | struct ImDrawListSharedData
type ImGuiColorMod (line 117) | struct ImGuiColorMod
type ImGuiContext (line 118) | struct ImGuiContext
type ImGuiContextHook (line 119) | struct ImGuiContextHook
type ImGuiDataTypeInfo (line 120) | struct ImGuiDataTypeInfo
type ImGuiGroupData (line 121) | struct ImGuiGroupData
type ImGuiInputTextState (line 122) | struct ImGuiInputTextState
type ImGuiLastItemData (line 123) | struct ImGuiLastItemData
type ImGuiMenuColumns (line 124) | struct ImGuiMenuColumns
type ImGuiNavItemData (line 125) | struct ImGuiNavItemData
type ImGuiMetricsConfig (line 126) | struct ImGuiMetricsConfig
type ImGuiNextWindowData (line 127) | struct ImGuiNextWindowData
type ImGuiNextItemData (line 128) | struct ImGuiNextItemData
type ImGuiOldColumnData (line 129) | struct ImGuiOldColumnData
type ImGuiOldColumns (line 130) | struct ImGuiOldColumns
type ImGuiPopupData (line 131) | struct ImGuiPopupData
type ImGuiSettingsHandler (line 132) | struct ImGuiSettingsHandler
type ImGuiStackSizes (line 133) | struct ImGuiStackSizes
type ImGuiStyleMod (line 134) | struct ImGuiStyleMod
type ImGuiTabBar (line 135) | struct ImGuiTabBar
type ImGuiTabItem (line 136) | struct ImGuiTabItem
type ImGuiTable (line 137) | struct ImGuiTable
type ImGuiTableColumn (line 138) | struct ImGuiTableColumn
type ImGuiTableTempData (line 139) | struct ImGuiTableTempData
type ImGuiTableSettings (line 140) | struct ImGuiTableSettings
type ImGuiTableColumnsSettings (line 141) | struct ImGuiTableColumnsSettings
type ImGuiWindow (line 142) | struct ImGuiWindow
type ImGuiWindowTempData (line 143) | struct ImGuiWindowTempData
type ImGuiWindowSettings (line 144) | struct ImGuiWindowSettings
type ImGuiLayoutType (line 147) | typedef int ImGuiLayoutType;
type ImGuiActivateFlags (line 148) | typedef int ImGuiActivateFlags;
type ImGuiItemFlags (line 149) | typedef int ImGuiItemFlags;
type ImGuiItemStatusFlags (line 150) | typedef int ImGuiItemStatusFlags;
type ImGuiOldColumnFlags (line 151) | typedef int ImGuiOldColumnFlags;
type ImGuiNavHighlightFlags (line 152) | typedef int ImGuiNavHighlightFlags;
type ImGuiNavDirSourceFlags (line 153) | typedef int ImGuiNavDirSourceFlags;
type ImGuiNavMoveFlags (line 154) | typedef int ImGuiNavMoveFlags;
type ImGuiNextItemDataFlags (line 155) | typedef int ImGuiNextItemDataFlags;
type ImGuiNextWindowDataFlags (line 156) | typedef int ImGuiNextWindowDataFlags;
type ImGuiScrollFlags (line 157) | typedef int ImGuiScrollFlags;
type ImGuiSeparatorFlags (line 158) | typedef int ImGuiSeparatorFlags;
type ImGuiTextFlags (line 159) | typedef int ImGuiTextFlags;
type ImGuiTooltipFlags (line 160) | typedef int ImGuiTooltipFlags;
function namespace (line 177) | namespace ImStb
function ImQsort (line 305) | static inline void ImQsort(void* base, size_t count, size_t size_of...
function ImIsPowerOfTwo (line 312) | static inline bool ImIsPowerOfTwo(int v) { return v != 0 ...
function ImIsPowerOfTwo (line 313) | static inline bool ImIsPowerOfTwo(ImU64 v) { return v != 0 ...
function ImUpperPowerOfTwo (line 314) | static inline int ImUpperPowerOfTwo(int v) { v--; v |= v >>...
function ImCharIsBlankA (line 335) | static inline bool ImCharIsBlankA(char c) { return c == ' ...
function ImCharIsBlankW (line 336) | static inline bool ImCharIsBlankW(unsigned int c) { return c == ' ...
function ImFileHandle (line 374) | static inline ImFileHandle ImFileOpen(const char*, const char*) ...
function ImFileClose (line 375) | static inline bool ImFileClose(ImFileHandle) ...
function ImU64 (line 376) | static inline ImU64 ImFileGetSize(ImFileHandle) ...
function ImU64 (line 377) | static inline ImU64 ImFileRead(void*, ImU64, ImU64, ImFileHandle...
function ImU64 (line 378) | static inline ImU64 ImFileWrite(const void*, ImU64, ImU64, ImFil...
type FILE (line 381) | typedef FILE* ImFileHandle;
function ImPow (line 406) | static inline float ImPow(float x, float y) { return powf(x, y); }
function ImPow (line 407) | static inline double ImPow(double x, double y) { return pow(x, y); }
function ImLog (line 408) | static inline float ImLog(float x) { return logf(x); }
function ImLog (line 409) | static inline double ImLog(double x) { return log(x); }
function ImAbs (line 410) | static inline int ImAbs(int x) { return x < 0 ? -x : x; }
function ImAbs (line 411) | static inline float ImAbs(float x) { return fabsf(x); }
function ImAbs (line 412) | static inline double ImAbs(double x) { return fabs(x); }
function ImSign (line 413) | static inline float ImSign(float x) { return (x < 0.0f) ? -1...
function ImSign (line 414) | static inline double ImSign(double x) { return (x < 0.0) ? -1....
function ImRsqrt (line 416) | static inline float ImRsqrt(float x) { return _mm_cvtss_f32(_...
function ImRsqrt (line 418) | static inline float ImRsqrt(float x) { return 1.0f / sqrtf(x); }
function ImRsqrt (line 420) | static inline double ImRsqrt(double x) { return 1.0 / sqrt(x); }
function T (line 424) | inline T ImMin(T lhs, T rhs) { return lhs < rhs ?...
function T (line 425) | inline T ImMax(T lhs, T rhs) { return lhs >= rhs ...
function T (line 426) | inline T ImClamp(T v, T mn, T mx) { return (v < mn) ? ...
function T (line 427) | inline T ImLerp(T a, T b, float t) { return (T)(a + (b ...
function ImSwap (line 428) | inline void ImSwap(T& a, T& b) { T tmp = a; a = b; ...
function T (line 429) | inline T ImAddClampOverflow(T a, T b, T mn, T mx) { if (b < 0 && (a < ...
function T (line 430) | inline T ImSubClampOverflow(T a, T b, T mn, T mx) { if (b > 0 && (a < ...
function ImVec2 (line 432) | static inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 433) | static inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 434) | static inline ImVec2 ImClamp(const ImVec2& v, const ImVec2& mn, ImVec2 m...
function ImVec2 (line 435) | static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, float t) ...
function ImVec2 (line 436) | static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVe...
function ImVec4 (line 437) | static inline ImVec4 ImLerp(const ImVec4& a, const ImVec4& b, float t) ...
function ImSaturate (line 438) | static inline float ImSaturate(float f) ...
function ImLengthSqr (line 439) | static inline float ImLengthSqr(const ImVec2& lhs) ...
function ImLengthSqr (line 440) | static inline float ImLengthSqr(const ImVec4& lhs) ...
function ImInvLength (line 441) | static inline float ImInvLength(const ImVec2& lhs, float fail_value) ...
function ImFloor (line 442) | static inline float ImFloor(float f) ...
function ImFloorSigned (line 443) | static inline float ImFloorSigned(float f) ...
function ImVec2 (line 444) | static inline ImVec2 ImFloor(const ImVec2& v) ...
function ImVec2 (line 445) | static inline ImVec2 ImFloorSigned(const ImVec2& v) ...
function ImModPositive (line 446) | static inline int ImModPositive(int a, int b) ...
function ImDot (line 447) | static inline float ImDot(const ImVec2& a, const ImVec2& b) ...
function ImVec2 (line 448) | static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a)...
function ImLinearSweep (line 449) | static inline float ImLinearSweep(float current, float target, float sp...
function ImVec2 (line 450) | static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) ...
function ImIsFloatAboveGuaranteedIntegerPrecision (line 451) | static inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) ...
function ImTriangleArea (line 463) | inline float ImTriangleArea(const ImVec2& a, const ImVec2& b, co...
function IM_MSVC_RUNTIME_CHECKS_OFF (line 468) | IM_MSVC_RUNTIME_CHECKS_OFF
function ImVec2ih (line 477) | struct ImVec2ih
function explicit (line 482) | explicit ImVec2ih(const ImVec2& rhs) { x = (short)rhs.x; y = (short)rhs....
function ImRect (line 487) | struct IMGUI_API ImRect
function Contains (line 506) | bool Contains(const ImVec2& p) const { return p.x >= Min....
function Contains (line 507) | bool Contains(const ImRect& r) const { return r.Min.x >= Min....
function Overlaps (line 508) | bool Overlaps(const ImRect& r) const { return r.Min.y < Max....
function Add (line 509) | void Add(const ImVec2& p) { if (Min.x > p.x) M...
function Add (line 510) | void Add(const ImRect& r) { if (Min.x > r.Min.x) M...
function Expand (line 511) | void Expand(const float amount) { Min.x -= amount; Min...
function Expand (line 512) | void Expand(const ImVec2& amount) { Min.x -= amount.x; Min...
function Translate (line 513) | void Translate(const ImVec2& d) { Min.x += d.x; Min.y +=...
function TranslateX (line 514) | void TranslateX(float dx) { Min.x += dx; Max.x += ...
function TranslateY (line 515) | void TranslateY(float dy) { Min.y += dy; Max.y += ...
function ClipWith (line 516) | void ClipWith(const ImRect& r) { Min = ImMax(Min, r.Min...
function ClipWithFull (line 517) | void ClipWithFull(const ImRect& r) { Min = ImClamp(Min, r.M...
function Floor (line 518) | void Floor() { Min.x = IM_FLOOR(Min.x...
function IM_MSVC_RUNTIME_CHECKS_RESTORE (line 522) | IM_MSVC_RUNTIME_CHECKS_RESTORE
function ImBitArrayClearBit (line 526) | inline void ImBitArrayClearBit(ImU32* arr, int n) { ImU32 ...
function ImBitArraySetBit (line 527) | inline void ImBitArraySetBit(ImU32* arr, int n) { ImU32 ...
function ImBitArraySetBitRange (line 528) | inline void ImBitArraySetBitRange(ImU32* arr, int n, int n2) // Work...
function IMGUI_API (line 544) | IMGUI_API ImBitArray
function ImBitVector (line 559) | struct IMGUI_API ImBitVector
function set (line 582) | inline void set(T* data, int size) { Data = data; DataEnd =...
function set (line 583) | inline void set(T* data, T* data_end) { Data = data; DataEnd =...
function T (line 586) | inline T& operator[](int i) { T* p = Data + i; IM_AS...
function T (line 587) | inline const T& operator[](int i) const { const T* p = Data + i;...
function T (line 589) | inline T* begin() { return Data; }
function T (line 590) | inline const T* begin() const { return Data; }
function T (line 591) | inline T* end() { return DataEnd; }
function T (line 592) | inline const T* end() const { return DataEnd; }
function index_from_ptr (line 595) | inline int index_from_ptr(const T* it) const { IM_ASSERT(it >= Data &...
function GetArenaSizeInBytes (line 612) | inline int GetArenaSizeInBytes() { return CurrOff; }
function SetArenaBasePtr (line 613) | inline void SetArenaBasePtr(void* base_ptr) { BasePtr = (char*)base_...
function GetSpan (line 617) | void GetSpan(int n, ImSpan<T>* span) { span->set((T*)GetSpanPtrBegin...
type ImPoolIdx (line 623) | typedef int ImPoolIdx;
function IMGUI_API (line 625) | IMGUI_API ImPool
function IMGUI_API (line 662) | IMGUI_API ImChunkStream
function ImDrawListSharedData (line 712) | struct IMGUI_API ImDrawListSharedData
function ClearFreeMemory (line 732) | struct ImDrawDataBuilder
function GetDrawListCount (line 738) | int GetDrawListCount() const { int count = 0; for (int n = 0; n < IM_...
function ImGuiComboPreviewData (line 948) | struct IMGUI_API ImGuiComboPreviewData
function ImGuiGroupData (line 961) | struct IMGUI_API ImGuiGroupData
function ImGuiMenuColumns (line 977) | struct IMGUI_API ImGuiMenuColumns
function ImGuiInputTextState (line 996) | struct IMGUI_API ImGuiInputTextState
type ImGuiPopupData (line 1032) | struct ImGuiPopupData
type ImGuiNextItemDataFlags_ (line 1081) | enum ImGuiNextItemDataFlags_
function ClearFlags (line 1088) | struct ImGuiNextItemData
type ImGuiLastItemData (line 1101) | struct ImGuiLastItemData
function ImGuiStackSizes (line 1113) | struct IMGUI_API ImGuiStackSizes
type ImGuiWindowStackData (line 1131) | struct ImGuiWindowStackData
type ImGuiShrinkWidthItem (line 1138) | struct ImGuiShrinkWidthItem
function ImGuiPtrOrIndex (line 1144) | struct ImGuiPtrOrIndex
type ImGuiKeyPrivate_ (line 1159) | enum ImGuiKeyPrivate_
type ImGuiKeyModFlags_ (line 1168) | enum ImGuiKeyModFlags_
type ImGuiInputEventType (line 1177) | enum ImGuiInputEventType
type ImGuiInputSource (line 1189) | enum ImGuiInputSource
type ImGuiInputEventMousePos (line 1202) | struct ImGuiInputEventMousePos { float PosX, PosY; }
type ImGuiInputEventMouseWheel (line 1203) | struct ImGuiInputEventMouseWheel { float WheelX, WheelY; }
type ImGuiInputEventMouseButton (line 1204) | struct ImGuiInputEventMouseButton { int Button; bool Down; }
type ImGuiInputEventKey (line 1205) | struct ImGuiInputEventKey { ImGuiKey Key; bool Down; float Ana...
type ImGuiInputEventText (line 1206) | struct ImGuiInputEventText { unsigned int Char; }
type ImGuiInputEventAppFocused (line 1207) | struct ImGuiInputEventAppFocused { bool Focused; }
type ImGuiInputEvent (line 1209) | struct ImGuiInputEvent
type ImGuiInputReadMode (line 1228) | enum ImGuiInputReadMode
function FromPositions (line 1242) | struct ImGuiListClipperRange
function Reset (line 1255) | struct ImGuiListClipperData
type ImGuiActivateFlags_ (line 1271) | enum ImGuiActivateFlags_
type ImGuiScrollFlags_ (line 1280) | enum ImGuiScrollFlags_
type ImGuiNavHighlightFlags_ (line 1294) | enum ImGuiNavHighlightFlags_
type ImGuiNavDirSourceFlags_ (line 1303) | enum ImGuiNavDirSourceFlags_
type ImGuiNavMoveFlags_ (line 1312) | enum ImGuiNavMoveFlags_
type ImGuiNavLayer (line 1330) | enum ImGuiNavLayer
function Clear (line 1337) | struct ImGuiNavItemData
type ImGuiOldColumnFlags_ (line 1357) | enum ImGuiOldColumnFlags_
type ImGuiOldColumnData (line 1377) | struct ImGuiOldColumnData
type ImGuiOldColumns (line 1387) | struct ImGuiOldColumns
function ImGuiViewport (line 1430) | struct ImGuiViewportP : public ImGuiViewport
type ImGuiWindowSettings (line 1463) | struct ImGuiWindowSettings
type ImGuiSettingsHandler (line 1475) | struct ImGuiSettingsHandler
type ImGuiStackLevelInfo (line 1518) | struct ImGuiStackLevelInfo
type ImGuiStackTool (line 1529) | struct ImGuiStackTool
type ImGuiContextHookType (line 1544) | enum ImGuiContextHookType { ImGuiContextHookType_NewFramePre, ImGuiConte...
type ImGuiContextHook (line 1546) | struct ImGuiContextHook
type ImGuiContext (line 1561) | struct ImGuiContext
function ImGuiWindowTempData (line 1974) | struct IMGUI_API ImGuiWindowTempData
function ImGuiWindow (line 2021) | struct IMGUI_API ImGuiWindow
type ImGuiTabBarFlagsPrivate_ (line 2142) | enum ImGuiTabBarFlagsPrivate_
type ImGuiTabItemFlagsPrivate_ (line 2150) | enum ImGuiTabItemFlagsPrivate_
type ImGuiTabItem (line 2158) | struct ImGuiTabItem
function ImGuiTabBar (line 2176) | struct IMGUI_API ImGuiTabBar
type ImS8 (line 2228) | typedef ImS8 ImGuiTableColumnIdx;
type ImU8 (line 2229) | typedef ImU8 ImGuiTableDrawChannelIdx;
type ImGuiTableCellData (line 2294) | struct ImGuiTableCellData
function ImGuiTable (line 2301) | struct IMGUI_API ImGuiTable
function ImGuiTableTempData (line 2414) | struct IMGUI_API ImGuiTableTempData
type ImGuiTableSettings (line 2459) | struct ImGuiTableSettings
function namespace (line 2477) | namespace ImGui
function DebugStartItemPicker (line 2861) | inline void DebugStartItemPicker() ...
type ImFontBuilderIO (line 2888) | struct ImFontBuilderIO
FILE: shadertoy/third_party/imgui/imgui/imgui_tables.cpp
function ImGuiTableFlags (line 264) | inline ImGuiTableFlags TableFixFlags(ImGuiTableFlags flags, ImGuiWindow*...
function ImGuiTable (line 297) | ImGuiTable* ImGui::TableFindByID(ImGuiID id)
function TableSetupColumnFlags (line 655) | static void TableSetupColumnFlags(ImGuiTable* table, ImGuiTableColumn* c...
function ImGuiTableColumnFlags (line 1557) | ImGuiTableColumnFlags ImGui::TableGetColumnFlags(int column_n)
function ImRect (line 1576) | ImRect ImGui::TableGetCellBgRect(const ImGuiTable* table, int column_n)
function ImGuiID (line 1591) | ImGuiID ImGui::TableGetColumnResizeID(const ImGuiTable* table, int colum...
type MergeGroup (line 2336) | struct MergeGroup
method MergeGroup (line 2342) | MergeGroup() { ChannelsCount = 0; }
function ImGuiTableSortSpecs (line 2604) | ImGuiTableSortSpecs* ImGui::TableGetSortSpecs()
function ImGuiSortDirection (line 2622) | static inline ImGuiSortDirection TableGetColumnAvailSortDirection(ImGuiT...
function ImGuiSortDirection (line 2641) | ImGuiSortDirection ImGui::TableGetColumnNextSortDirection(ImGuiTableColu...
function TableSettingsInit (line 3143) | static void TableSettingsInit(ImGuiTableSettings* settings, ImGuiID id, ...
function TableSettingsCalcChunkSize (line 3155) | static size_t TableSettingsCalcChunkSize(int columns_count)
function ImGuiTableSettings (line 3160) | ImGuiTableSettings* ImGui::TableSettingsCreate(ImGuiID id, int columns_c...
function ImGuiTableSettings (line 3169) | ImGuiTableSettings* ImGui::TableSettingsFindByID(ImGuiID id)
function ImGuiTableSettings (line 3180) | ImGuiTableSettings* ImGui::TableGetBoundSettings(ImGuiTable* table)
function TableSettingsHandler_ClearAll (line 3323) | static void TableSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettin...
function TableSettingsHandler_ApplyAll (line 3333) | static void TableSettingsHandler_ApplyAll(ImGuiContext* ctx, ImGuiSettin...
function TableSettingsHandler_ReadLine (line 3363) | static void TableSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHa...
function TableSettingsHandler_WriteAll (line 3389) | static void TableSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSettin...
function GetDraggedColumnOffset (line 3671) | static float GetDraggedColumnOffset(ImGuiOldColumns* columns, int column...
function GetColumnWidthEx (line 3704) | static float GetColumnWidthEx(ImGuiOldColumns* columns, int column_index...
function ImGuiOldColumns (line 3800) | ImGuiOldColumns* ImGui::FindOrCreateColumns(ImGuiWindow* window, ImGuiID...
function ImGuiID (line 3813) | ImGuiID ImGui::GetColumnsID(const char* str_id, int columns_count)
FILE: shadertoy/third_party/imgui/imgui/imgui_widgets.cpp
function ImGuiID (line 854) | ImGuiID ImGui::GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis)
function ImRect (line 860) | ImRect ImGui::GetWindowScrollbarRect(ImGuiWindow* window, ImGuiAxis axis)
function CalcMaxPopupHeightFromItemCount (line 1563) | static float CalcMaxPopupHeightFromItemCount(int items_count)
function Items_ArrayGetter (line 1762) | static bool Items_ArrayGetter(void* data, int idx, const char** out_text)
function Items_SingleStringGetter (line 1771) | static bool Items_SingleStringGetter(void* data, int idx, const char** o...
function ImGuiDataTypeInfo (line 1914) | const ImGuiDataTypeInfo* ImGui::DataTypeGetInfo(ImGuiDataType data_type)
function DataTypeCompareT (line 2040) | static int DataTypeCompareT(const T* lhs, const T* rhs)
function DataTypeClampT (line 2068) | static bool DataTypeClampT(T* v, const T* v_min, const T* v_max)
function GetMinimumStepAtDecimalPrecision (line 2096) | static float GetMinimumStepAtDecimalPrecision(int decimal_precision)
function SanitizeFormatString (line 2120) | static void SanitizeFormatString(const char* fmt, char* fmt_out, size_t ...
function TYPE (line 2135) | TYPE ImGui::RoundScalarWithFormatT(const char* format, ImGuiDataType dat...
function TYPE (line 2671) | TYPE ImGui::ScaleValueFromRatioT(ImGuiDataType data_type, float t, TYPE ...
function ImParseFormatPrecision (line 3284) | int ImParseFormatPrecision(const char* fmt, int default_precision)
function InputTextCalcTextLenAndLineCount (line 3552) | static int InputTextCalcTextLenAndLineCount(const char* text_begin, cons...
function ImVec2 (line 3566) | static ImVec2 InputTextCalcTextSizeW(const ImWchar* text_begin, const Im...
type ImStb (line 3612) | namespace ImStb
function STB_TEXTEDIT_STRINGLEN (line 3615) | static int STB_TEXTEDIT_STRINGLEN(const ImGuiInputTextState* obj) ...
function ImWchar (line 3616) | static ImWchar STB_TEXTEDIT_GETCHAR(const ImGuiInputTextState* obj, in...
function STB_TEXTEDIT_GETWIDTH (line 3617) | static float STB_TEXTEDIT_GETWIDTH(ImGuiInputTextState* obj, int lin...
function STB_TEXTEDIT_KEYTOTEXT (line 3618) | static int STB_TEXTEDIT_KEYTOTEXT(int key) ...
function STB_TEXTEDIT_LAYOUTROW (line 3620) | static void STB_TEXTEDIT_LAYOUTROW(StbTexteditRow* r, ImGuiInputTex...
function is_separator (line 3634) | static bool is_separator(unsigned int c) ...
function is_word_boundary_from_right (line 3635) | static int is_word_boundary_from_right(ImGuiInputTextState* obj, int ...
function is_word_boundary_from_left (line 3636) | static int is_word_boundary_from_left(ImGuiInputTextState* obj, int i...
function STB_TEXTEDIT_MOVEWORDLEFT_IMPL (line 3637) | static int STB_TEXTEDIT_MOVEWORDLEFT_IMPL(ImGuiInputTextState* obj, i...
function STB_TEXTEDIT_MOVEWORDRIGHT_MAC (line 3638) | static int STB_TEXTEDIT_MOVEWORDRIGHT_MAC(ImGuiInputTextState* obj, i...
function STB_TEXTEDIT_MOVEWORDRIGHT_WIN (line 3643) | static int STB_TEXTEDIT_MOVEWORDRIGHT_WIN(ImGuiInputTextState* obj, i...
function STB_TEXTEDIT_DELETECHARS (line 3647) | static void STB_TEXTEDIT_DELETECHARS(ImGuiInputTextState* obj, int pos...
function STB_TEXTEDIT_INSERTCHARS (line 3663) | static bool STB_TEXTEDIT_INSERTCHARS(ImGuiInputTextState* obj, int pos...
function stb_textedit_replace (line 3719) | static void stb_textedit_replace(ImGuiInputTextState* str, STB_Textedi...
function InputTextFilterCharacter (line 3802) | static bool InputTextFilterCharacter(unsigned int* p_char, ImGuiInputTex...
function ColorEditRestoreHS (line 4800) | static void ColorEditRestoreHS(const float* col, float* H, float* S, flo...
function RenderArrowsForVerticalBar (line 5069) | static void RenderArrowsForVerticalBar(ImDrawList* draw_list, ImVec2 pos...
type ImGuiPlotArrayGetterData (line 6547) | struct ImGuiPlotArrayGetterData
method ImGuiPlotArrayGetterData (line 6552) | ImGuiPlotArrayGetterData(const float* values, int stride) { Values = v...
function Plot_ArrayGetter (line 6555) | static float Plot_ArrayGetter(void* data, int idx)
function IsRootOfOpenMenuSet (line 6822) | static bool IsRootOfOpenMenuSet()
type ImGuiTabBarSection (line 7145) | struct ImGuiTabBarSection
method ImGuiTabBarSection (line 7151) | ImGuiTabBarSection() { memset(this, 0, sizeof(*this)); }
type ImGui (line 7154) | namespace ImGui
function TabItemGetSectionIdx (line 7172) | static inline int TabItemGetSectionIdx(const ImGuiTabItem* tab)
function ImGuiTabBar (line 7195) | static ImGuiTabBar* GetTabBarFromTabBarRef(const ImGuiPtrOrIndex& ref)
function ImGuiPtrOrIndex (line 7201) | static ImGuiPtrOrIndex GetTabBarRefFromTabBar(ImGuiTabBar* tab_bar)
function ImU32 (line 7552) | static ImU32 ImGui::TabBarCalcTabID(ImGuiTabBar* tab_bar, const char* ...
function ImGuiTabItem (line 7573) | ImGuiTabItem* ImGui::TabBarFindTabByID(ImGuiTabBar* tab_bar, ImGuiID tab...
function ImGuiTabItem (line 7731) | static ImGuiTabItem* ImGui::TabBarScrollingButtons(ImGuiTabBar* tab_bar)
function ImGuiTabItem (line 7792) | static ImGuiTabItem* ImGui::TabBarTabListPopupButton(ImGuiTabBar* tab_bar)
function ImVec2 (line 8129) | ImVec2 ImGui::TabItemCalcSize(const char* label, bool has_close_button)
FILE: shadertoy/third_party/imgui/imgui/imstb_rectpack.h
type stbrp_context (line 80) | typedef struct stbrp_context stbrp_context;
type stbrp_node (line 81) | typedef struct stbrp_node stbrp_node;
type stbrp_rect (line 82) | typedef struct stbrp_rect stbrp_rect;
type stbrp_coord (line 85) | typedef int stbrp_coord;
type stbrp_coord (line 87) | typedef unsigned short stbrp_coord;
type stbrp_rect (line 115) | struct stbrp_rect
type stbrp_node (line 175) | struct stbrp_node
type stbrp_context (line 181) | struct stbrp_context
function STBRP_DEF (line 230) | STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
function STBRP_DEF (line 242) | STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int ...
function STBRP_DEF (line 262) | STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int ...
function stbrp__skyline_find_min_y (line 295) | static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first...
type stbrp__findresult (line 345) | typedef struct
function stbrp__findresult (line 351) | static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, ...
function stbrp__findresult (line 453) | static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *co...
function rect_height_compare (line 533) | static int STBRP__CDECL rect_height_compare(const void *a, const void *b)
function rect_original_order (line 545) | static int STBRP__CDECL rect_original_order(const void *a, const void *b)
function STBRP_DEF (line 558) | STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects...
FILE: shadertoy/third_party/imgui/imgui/imstb_textedit.h
type StbUndoRecord (line 299) | typedef struct
type StbUndoState (line 308) | typedef struct
type STB_TexteditState (line 317) | typedef struct
type StbTexteditRow (line 364) | typedef struct
function stb_text_locate_coord (line 398) | static int stb_text_locate_coord(STB_TEXTEDIT_STRING *str, float x, floa...
function stb_textedit_click (line 458) | static void stb_textedit_click(STB_TEXTEDIT_STRING *str, STB_TexteditSta...
function stb_textedit_drag (line 476) | static void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditStat...
type StbFindState (line 508) | typedef struct
function stb_textedit_find_charpos (line 518) | static void stb_textedit_find_charpos(StbFindState *find, STB_TEXTEDIT_S...
function stb_textedit_clamp (line 577) | static void stb_textedit_clamp(STB_TEXTEDIT_STRING *str, STB_TexteditSta...
function stb_textedit_delete (line 591) | static void stb_textedit_delete(STB_TEXTEDIT_STRING *str, STB_TexteditSt...
function stb_textedit_delete_selection (line 599) | static void stb_textedit_delete_selection(STB_TEXTEDIT_STRING *str, STB_...
function stb_textedit_sortselection (line 615) | static void stb_textedit_sortselection(STB_TexteditState *state)
function stb_textedit_move_to_first (line 625) | static void stb_textedit_move_to_first(STB_TexteditState *state)
function stb_textedit_move_to_last (line 636) | static void stb_textedit_move_to_last(STB_TEXTEDIT_STRING *str, STB_Text...
function is_word_boundary (line 648) | static int is_word_boundary( STB_TEXTEDIT_STRING *str, int idx )
function stb_textedit_move_to_word_previous (line 654) | static int stb_textedit_move_to_word_previous( STB_TEXTEDIT_STRING *str,...
function stb_textedit_move_to_word_next (line 669) | static int stb_textedit_move_to_word_next( STB_TEXTEDIT_STRING *str, int...
function stb_textedit_prep_selection_at_cursor (line 687) | static void stb_textedit_prep_selection_at_cursor(STB_TexteditState *state)
function stb_textedit_cut (line 696) | static int stb_textedit_cut(STB_TEXTEDIT_STRING *str, STB_TexteditState ...
function stb_textedit_paste_internal (line 707) | static int stb_textedit_paste_internal(STB_TEXTEDIT_STRING *str, STB_Tex...
function stb_textedit_key (line 732) | static void stb_textedit_key(STB_TEXTEDIT_STRING *str, STB_TexteditState...
function stb_textedit_flush_redo (line 1122) | static void stb_textedit_flush_redo(StbUndoState *state)
function stb_textedit_discard_undo (line 1129) | static void stb_textedit_discard_undo(StbUndoState *state)
function stb_textedit_discard_redo (line 1151) | static void stb_textedit_discard_redo(StbUndoState *state)
function StbUndoRecord (line 1181) | static StbUndoRecord *stb_text_create_undo_record(StbUndoState *state, i...
function STB_TEXTEDIT_CHARTYPE (line 1205) | static STB_TEXTEDIT_CHARTYPE *stb_text_createundo(StbUndoState *state, i...
function stb_text_undo (line 1225) | static void stb_text_undo(STB_TEXTEDIT_STRING *str, STB_TexteditState *s...
function stb_text_redo (line 1293) | static void stb_text_redo(STB_TEXTEDIT_STRING *str, STB_TexteditState *s...
function stb_text_makeundo_insert (line 1344) | static void stb_text_makeundo_insert(STB_TexteditState *state, int where...
function stb_text_makeundo_delete (line 1349) | static void stb_text_makeundo_delete(STB_TEXTEDIT_STRING *str, STB_Texte...
function stb_text_makeundo_replace (line 1359) | static void stb_text_makeundo_replace(STB_TEXTEDIT_STRING *str, STB_Text...
function stb_textedit_clear_state (line 1370) | static void stb_textedit_clear_state(STB_TexteditState *state, int is_si...
function stb_textedit_initialize_state (line 1388) | static void stb_textedit_initialize_state(STB_TexteditState *state, int ...
function stb_textedit_paste (line 1398) | static int stb_textedit_paste(STB_TEXTEDIT_STRING *str, STB_TexteditStat...
FILE: shadertoy/third_party/imgui/imgui/imstb_truetype.h
function my_stbtt_initfont (line 290) | void my_stbtt_initfont(void)
function my_stbtt_print (line 302) | void my_stbtt_print(float x, float y, char *text)
function main (line 335) | int main(int argc, char **argv)
function main (line 376) | int main(int arg, char **argv)
type stbtt_uint8 (line 429) | typedef unsigned char stbtt_uint8;
type stbtt_int8 (line 430) | typedef signed char stbtt_int8;
type stbtt_uint16 (line 431) | typedef unsigned short stbtt_uint16;
type stbtt_int16 (line 432) | typedef signed short stbtt_int16;
type stbtt_uint32 (line 433) | typedef unsigned int stbtt_uint32;
type stbtt_int32 (line 434) | typedef signed int stbtt_int32;
type stbtt__buf (line 514) | typedef struct
type stbtt_bakedchar (line 528) | typedef struct
type stbtt_aligned_quad (line 544) | typedef struct
type stbtt_packedchar (line 576) | typedef struct
type stbtt_pack_context (line 583) | typedef struct stbtt_pack_context stbtt_pack_context;
type stbtt_fontinfo (line 584) | typedef struct stbtt_fontinfo stbtt_fontinfo;
type stbrp_rect (line 586) | typedef struct stbrp_rect stbrp_rect;
type stbtt_pack_range (line 620) | typedef struct
type stbtt_pack_context (line 679) | struct stbtt_pack_context {
type stbtt_fontinfo (line 714) | struct stbtt_fontinfo
type stbtt_vertex (line 824) | typedef struct
type stbtt__bitmap (line 907) | typedef struct
function stbtt_uint8 (line 1116) | static stbtt_uint8 stbtt__buf_get8(stbtt__buf *b)
function stbtt_uint8 (line 1123) | static stbtt_uint8 stbtt__buf_peek8(stbtt__buf *b)
function stbtt__buf_seek (line 1130) | static void stbtt__buf_seek(stbtt__buf *b, int o)
function stbtt__buf_skip (line 1136) | static void stbtt__buf_skip(stbtt__buf *b, int o)
function stbtt_uint32 (line 1141) | static stbtt_uint32 stbtt__buf_get(stbtt__buf *b, int n)
function stbtt__buf (line 1151) | static stbtt__buf stbtt__new_buf(const void *p, size_t size)
function stbtt__buf (line 1164) | static stbtt__buf stbtt__buf_range(const stbtt__buf *b, int o, int s)
function stbtt__buf (line 1173) | static stbtt__buf stbtt__cff_get_index(stbtt__buf *b)
function stbtt_uint32 (line 1187) | static stbtt_uint32 stbtt__cff_int(stbtt__buf *b)
function stbtt__cff_skip_operand (line 1199) | static void stbtt__cff_skip_operand(stbtt__buf *b) {
function stbtt__buf (line 1214) | static stbtt__buf stbtt__dict_get(stbtt__buf *b, int key)
function stbtt__dict_get_ints (line 1229) | static void stbtt__dict_get_ints(stbtt__buf *b, int key, int outcount, s...
function stbtt__cff_index_count (line 1237) | static int stbtt__cff_index_count(stbtt__buf *b)
function stbtt__buf (line 1243) | static stbtt__buf stbtt__cff_index_get(stbtt__buf b, int i)
function stbtt_uint16 (line 1269) | static stbtt_uint16 ttUSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; }
function stbtt_int16 (line 1270) | static stbtt_int16 ttSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; }
function stbtt_uint32 (line 1271) | static stbtt_uint32 ttULONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]...
function stbtt_int32 (line 1272) | static stbtt_int32 ttLONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]...
function stbtt__isfont (line 1277) | static int stbtt__isfont(stbtt_uint8 *font)
function stbtt_uint32 (line 1289) | static stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fo...
function stbtt_GetFontOffsetForIndex_internal (line 1302) | static int stbtt_GetFontOffsetForIndex_internal(unsigned char *font_coll...
function stbtt_GetNumberOfFonts_internal (line 1321) | static int stbtt_GetNumberOfFonts_internal(unsigned char *font_collection)
function stbtt__buf (line 1337) | static stbtt__buf stbtt__get_subrs(stbtt__buf cff, stbtt__buf fontdict)
function stbtt_InitFont_internal (line 1350) | static int stbtt_InitFont_internal(stbtt_fontinfo *info, unsigned char *...
function STBTT_DEF (line 1461) | STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unico...
function STBTT_DEF (line 1554) | STBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo *info, int un...
function stbtt_setvertex (line 1559) | static void stbtt_setvertex(stbtt_vertex *v, stbtt_uint8 type, stbtt_int...
function stbtt__GetGlyfOffset (line 1568) | static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_in...
function STBTT_DEF (line 1590) | STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_in...
function STBTT_DEF (line 1606) | STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int code...
function STBTT_DEF (line 1611) | STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_i...
function stbtt__close_shape (line 1623) | static int stbtt__close_shape(stbtt_vertex *vertices, int num_vertices, ...
function stbtt__GetGlyphShapeTT (line 1639) | static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_...
type stbtt__csctx (line 1865) | typedef struct
function stbtt__track_vertex (line 1879) | static void stbtt__track_vertex(stbtt__csctx *c, stbtt_int32 x, stbtt_in...
function stbtt__csctx_v (line 1888) | static void stbtt__csctx_v(stbtt__csctx *c, stbtt_uint8 type, stbtt_int3...
function stbtt__csctx_close_shape (line 1904) | static void stbtt__csctx_close_shape(stbtt__csctx *ctx)
function stbtt__csctx_rmove_to (line 1910) | static void stbtt__csctx_rmove_to(stbtt__csctx *ctx, float dx, float dy)
function stbtt__csctx_rline_to (line 1918) | static void stbtt__csctx_rline_to(stbtt__csctx *ctx, float dx, float dy)
function stbtt__csctx_rccurve_to (line 1925) | static void stbtt__csctx_rccurve_to(stbtt__csctx *ctx, float dx1, float ...
function stbtt__buf (line 1936) | static stbtt__buf stbtt__get_subr(stbtt__buf idx, int n)
function stbtt__buf (line 1950) | static stbtt__buf stbtt__cid_get_glyph_subrs(const stbtt_fontinfo *info,...
function stbtt__run_charstring (line 1978) | static int stbtt__run_charstring(const stbtt_fontinfo *info, int glyph_i...
function stbtt__GetGlyphShapeT2 (line 2237) | static int stbtt__GetGlyphShapeT2(const stbtt_fontinfo *info, int glyph_...
function stbtt__GetGlyphInfoT2 (line 2254) | static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_i...
function STBTT_DEF (line 2265) | STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_...
function STBTT_DEF (line 2273) | STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int gl...
function stbtt__GetGlyphKernInfoAdvance (line 2285) | static int stbtt__GetGlyphKernInfoAdvance(const stbtt_fontinfo *info, i...
function stbtt_int32 (line 2315) | static stbtt_int32 stbtt__GetCoverageIndex(stbtt_uint8 *coverageTable, ...
function stbtt_int32 (line 2374) | static stbtt_int32 stbtt__GetGlyphClass(stbtt_uint8 *classDefTable, int...
function stbtt_int32 (line 2428) | static stbtt_int32 stbtt__GetGlyphGPOSInfoAdvance(const stbtt_fontinfo ...
function STBTT_DEF (line 2556) | STBTT_DEF int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int...
function STBTT_DEF (line 2569) | STBTT_DEF int stbtt_GetCodepointKernAdvance(const stbtt_fontinfo *info,...
function STBTT_DEF (line 2576) | STBTT_DEF void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, in...
function STBTT_DEF (line 2581) | STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *as...
function STBTT_DEF (line 2588) | STBTT_DEF int stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int ...
function STBTT_DEF (line 2599) | STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int ...
function STBTT_DEF (line 2607) | STBTT_DEF float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, fl...
function STBTT_DEF (line 2613) | STBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *in...
function STBTT_DEF (line 2619) | STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *v)
function STBTT_DEF (line 2629) | STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *fon...
function STBTT_DEF (line 2647) | STBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int g...
function STBTT_DEF (line 2652) | STBTT_DEF void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo ...
function STBTT_DEF (line 2657) | STBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, i...
type stbtt__hheap_chunk (line 2666) | typedef struct stbtt__hheap_chunk
type stbtt__hheap (line 2671) | typedef struct stbtt__hheap
function stbtt__hheap_free (line 2699) | static void stbtt__hheap_free(stbtt__hheap *hh, void *p)
function stbtt__hheap_cleanup (line 2705) | static void stbtt__hheap_cleanup(stbtt__hheap *hh, void *userdata)
type stbtt__edge (line 2715) | typedef struct stbtt__edge {
type stbtt__active_edge (line 2721) | typedef struct stbtt__active_edge
function stbtt__active_edge (line 2743) | static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__ed...
function stbtt__active_edge (line 2765) | static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__ed...
function stbtt__fill_active_edges (line 2790) | static void stbtt__fill_active_edges(unsigned char *scanline, int len, s...
function stbtt__rasterize_sorted_edges (line 2832) | static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__...
function stbtt__handle_clipped_edge (line 2936) | static void stbtt__handle_clipped_edge(float *scanline, int x, stbtt__ac...
function stbtt__fill_active_edges_new (line 2973) | static void stbtt__fill_active_edges_new(float *scanline, float *scanlin...
function stbtt__rasterize_sorted_edges (line 3137) | static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__...
function stbtt__sort_edges_ins_sort (line 3239) | static void stbtt__sort_edges_ins_sort(stbtt__edge *p, int n)
function stbtt__sort_edges_quicksort (line 3257) | static void stbtt__sort_edges_quicksort(stbtt__edge *p, int n)
function stbtt__sort_edges (line 3319) | static void stbtt__sort_edges(stbtt__edge *p, int n)
type stbtt__point (line 3325) | typedef struct
function stbtt__rasterize (line 3330) | static void stbtt__rasterize(stbtt__bitmap *result, stbtt__point *pts, i...
function stbtt__add_point (line 3387) | static void stbtt__add_point(stbtt__point *points, int n, float x, float y)
function stbtt__tesselate_curve (line 3395) | static int stbtt__tesselate_curve(stbtt__point *points, int *num_points,...
function stbtt__tesselate_cubic (line 3415) | static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points...
function stbtt__point (line 3458) | static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num...
function STBTT_DEF (line 3535) | STBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result, float flatness_in_...
function STBTT_DEF (line 3548) | STBTT_DEF void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata)
function STBTT_DEF (line 3598) | STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info,...
function STBTT_DEF (line 3617) | STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigne...
function STBTT_DEF (line 3627) | STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fo...
function STBTT_DEF (line 3632) | STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *i...
function STBTT_DEF (line 3642) | STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, uns...
function stbtt_BakeFontBitmap_internal (line 3653) | static int stbtt_BakeFontBitmap_internal(unsigned char *data, int offset...
function STBTT_DEF (line 3699) | STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int p...
type stbrp_coord (line 3727) | typedef int stbrp_coord;
type stbrp_context (line 3740) | typedef struct
type stbrp_node (line 3746) | typedef struct
type stbrp_rect (line 3751) | struct stbrp_rect
function stbrp_init_target (line 3757) | static void stbrp_init_target(stbrp_context *con, int pw, int ph, stbrp_...
function stbrp_pack_rects (line 3768) | static void stbrp_pack_rects(stbrp_context *con, stbrp_rect *rects, int ...
function STBTT_DEF (line 3797) | STBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pi...
function STBTT_DEF (line 3829) | STBTT_DEF void stbtt_PackEnd (stbtt_pack_context *spc)
function STBTT_DEF (line 3835) | STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsign...
function STBTT_DEF (line 3845) | STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *sp...
function stbtt__h_prefilter (line 3852) | static void stbtt__h_prefilter(unsigned char *pixels, int w, int h, int ...
function stbtt__v_prefilter (line 3914) | static void stbtt__v_prefilter(unsigned char *pixels, int w, int h, int ...
function stbtt__oversample_shift (line 3976) | static float stbtt__oversample_shift(int oversample)
function STBTT_DEF (line 3989) | STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, c...
function STBTT_DEF (line 4021) | STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontin...
function STBTT_DEF (line 4045) | STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *sp...
function STBTT_DEF (line 4127) | STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, st...
function STBTT_DEF (line 4132) | STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsign...
function STBTT_DEF (line 4168) | STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigne...
function STBTT_DEF (line 4180) | STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata...
function STBTT_DEF (line 4193) | STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int...
function stbtt__ray_intersect_bezier (line 4228) | static int stbtt__ray_intersect_bezier(float orig[2], float ray[2], floa...
function equal (line 4292) | static int equal(float *a, float *b)
function stbtt__compute_crossings_x (line 4297) | static int stbtt__compute_crossings_x(float x, float y, int nverts, stbt...
function stbtt__cuberoot (line 4366) | static float stbtt__cuberoot( float x )
function stbtt__solve_cubic (line 4375) | static int stbtt__solve_cubic(float a, float b, float c, float* r)
function STBTT_DEF (line 4597) | STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata)
function stbtt_int32 (line 4608) | static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint...
function stbtt_CompareUTF8toUTF16_bigendian_internal (line 4647) | static int stbtt_CompareUTF8toUTF16_bigendian_internal(char *s1, int len...
function STBTT_DEF (line 4654) | STBTT_DEF const char *stbtt_GetFontNameString(const stbtt_fontinfo *font...
function stbtt__matchpair (line 4675) | static int stbtt__matchpair(stbtt_uint8 *fc, stbtt_uint32 nm, stbtt_uint...
function stbtt__matches (line 4722) | static int stbtt__matches(stbtt_uint8 *fc, stbtt_uint32 offset, stbtt_ui...
function stbtt_FindMatchingFont_internal (line 4751) | static int stbtt_FindMatchingFont_internal(unsigned char *font_collectio...
function STBTT_DEF (line 4767) | STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset,
function STBTT_DEF (line 4774) | STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int...
function STBTT_DEF (line 4779) | STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data)
function STBTT_DEF (line 4784) | STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *...
function STBTT_DEF (line 4789) | STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, cons...
function STBTT_DEF (line 4794) | STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len...
FILE: shadertoy/third_party/stb/include/stb/stb_image.h
type stbi_uc (line 384) | typedef unsigned char stbi_uc;
type stbi_us (line 385) | typedef unsigned short stbi_us;
type stbi_io_callbacks (line 408) | typedef struct
type stbi__uint16 (line 639) | typedef unsigned short stbi__uint16;
type stbi__int16 (line 640) | typedef signed short stbi__int16;
type stbi__uint32 (line 641) | typedef unsigned int stbi__uint32;
type stbi__int32 (line 642) | typedef signed int stbi__int32;
type stbi__uint16 (line 645) | typedef uint16_t stbi__uint16;
type stbi__int16 (line 646) | typedef int16_t stbi__int16;
type stbi__uint32 (line 647) | typedef uint32_t stbi__uint32;
type stbi__int32 (line 648) | typedef int32_t stbi__int32;
function stbi__cpuid3 (line 729) | static int stbi__cpuid3(void)
function stbi__sse2_available (line 751) | static int stbi__sse2_available(void)
function stbi__sse2_available (line 762) | static int stbi__sse2_available(void)
type stbi__context (line 802) | typedef struct
function stbi__start_mem (line 823) | static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int...
function stbi__start_callbacks (line 833) | static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c...
function stbi__stdio_read (line 847) | static int stbi__stdio_read(void *user, char *data, int size)
function stbi__stdio_skip (line 852) | static void stbi__stdio_skip(void *user, int n)
function stbi__stdio_eof (line 862) | static int stbi__stdio_eof(void *user)
function stbi__start_file (line 874) | static void stbi__start_file(stbi__context *s, FILE *f)
function stbi__rewind (line 883) | static void stbi__rewind(stbi__context *s)
type stbi__result_info (line 898) | typedef struct
function STBIDEF (line 969) | STBIDEF const char *stbi_failure_reason(void)
function stbi__err (line 975) | static int stbi__err(const char *str)
function stbi__addsizes_valid (line 999) | static int stbi__addsizes_valid(int a, int b)
function stbi__mul2sizes_valid (line 1011) | static int stbi__mul2sizes_valid(int a, int b)
function stbi__mad2sizes_valid (line 1021) | static int stbi__mad2sizes_valid(int a, int b, int add)
function stbi__mad3sizes_valid (line 1028) | static int stbi__mad3sizes_valid(int a, int b, int c, int add)
function stbi__mad4sizes_valid (line 1036) | static int stbi__mad4sizes_valid(int a, int b, int c, int d, int add)
function STBIDEF (line 1081) | STBIDEF void stbi_image_free(void *retval_from_stbi_load)
function STBIDEF (line 1096) | STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip)
function STBIDEF (line 1106) | STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_sh...
function stbi_uc (line 1170) | static stbi_uc *stbi__convert_16_to_8(stbi__uint16 *orig, int w, int h, ...
function stbi__uint16 (line 1186) | static stbi__uint16 *stbi__convert_8_to_16(stbi_uc *orig, int w, int h, ...
function stbi__vertical_flip (line 1202) | static void stbi__vertical_flip(void *image, int w, int h, int bytes_per...
function stbi__vertical_flip_slices (line 1227) | static void stbi__vertical_flip_slices(void *image, int w, int h, int z,...
function stbi__uint16 (line 1266) | static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, ...
function stbi__float_postprocess (line 1294) | static void stbi__float_postprocess(float *result, int *x, int *y, int *...
function STBIDEF (line 1311) | STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, c...
function FILE (line 1317) | static FILE *stbi__fopen(char const *filename, char const *mode)
function STBIDEF (line 1346) | STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *co...
function STBIDEF (line 1356) | STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp,...
function STBIDEF (line 1369) | STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, in...
function STBIDEF (line 1382) | STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int ...
function STBIDEF (line 1395) | STBIDEF stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len...
function STBIDEF (line 1402) | STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *cl...
function STBIDEF (line 1409) | STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, i...
function STBIDEF (line 1416) | STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk,...
function STBIDEF (line 1424) | STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int le...
function STBIDEF (line 1458) | STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, in...
function STBIDEF (line 1465) | STBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, ...
function STBIDEF (line 1473) | STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *com...
function STBIDEF (line 1483) | STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, ...
function STBIDEF (line 1497) | STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)
function STBIDEF (line 1511) | STBIDEF int stbi_is_hdr (char const *filename)
function STBIDEF (line 1522) | STBIDEF int stbi_is_hdr_from_file(FILE *f)
function STBIDEF (line 1539) | STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clb...
function STBIDEF (line 1555) | STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = ga...
function STBIDEF (line 1556) | STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = sc...
function STBIDEF (line 1561) | STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = ...
function STBIDEF (line 1562) | STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = ...
function stbi__refill_buffer (line 1577) | static void stbi__refill_buffer(stbi__context *s)
function stbi_inline (line 1594) | stbi_inline static stbi_uc stbi__get8(stbi__context *s)
function stbi_inline (line 1608) | stbi_inline static int stbi__at_eof(stbi__context *s)
function stbi__skip (line 1624) | static void stbi__skip(stbi__context *s, int n)
function stbi__getn (line 1646) | static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n)
function stbi__get16be (line 1674) | static int stbi__get16be(stbi__context *s)
function stbi__uint32 (line 1684) | static stbi__uint32 stbi__get32be(stbi__context *s)
function stbi__get16le (line 1694) | static int stbi__get16le(stbi__context *s)
function stbi__uint32 (line 1702) | static stbi__uint32 stbi__get32le(stbi__context *s)
function stbi_uc (line 1726) | static stbi_uc stbi__compute_y(int r, int g, int b)
function stbi__uint16 (line 1783) | static stbi__uint16 stbi__compute_y_16(int r, int g, int b)
function stbi__uint16 (line 1792) | static stbi__uint16 *stbi__convert_format16(stbi__uint16 *data, int img_...
function stbi_uc (line 1864) | static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp)
type stbi__huffman (line 1918) | typedef struct
type stbi__jpeg (line 1929) | typedef struct
function stbi__build_huffman (line 1983) | static int stbi__build_huffman(stbi__huffman *h, int *count)
function stbi__build_fast_ac (line 2027) | static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h)
function stbi__grow_buffer_unsafe (line 2052) | static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
function stbi_inline (line 2074) | stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffm...
function stbi_inline (line 2128) | stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n)
function stbi_inline (line 2143) | stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n)
function stbi_inline (line 2154) | stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j)
function stbi__jpeg_decode_block (line 2182) | static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__...
function stbi__jpeg_decode_block_prog_dc (line 2234) | static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64]...
function stbi__jpeg_decode_block_prog_ac (line 2262) | static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64]...
function stbi_inline (line 2382) | stbi_inline static stbi_uc stbi__clamp(int x)
function stbi__idct_block (line 2433) | static void stbi__idct_block(stbi_uc *out, int out_stride, short data[64])
function stbi__idct_simd (line 2496) | static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
function stbi__idct_simd (line 2677) | static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
function stbi_uc (line 2885) | static stbi_uc stbi__get_marker(stbi__jpeg *j)
function stbi__jpeg_reset (line 2902) | static void stbi__jpeg_reset(stbi__jpeg *j)
function stbi__parse_entropy_coded_data (line 2915) | static int stbi__parse_entropy_coded_data(stbi__jpeg *z)
function stbi__jpeg_dequantize (line 3039) | static void stbi__jpeg_dequantize(short *data, stbi__uint16 *dequant)
function stbi__jpeg_finish (line 3046) | static void stbi__jpeg_finish(stbi__jpeg *z)
function stbi__process_marker (line 3065) | static int stbi__process_marker(stbi__jpeg *z, int m)
function stbi__process_scan_header (line 3168) | static int stbi__process_scan_header(stbi__jpeg *z)
function stbi__free_jpeg_components (line 3207) | static int stbi__free_jpeg_components(stbi__jpeg *z, int ncomp, int why)
function stbi__process_frame_header (line 3229) | static int stbi__process_frame_header(stbi__jpeg *z, int scan)
function stbi__decode_jpeg_header (line 3330) | static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan)
function stbi__decode_jpeg_image (line 3355) | static int stbi__decode_jpeg_image(stbi__jpeg *j)
type stbi_uc (line 3397) | typedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_u...
function stbi_uc (line 3402) | static stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *...
function stbi_uc (line 3411) | static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, s...
function stbi_uc (line 3421) | static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, ...
function stbi_uc (line 3451) | static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, ...
function stbi_uc (line 3476) | static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_n...
function stbi_uc (line 3592) | static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_nea...
function stbi__YCbCr_to_RGB_row (line 3606) | static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const...
function stbi__YCbCr_to_RGB_simd (line 3632) | static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi...
function stbi__setup_jpeg (line 3767) | static void stbi__setup_jpeg(stbi__jpeg *j)
function stbi__cleanup_jpeg (line 3789) | static void stbi__cleanup_jpeg(stbi__jpeg *j)
type stbi__resample (line 3794) | typedef struct
function stbi_uc (line 3805) | static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y)
function stbi_uc (line 3811) | static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, i...
function stbi__jpeg_test (line 3987) | static int stbi__jpeg_test(stbi__context *s)
function stbi__jpeg_info_raw (line 4000) | static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp)
function stbi__jpeg_info (line 4012) | static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp)
type stbi__zhuffman (line 4040) | typedef struct
function stbi_inline (line 4050) | stbi_inline static int stbi__bitreverse16(int n)
function stbi_inline (line 4059) | stbi_inline static int stbi__bit_reverse(int v, int bits)
function stbi__zbuild_huffman (line 4067) | static int stbi__zbuild_huffman(stbi__zhuffman *z, const stbi_uc *sizeli...
type stbi__zbuf (line 4120) | typedef struct
function stbi_inline (line 4134) | stbi_inline static int stbi__zeof(stbi__zbuf *z)
function stbi_inline (line 4139) | stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z)
function stbi__fill_bits (line 4144) | static void stbi__fill_bits(stbi__zbuf *z)
function stbi__zreceive (line 4156) | int stbi__zreceive(stbi__zbuf *z, int n)
function stbi__zhuffman_decode_slowpath (line 4166) | static int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z)
function stbi_inline (line 4185) | stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffm...
function stbi__zexpand (line 4204) | static int stbi__zexpand(stbi__zbuf *z, char *zout, int n) // need to m...
function stbi__parse_huffman_block (line 4240) | static int stbi__parse_huffman_block(stbi__zbuf *a)
function stbi__compute_huffman_codes (line 4282) | static int stbi__compute_huffman_codes(stbi__zbuf *a)
function stbi__parse_uncompressed_block (line 4332) | static int stbi__parse_uncompressed_block(stbi__zbuf *a)
function stbi__parse_zlib_header (line 4361) | static int stbi__parse_zlib_header(stbi__zbuf *a)
function stbi__parse_zlib (line 4404) | static int stbi__parse_zlib(stbi__zbuf *a, int parse_header)
function stbi__do_zlib (line 4432) | static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, i...
function STBIDEF (line 4442) | STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int ...
function STBIDEF (line 4458) | STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *...
function STBIDEF (line 4463) | STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *b...
function STBIDEF (line 4479) | STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const ...
function STBIDEF (line 4490) | STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int l...
function STBIDEF (line 4506) | STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, co...
type stbi__pngchunk (line 4529) | typedef struct
function stbi__pngchunk (line 4535) | static stbi__pngchunk stbi__get_chunk_header(stbi__context *s)
function stbi__check_png_header (line 4543) | static int stbi__check_png_header(stbi__context *s)
type stbi__png (line 4552) | typedef struct
function stbi__paeth (line 4580) | static int stbi__paeth(int a, int b, int c)
function stbi__create_png_image_raw (line 4594) | static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__...
function stbi__create_png_image (line 4806) | static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stb...
function stbi__compute_transparency (line 4851) | static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int o...
function stbi__compute_transparency16 (line 4876) | static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3]...
function stbi__expand_png_palette (line 4901) | static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int ...
function STBIDEF (line 4941) | STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpr...
function STBIDEF (line 4946) | STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_conv...
function STBIDEF (line 4958) | STBIDEF void stbi__unpremultiply_on_load_thread(int flag_true_if_should_...
function STBIDEF (line 4964) | STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_shou...
function stbi__de_iphone (line 4978) | static void stbi__de_iphone(stbi__png *z)
function stbi__parse_png_file (line 5023) | static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
function stbi__png_test (line 5238) | static int stbi__png_test(stbi__context *s)
function stbi__png_info_raw (line 5246) | static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp)
function stbi__png_info (line 5258) | static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp)
function stbi__png_is16 (line 5265) | static int stbi__png_is16(stbi__context *s)
function stbi__bmp_test_raw (line 5282) | static int stbi__bmp_test_raw(stbi__context *s)
function stbi__bmp_test (line 5297) | static int stbi__bmp_test(stbi__context *s)
function stbi__high_bit (line 5306) | static int stbi__high_bit(unsigned int z)
function stbi__bitcount (line 5318) | static int stbi__bitcount(unsigned int a)
function stbi__shiftsigned (line 5331) | static int stbi__shiftsigned(unsigned int v, int shift, int bits)
type stbi__bmp_data (line 5351) | typedef struct
function stbi__bmp_set_mask_defaults (line 5358) | static int stbi__bmp_set_mask_defaults(stbi__bmp_data *info, int compress)
function stbi__tga_get_comp (line 5661) | static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_r...
function stbi__tga_info (line 5677) | static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp)
function stbi__tga_test (line 5742) | static int stbi__tga_test(stbi__context *s)
function stbi__tga_read_rgb16 (line 5774) | static void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out)
function stbi__psd_test (line 6003) | static int stbi__psd_test(stbi__context *s)
function stbi__psd_decode_rle (line 6010) | static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelC...
function stbi__pic_is4 (line 6258) | static int stbi__pic_is4(stbi__context *s,const char *str)
function stbi__pic_test_core (line 6268) | static int stbi__pic_test_core(stbi__context *s)
type stbi__pic_packet (line 6284) | typedef struct
function stbi_uc (line 6289) | static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest)
function stbi__copyval (line 6303) | static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src)
function stbi_uc (line 6312) | static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int heigh...
function stbi__pic_test (line 6463) | static int stbi__pic_test(stbi__context *s)
type stbi__gif_lzw (line 6475) | typedef struct
type stbi__gif (line 6482) | typedef struct
function stbi__gif_test_raw (line 6502) | static int stbi__gif_test_raw(stbi__context *s)
function stbi__gif_test (line 6512) | static int stbi__gif_test(stbi__context *s)
function stbi__gif_parse_colortable (line 6519) | static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256...
function stbi__gif_header (line 6530) | static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, i...
function stbi__gif_info_raw (line 6561) | static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp)
function stbi__out_gif_code (line 6576) | static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
function stbi_uc (line 6613) | static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g)
function stbi_uc (line 6700) | static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int ...
function stbi__gif_info (line 6999) | static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp)
function stbi__hdr_test_core (line 7009) | static int stbi__hdr_test_core(stbi__context *s, const char *signature)
function stbi__hdr_test (line 7019) | static int stbi__hdr_test(stbi__context* s)
function stbi__hdr_convert (line 7053) | static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp)
function stbi__hdr_info (line 7211) | static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)
function stbi__bmp_info (line 7257) | static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp)
function stbi__psd_info (line 7281) | static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
function stbi__psd_is16 (line 7316) | static int stbi__psd_is16(stbi__context *s)
function stbi__pic_info (line 7345) | static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp)
function stbi__pnm_test (line 7416) | static int stbi__pnm_test(stbi__context *s)
function stbi__pnm_isspace (line 7458) | static int stbi__pnm_isspace(char c)
function stbi__pnm_skip_whitespace (line 7463) | static void stbi__pnm_skip_whitespace(stbi__context *s, char *c)
function stbi__pnm_isdigit (line 7477) | static int stbi__pnm_isdigit(char c)
function stbi__pnm_getinteger (line 7482) | static int stbi__pnm_getinteger(stbi__context *s, char *c)
function stbi__pnm_info (line 7494) | static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp)
function stbi__pnm_is16 (line 7533) | static int stbi__pnm_is16(stbi__context *s)
function stbi__info_main (line 7541) | static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp)
function stbi__is_16_main (line 7583) | static int stbi__is_16_main(stbi__context *s)
function STBIDEF (line 7600) | STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp)
function STBIDEF (line 7610) | STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp)
function STBIDEF (line 7621) | STBIDEF int stbi_is_16_bit(char const *filename)
function STBIDEF (line 7631) | STBIDEF int stbi_is_16_bit_from_file(FILE *f)
function STBIDEF (line 7643) | STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x...
function STBIDEF (line 7650) | STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *u...
function STBIDEF (line 7657) | STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len)
function STBIDEF (line 7664) | STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *c, vo...
FILE: shadertoy/third_party/stb/include/stb/stb_image_write.h
function STBIWDEF (line 262) | STBIWDEF void stbi_flip_vertically_on_write(int flag)
type stbi__write_context (line 267) | typedef struct
function stbi__start_write_callbacks (line 276) | static void stbi__start_write_callbacks(stbi__write_context *s, stbi_wri...
function stbi__stdio_write (line 284) | static void stbi__stdio_write(void *context, void *data, int size)
function STBIWDEF (line 298) | STBIWDEF int stbiw_convert_wchar_to_utf8(char *buffer, size_t bufferlen,...
function FILE (line 304) | static FILE *stbiw__fopen(char const *filename, char const *mode)
function stbi__start_write_file (line 332) | static int stbi__start_write_file(stbi__write_context *s, const char *fi...
function stbi__end_write_file (line 339) | static void stbi__end_write_file(stbi__write_context *s)
type stbiw_uint32 (line 346) | typedef unsigned int stbiw_uint32;
function stbiw__writefv (line 349) | static void stbiw__writefv(stbi__write_context *s, const char *fmt, va_l...
function stbiw__writef (line 378) | static void stbiw__writef(stbi__write_context *s, const char *fmt, ...)
function stbiw__write_flush (line 386) | static void stbiw__write_flush(stbi__write_context *s)
function stbiw__putc (line 394) | static void stbiw__putc(stbi__write_context *s, unsigned char c)
function stbiw__write1 (line 399) | static void stbiw__write1(stbi__write_context *s, unsigned char a)
function stbiw__write3 (line 406) | static void stbiw__write3(stbi__write_context *s, unsigned char a, unsig...
function stbiw__write_pixel (line 418) | static void stbiw__write_pixel(stbi__write_context *s, int rgb_dir, int ...
function stbiw__write_pixels (line 451) | static void stbiw__write_pixels(stbi__write_context *s, int rgb_dir, int...
function stbiw__outfile (line 478) | static int stbiw__outfile(stbi__write_context *s, int rgb_dir, int vdir,...
function stbi_write_bmp_core (line 492) | static int stbi_write_bmp_core(stbi__write_context *s, int x, int y, int...
function STBIWDEF (line 512) | STBIWDEF int stbi_write_bmp_to_func(stbi_write_func *func, void *context...
function STBIWDEF (line 520) | STBIWDEF int stbi_write_bmp(char const *filename, int x, int y, int comp...
function stbi_write_tga_core (line 532) | static int stbi_write_tga_core(stbi__write_context *s, int x, int y, int...
function STBIWDEF (line 611) | STBIWDEF int stbi_write_tga_to_func(stbi_write_func *func, void *context...
function STBIWDEF (line 619) | STBIWDEF int stbi_write_tga(char const *filename, int x, int y, int comp...
function stbiw__linear_to_rgbe (line 639) | static void stbiw__linear_to_rgbe(unsigned char *rgbe, float *linear)
function stbiw__write_run_data (line 656) | static void stbiw__write_run_data(stbi__write_context *s, int length, un...
function stbiw__write_dump_data (line 664) | static void stbiw__write_dump_data(stbi__write_context *s, int length, u...
function stbiw__write_hdr_scanline (line 672) | static void stbiw__write_hdr_scanline(stbi__write_context *s, int width,...
function stbi_write_hdr_core (line 761) | static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int...
function STBIWDEF (line 787) | STBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context...
function STBIWDEF (line 794) | STBIWDEF int stbi_write_hdr(char const *filename, int x, int y, int comp...
function stbiw__zlib_bitrev (line 849) | static int stbiw__zlib_bitrev(int code, int codebits)
function stbiw__zlib_countm (line 859) | static unsigned int stbiw__zlib_countm(unsigned char *a, unsigned char *...
function stbiw__zhash (line 867) | static unsigned int stbiw__zhash(unsigned char *data)
function stbiw__crc32 (line 1024) | static unsigned int stbiw__crc32(unsigned char *buffer, int len)
function stbiw__wpcrc (line 1077) | static void stbiw__wpcrc(unsigned char **data, int len)
function stbiw__paeth (line 1083) | static unsigned char stbiw__paeth(int a, int b, int c)
function stbiw__encode_png_line (line 1092) | static void stbiw__encode_png_line(unsigned char *pixels, int stride_byt...
function STBIWDEF (line 1215) | STBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp...
function STBIWDEF (line 1231) | STBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context...
function stbiw__jpg_writeBits (line 1253) | static void stbiw__jpg_writeBits(stbi__write_context *s, int *bitBufP, i...
function stbiw__jpg_DCT (line 1270) | static void stbiw__jpg_DCT(float *d0p, float *d1p, float *d2p, float *d3...
function stbiw__jpg_calcBits (line 1318) | static void stbiw__jpg_calcBits(int val, unsigned short bits[2]) {
function stbiw__jpg_processDU (line 1328) | static int stbiw__jpg_processDU(stbi__write_context *s, int *bitBuf, int...
function stbi_write_jpg_core (line 1398) | static int stbi_write_jpg_core(stbi__write_context *s, int width, int he...
function STBIWDEF (line 1607) | STBIWDEF int stbi_write_jpg_to_func(stbi_write_func *func, void *context...
function STBIWDEF (line 1616) | STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp...
FILE: shadertoy/threadpool.h
function namespace (line 17) | namespace SPVM {
FILE: shadertoy/timer.cpp
type SPVM (line 9) | namespace SPVM {
type ShaderToy (line 10) | namespace ShaderToy {
FILE: shadertoy/timer.h
function namespace (line 12) | namespace SPVM {
FILE: src/decoder.cpp
type SPVM (line 13) | namespace SPVM {
FILE: src/decoder.h
function namespace (line 13) | namespace SPVM {
FILE: src/ext/GLSL.std.450.h
type GLSLstd450 (line 33) | enum GLSLstd450 {
FILE: src/image.cpp
type SPVM (line 12) | namespace SPVM {
type SpvmImageCoord_ (line 15) | struct SpvmImageCoord_ {
function SpvmWord (line 25) | SpvmWord getImageFormatBPP(SpvmFormat format) {
function SpvmImage (line 42) | SpvmImage *createImage(SpvmImageInfo *imageInfo) {
function SpvmSampler (line 72) | SpvmSampler *createSampler(SpvmSamplerInfo *samplerInfo) {
function SpvmSampler (line 95) | SpvmSampler *createSamplerConstant(SpvmSamplerAttribute *attribute) {
function SpvmSampledImage (line 113) | SpvmSampledImage *createSampledImage(SpvmImage *image, SpvmSampler *sa...
function uploadImageData (line 120) | bool uploadImageData(SpvmImage *image, SpvmByte *dataPtr, SpvmWord dat...
function destroyImage (line 146) | void destroyImage(SpvmImage *image) {
function destroySampler (line 162) | void destroySampler(SpvmSampler *sampler) {
function destroySampledImager (line 166) | void destroySampledImager(SpvmSampledImage *sampledImage) {
function checkImageType (line 170) | bool checkImageType(SpvmImage *image, SpvmTypeImage *type) {
function SpvmVec4 (line 204) | SpvmVec4 colorWithRGBAFloat(SpvmF32 r, SpvmF32 g, SpvmF32 b, SpvmF32 a) {
function SpvmVec4 (line 213) | SpvmVec4 colorWithRGBAInteger(SpvmI32 r, SpvmI32 g, SpvmI32 b, SpvmI32...
function SpvmVec4 (line 222) | SpvmVec4 getBorderColorRGBA(SpvmBorderColor borderColor) {
function SpvmVec4 (line 242) | SpvmVec4 readPixelColorRGBA(SpvmFormat format, const SpvmByte *texelPt...
function writePixelColorRGBA (line 281) | void writePixelColorRGBA(SpvmFormat format, SpvmByte *dstTexelPtr, Spv...
function SpvmI32 (line 311) | SpvmI32 getAddressMirror(SpvmI32 idx) {
function SpvmI32 (line 315) | SpvmI32 getWrappingAddress(SpvmI32 idx, SpvmI32 size, SpvSamplerAddres...
function checkCoordinateValid (line 336) | inline bool checkCoordinateValid(SpvmI32 i, SpvmI32 j, SpvmI32 k, Spvm...
function SpvmWord (line 345) | SpvmWord getImageDimCoordinatesCount(SpvDim dim) {
function SpvmVec4 (line 361) | SpvmVec4 getCoordinatesFromValue(SpvmValue *coordinate, SpvmImageInfo ...
function SpvmVecElement (line 388) | SpvmVecElement getDepthCompareResult(SpvmVecElement depth, SpvmVecElem...
function SpvmByte (line 422) | SpvmByte *pixelDataPtr(SpvmImageLevel *imageLevel, SpvmI32 i, SpvmI32 ...
function SpvmVec4 (line 429) | SpvmVec4 sampleImageLevel(SpvmImageLevel *imageLevel, SpvmImageCoord i...
function SpvmVec4 (line 449) | SpvmVec4 sampleImageNearest(SpvmImageLevel *imageLevel,
function SpvmVec4 (line 460) | SpvmVec4 sampleImageLinear(SpvmImageLevel *imageLevel,
function SpvmVec4 (line 512) | SpvmVec4 sampleImageFiltered(SpvmImageLevel *imageLevel,
function SpvmVec4 (line 533) | SpvmVec4 sampleImageLayerLod(SpvmImageLayer *imageLayer,
function sampleMipmapLevel (line 565) | void sampleMipmapLevel(SpvmImageLevel *dstLevel, SpvmImageLevel *srcLe...
function generateMipmaps (line 586) | void generateMipmaps(SpvmImage *image, SpvSamplerFilterMode filterMode) {
function generateMipmaps (line 608) | void generateMipmaps(SpvmSampledImage *sampledImage) {
function SpvmF32 (line 613) | SpvmF32 getDerivativeRhoMax(void *ctx, SpvmWord coordinateId, SpvmImag...
function SpvmF32 (line 636) | SpvmF32 getLodLambda(void *ctx,
function SpvmF32 (line 658) | SpvmF32 getComputeAccessedLod(SpvmImage *image, SpvmSampler *sampler, ...
function SpvmVec4 (line 670) | SpvmVec4 getImageSizeLod(SpvmImage *image, SpvmI32 lod) {
function SpvmVec4 (line 704) | SpvmVec4 getImageSize(SpvmImage *image) {
function sampleImage (line 732) | void sampleImage(void *ctx,
function fetchImage (line 797) | void fetchImage(void *ctx,
function queryImageFormat (line 843) | void queryImageFormat(void *ctx, SpvmValue *retValue, SpvmValue *image...
function queryImageOrder (line 865) | void queryImageOrder(void *ctx, SpvmValue *retValue, SpvmValue *imageV...
function queryImageSizeLod (line 893) | void queryImageSizeLod(void *ctx, SpvmValue *retValue, SpvmValue *imag...
function queryImageSize (line 903) | void queryImageSize(void *ctx, SpvmValue *retValue, SpvmValue *imageVa...
function queryImageLod (line 913) | void queryImageLod(void *ctx,
function queryImageLevels (line 930) | void queryImageLevels(void *ctx, SpvmValue *retValue, SpvmValue *image...
function queryImageSamples (line 939) | void queryImageSamples(void *ctx, SpvmValue *retValue, SpvmValue *imag...
FILE: src/image.h
function namespace (line 11) | namespace SPVM {
FILE: src/interface.cpp
type SPVM (line 13) | namespace SPVM {
function SpvmWord (line 49) | SpvmWord Interface::getLocationByName(const char *name) {
function SpvmUniformBinding (line 61) | SpvmUniformBinding Interface::getBindingByName(const char *name) {
FILE: src/interface.h
function namespace (line 14) | namespace SPVM {
FILE: src/logger.cpp
type SPVM (line 9) | namespace SPVM {
FILE: src/logger.h
function namespace (line 13) | namespace SPVM {
FILE: src/module.cpp
type SPVM (line 9) | namespace SPVM {
FILE: src/module.h
function namespace (line 14) | namespace SPVM {
FILE: src/opstrings.h
function namespace (line 11) | namespace SPVM {
FILE: src/runtime.cpp
type SPVM (line 10) | namespace SPVM {
FILE: src/runtime.h
function namespace (line 13) | namespace SPVM {
FILE: src/spirv.h
type SpvId (line 51) | typedef unsigned int SpvId;
type SpvSourceLanguage (line 62) | typedef enum SpvSourceLanguage_ {
type SpvExecutionModel (line 72) | typedef enum SpvExecutionModel_ {
type SpvAddressingModel (line 83) | typedef enum SpvAddressingModel_ {
type SpvMemoryModel (line 90) | typedef enum SpvMemoryModel_ {
type SpvExecutionMode (line 97) | typedef enum SpvExecutionMode_ {
type SpvStorageClass (line 134) | typedef enum SpvStorageClass_ {
type SpvDim (line 151) | typedef enum SpvDim_ {
type SpvSamplerAddressingMode (line 162) | typedef enum SpvSamplerAddressingMode_ {
type SpvSamplerFilterMode (line 171) | typedef enum SpvSamplerFilterMode_ {
type SpvImageFormat (line 177) | typedef enum SpvImageFormat_ {
type SpvImageChannelOrder (line 221) | typedef enum SpvImageChannelOrder_ {
type SpvImageChannelDataType (line 245) | typedef enum SpvImageChannelDataType_ {
type SpvImageOperandsShift (line 266) | typedef enum SpvImageOperandsShift_ {
type SpvImageOperandsMask (line 278) | typedef enum SpvImageOperandsMask_ {
type SpvFPFastMathModeShift (line 290) | typedef enum SpvFPFastMathModeShift_ {
type SpvFPFastMathModeMask (line 299) | typedef enum SpvFPFastMathModeMask_ {
type SpvFPRoundingMode (line 308) | typedef enum SpvFPRoundingMode_ {
type SpvLinkageType (line 316) | typedef enum SpvLinkageType_ {
type SpvAccessQualifier (line 322) | typedef enum SpvAccessQualifier_ {
type SpvFunctionParameterAttribute (line 329) | typedef enum SpvFunctionParameterAttribute_ {
type SpvDecoration (line 341) | typedef enum SpvDecoration_ {
type SpvBuiltIn (line 395) | typedef enum SpvBuiltIn_ {
type SpvSelectionControlShift (line 463) | typedef enum SpvSelectionControlShift_ {
type SpvSelectionControlMask (line 469) | typedef enum SpvSelectionControlMask_ {
type SpvLoopControlShift (line 475) | typedef enum SpvLoopControlShift_ {
type SpvLoopControlMask (line 481) | typedef enum SpvLoopControlMask_ {
type SpvFunctionControlShift (line 487) | typedef enum SpvFunctionControlShift_ {
type SpvFunctionControlMask (line 495) | typedef enum SpvFunctionControlMask_ {
type SpvMemorySemanticsShift (line 503) | typedef enum SpvMemorySemanticsShift_ {
type SpvMemorySemanticsMask (line 517) | typedef enum SpvMemorySemanticsMask_ {
type SpvMemoryAccessShift (line 531) | typedef enum SpvMemoryAccessShift_ {
type SpvMemoryAccessMask (line 538) | typedef enum SpvMemoryAccessMask_ {
type SpvScope (line 545) | typedef enum SpvScope_ {
type SpvGroupOperation (line 554) | typedef enum SpvGroupOperation_ {
type SpvKernelEnqueueFlags (line 561) | typedef enum SpvKernelEnqueueFlags_ {
type SpvKernelProfilingInfoShift (line 568) | typedef enum SpvKernelProfilingInfoShift_ {
type SpvKernelProfilingInfoMask (line 573) | typedef enum SpvKernelProfilingInfoMask_ {
type SpvCapability (line 578) | typedef enum SpvCapability_ {
type SpvOp (line 667) | typedef enum SpvOp_ {
FILE: src/spvm.cpp
type SPVM (line 11) | namespace SPVM {
function SpvmOpcode (line 17) | SpvmOpcode readOpcode(const SpvmWord *pc) {
function SpvmValue (line 28) | SpvmValue *createValue(SpvmTypeBase *type, SpvmByte **psp) {
function SpvmWord (line 120) | SpvmWord getTypeSize(SpvmTypeBase *type) {
function copyValue (line 163) | void copyValue(SpvmValue *dst, SpvmValue *src) {
function SpvmValue (line 173) | SpvmValue *setValueF32(SpvmValue *ret, SpvmF32 val) {
function writeToValue (line 185) | void writeToValue(SpvmValue *retValue, SpvmVec4 vec) {
function SpvmVec4 (line 195) | SpvmVec4 readFromValue(SpvmValue *value) {
function valueSubF32 (line 207) | void valueSubF32(SpvmValue *ret, SpvmValue *a, SpvmValue *b) {
FILE: src/spvm.h
function namespace (line 13) | namespace SPVM {
FILE: src/utils.h
function namespace (line 14) | namespace SPVM {
FILE: test/main.cpp
function main (line 9) | int main(int argc, char *argv[]) {
FILE: test/test.h
type TestContext_ (line 17) | struct TestContext_ {
FILE: test/test_core.cpp
function TEST (line 9) | TEST(TEST_SPV_EXEC, location_frag) {
function TEST (line 33) | TEST(TEST_SPV_EXEC, built_in_vert) {
function TEST (line 70) | TEST(TEST_SPV_EXEC, uniform_block_vert) {
function TEST (line 112) | TEST(TEST_SPV_EXEC, array_frag) {
FILE: test/test_image.cpp
type ImageContext_ (line 9) | struct ImageContext_ {
method create2d (line 14) | void create2d(int32_t width, int32_t height, int32_t mipLevels = 1) {
method destroy (line 34) | void destroy() {
function TEST (line 53) | TEST(TEST_SPV_EXEC, image_2d_query_frag) {
function TEST (line 100) | TEST(TEST_SPV_EXEC, image_2d_fetch_frag) {
function TEST (line 136) | TEST(TEST_SPV_EXEC, image_2d_lookup_frag) {
FILE: test/tools/glsl.py
function glsl_cvt (line 8) | def glsl_cvt(filename):
Condensed preview — 146 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,258K chars).
[
{
"path": ".clang-tidy",
"chars": 29,
"preview": "Checks: '-modernize-use-auto'"
},
{
"path": ".gitattributes",
"chars": 79,
"preview": "shadertoy/third_party/** linguist-vendored\ntest/googletest/** linguist-vendored"
},
{
"path": ".github/workflows/cmake_linux.yml",
"chars": 730,
"preview": "name: CMake Linux\n\non:\n push:\n branches: [ main, dev ]\n pull_request:\n branches: [ main, dev ]\n\nenv:\n BUILD_TYP"
},
{
"path": ".github/workflows/cmake_macos.yml",
"chars": 572,
"preview": "name: CMake MacOS\n\non:\n push:\n branches: [ main, dev ]\n pull_request:\n branches: [ main, dev ]\n\nenv:\n BUILD_TYP"
},
{
"path": ".github/workflows/cmake_windows.yml",
"chars": 594,
"preview": "name: CMake Windows\n\non:\n push:\n branches: [ main, dev ]\n pull_request:\n branches: [ main, dev ]\n\nenv:\n BUILD_T"
},
{
"path": ".gitignore",
"chars": 45,
"preview": ".idea\n.vscode\ncmake-build*/\nbuild/\nbin/spvm*\n"
},
{
"path": ".gitmodules",
"chars": 227,
"preview": "[submodule \"shadertoy/third_party/glslang\"]\n\tpath = shadertoy/third_party/glslang\n\turl = https://github.com/KhronosGroup"
},
{
"path": "CMakeLists.txt",
"chars": 464,
"preview": "cmake_minimum_required(VERSION 3.3)\nproject(spvm)\n\nset(CMAKE_CXX_STANDARD 11)\n\nadd_subdirectory(src)\nadd_subdirectory(sh"
},
{
"path": "LICENSE",
"chars": 1066,
"preview": "MIT License\n\nCopyright (c) 2022 keith2018\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\n"
},
{
"path": "OPCODE_CORE.md",
"chars": 28726,
"preview": "## SPIR-V 1.0\n\n| Type | Opcode | Status |\n|----------"
},
{
"path": "OPCODE_EXT.md",
"chars": 2980,
"preview": "## GLSL.std.450\n\n| Opcode | Status |\n|-----------------------|--------|\n| Round | ✅DONE "
},
{
"path": "README.md",
"chars": 4102,
"preview": "# SPVM\nTiny C++ [SPIR-V](https://registry.khronos.org/SPIR-V/) virtual machine (interpreter), you can use it to debug sh"
},
{
"path": "example/CMakeLists.txt",
"chars": 731,
"preview": "cmake_minimum_required(VERSION 3.3)\nproject(spvm_example)\n\nset(CMAKE_CXX_STANDARD 11)\n\ninclude_directories(\"../src\")\nadd"
},
{
"path": "example/main.cpp",
"chars": 1425,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include <iostream>\n\n#include \"decoder.h\"\n#include \"runtime.h\"\n\n#define"
},
{
"path": "example/shaders/simple.frag",
"chars": 159,
"preview": "#version 450\n\nlayout (location = 0) in vec3 inColor;\nlayout (location = 0) out vec4 outFragColor;\n\nvoid main()\n{\n out"
},
{
"path": "example/shaders/simple.frag.spv.txt",
"chars": 1741,
"preview": ".\\location.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 20\n\n "
},
{
"path": "shadertoy/CMakeLists.txt",
"chars": 2564,
"preview": "cmake_minimum_required(VERSION 3.3)\nproject(spvm_shadertoy)\n\nset(CMAKE_CXX_STANDARD 11)\nset(THIRD_PARTY_DIR \"${CMAKE_CUR"
},
{
"path": "shadertoy/assets/shaders/Nt3BzM.frag",
"chars": 3076,
"preview": "// from https://www.shadertoy.com/view/Nt3BzM\n\n#define cx_arg(a) atan(a.y, a.x)\n\n\n#define PI 3.14159265\n#define TAU (2.*"
},
{
"path": "shadertoy/assets/shaders/XdlSDs.frag",
"chars": 929,
"preview": "// from https://www.shadertoy.com/view/XdlSDs\n\nvoid mainImage( out vec4 fragColor, in vec2 fragCoord )\n{\n\tvec2 p = (2.0*"
},
{
"path": "shadertoy/assets/shaders/basic.frag",
"chars": 294,
"preview": "void mainImage( out vec4 fragColor, in vec2 fragCoord )\n{\n // Normalized pixel coordinates (from 0 to 1)\n vec2 uv "
},
{
"path": "shadertoy/assets/shaders/fstyD4.frag",
"chars": 9125,
"preview": "// from https://www.shadertoy.com/view/fstyD4\n\n// Author: bitless\n// Title: Coastal Landscape\n\n// Thanks to Patricio Gon"
},
{
"path": "shadertoy/assets/shaders/ftdfWn.frag",
"chars": 1964,
"preview": "// from https://www.shadertoy.com/view/ftdfWn\n\n#define ITER_MAX 13\n#define TIME_SCALE 6\n#define ZOOM 4\n//#define CUSTOM_"
},
{
"path": "shadertoy/assets/wrapper.frag",
"chars": 838,
"preview": "#version 450\n\nlayout(set = 0, binding = 0) uniform InputData\n{\n vec3 iResolution; // viewport resoluti"
},
{
"path": "shadertoy/compiler.cpp",
"chars": 2828,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"compiler.h\"\n#include \"glslang/Include/glslang_c_int"
},
{
"path": "shadertoy/compiler.h",
"chars": 265,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <vector>\n#include <cstdint>\n\nnamespace"
},
{
"path": "shadertoy/main.cpp",
"chars": 9340,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#include <iostream>\n#include <sstream>\n#include <utility>\n\n#i"
},
{
"path": "shadertoy/renderer.cpp",
"chars": 8335,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"renderer.h\"\n#include \"decoder.h\"\n#include \"compiler"
},
{
"path": "shadertoy/renderer.h",
"chars": 2250,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <string>\n#include \"module.h\"\n#include "
},
{
"path": "shadertoy/resourcelimits.cpp",
"chars": 34129,
"preview": "//\n// Copyright (C) 2016 Google, Inc.\n//\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms"
},
{
"path": "shadertoy/resourcelimits.h",
"chars": 2364,
"preview": "//\n// Copyright (C) 2016 Google, Inc.\n//\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms"
},
{
"path": "shadertoy/settingpanel.cpp",
"chars": 2380,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"settingpanel.h\"\n#include \"imgui/imgui_impl_glfw.h\"\n"
},
{
"path": "shadertoy/settingpanel.h",
"chars": 619,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include \"imgui/imgui.h\"\n#include \"settings.h\"\n"
},
{
"path": "shadertoy/settings.h",
"chars": 1062,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <iostream>\n#include <string>\n#include "
},
{
"path": "shadertoy/third_party/glad/include/KHR/khrplatform.h",
"chars": 11131,
"preview": "#ifndef __khrplatform_h_\n#define __khrplatform_h_\n\n/*\n** Copyright (c) 2008-2018 The Khronos Group Inc.\n**\n** Permission"
},
{
"path": "shadertoy/third_party/glad/include/glad/glad.h",
"chars": 108745,
"preview": "/*\n\n OpenGL loader generated by glad 0.1.35 on Sat Jan 8 14:22:57 2022.\n\n Language/Generator: C/C++\n Specifica"
},
{
"path": "shadertoy/third_party/glad/src/glad.c",
"chars": 60263,
"preview": "/*\n\n OpenGL loader generated by glad 0.1.35 on Sat Jan 8 14:22:57 2022.\n\n Language/Generator: C/C++\n Specifica"
},
{
"path": "shadertoy/third_party/glfw/include/GLFW/glfw3.h",
"chars": 215554,
"preview": "/*************************************************************************\n * GLFW 3.3 - www.glfw.org\n * A library for O"
},
{
"path": "shadertoy/third_party/glfw/include/GLFW/glfw3native.h",
"chars": 18802,
"preview": "/*************************************************************************\n * GLFW 3.3 - www.glfw.org\n * A library for O"
},
{
"path": "shadertoy/third_party/imgui/imgui/imconfig.h",
"chars": 9813,
"preview": "//-----------------------------------------------------------------------------\n// COMPILE-TIME OPTIONS FOR DEAR IMGUI\n/"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui.cpp",
"chars": 647284,
"preview": "// dear imgui, v1.87 WIP\n// (main code and documentation)\n\n// Help:\n// - Read FAQ at http://dearimgui.org/faq\n// - Newco"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui.h",
"chars": 293417,
"preview": "// dear imgui, v1.87 WIP\n// (headers)\n\n// Help:\n// - Read FAQ at http://dearimgui.org/faq\n// - Newcomers, read 'Programm"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_demo.cpp",
"chars": 404170,
"preview": "// dear imgui, v1.87 WIP\n// (demo code)\n\n// Help:\n// - Read FAQ at http://dearimgui.org/faq\n// - Newcomers, read 'Progra"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_draw.cpp",
"chars": 213566,
"preview": "// dear imgui, v1.87 WIP\n// (drawing and font code)\n\n/*\n\nIndex of this file:\n\n// [SECTION] STB libraries implementation\n"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_impl_glfw.cpp",
"chars": 32924,
"preview": "// dear imgui: Platform Backend for GLFW\n// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan, WebGPU..)"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_impl_glfw.h",
"chars": 3177,
"preview": "// dear imgui: Platform Backend for GLFW\n// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan, WebGPU..)"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_impl_opengl3.cpp",
"chars": 37995,
"preview": "// dear imgui: Renderer Backend for modern OpenGL with shaders / programmatic pipeline\n// - Desktop GL: 2.x 3.x 4.x\n// -"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_impl_opengl3.h",
"chars": 2842,
"preview": "// dear imgui: Renderer Backend for modern OpenGL with shaders / programmatic pipeline\n// - Desktop GL: 2.x 3.x 4.x\n// -"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_impl_opengl3_loader.h",
"chars": 32793,
"preview": "//-----------------------------------------------------------------------------\n// About imgui_impl_opengl3_loader.h:\n//"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_internal.h",
"chars": 208568,
"preview": "// dear imgui, v1.87 WIP\n// (internal structures/api)\n\n// You may use this file to debug, understand or extend ImGui fea"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_tables.cpp",
"chars": 215048,
"preview": "// dear imgui, v1.87 WIP\n// (tables and columns code)\n\n/*\n\nIndex of this file:\n\n// [SECTION] Commentary\n// [SECTION] Hea"
},
{
"path": "shadertoy/third_party/imgui/imgui/imgui_widgets.cpp",
"chars": 405628,
"preview": "// dear imgui, v1.87 WIP\n// (widgets code)\n\n/*\n\nIndex of this file:\n\n// [SECTION] Forward Declarations\n// [SECTION] Widg"
},
{
"path": "shadertoy/third_party/imgui/imgui/imstb_rectpack.h",
"chars": 20503,
"preview": "// [DEAR IMGUI]\n// This is a slightly modified version of stb_rect_pack.h 1.00.\n// Those changes would need to be pushed"
},
{
"path": "shadertoy/third_party/imgui/imgui/imstb_textedit.h",
"chars": 55006,
"preview": "// [DEAR IMGUI]\n// This is a slightly modified version of stb_textedit.h 1.13.\n// Those changes would need to be pushed "
},
{
"path": "shadertoy/third_party/imgui/imgui/imstb_truetype.h",
"chars": 192357,
"preview": "// [DEAR IMGUI]\n// This is a slightly modified version of stb_truetype.h 1.20.\n// Mostly fixing for compiler and static "
},
{
"path": "shadertoy/third_party/stb/include/stb/stb_image.h",
"chars": 279339,
"preview": "/* stb_image - v2.27 - public domain image loader - http://nothings.org/stb\n no warrant"
},
{
"path": "shadertoy/third_party/stb/include/stb/stb_image_write.h",
"chars": 71221,
"preview": "/* stb_image_write - v1.16 - public domain - http://nothings.org/stb\n writes out PNG/BMP/TGA/JPEG/HDR images to C stdi"
},
{
"path": "shadertoy/threadpool.h",
"chars": 2492,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <atomic>\n#include <functional>\n#includ"
},
{
"path": "shadertoy/timer.cpp",
"chars": 388,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"timer.h\"\n\nnamespace SPVM {\nnamespace ShaderToy {\n\nv"
},
{
"path": "shadertoy/timer.h",
"chars": 753,
"preview": "/*\n * spvm-shadertoy\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <chrono>\n#include <string>\n\nnamespace "
},
{
"path": "src/CMakeLists.txt",
"chars": 328,
"preview": "cmake_minimum_required(VERSION 3.3)\nproject(spvm_lib)\n\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -O3\")\n\nif (CMAKE_BUILD_TY"
},
{
"path": "src/decoder.cpp",
"chars": 2858,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"decoder.h\"\n#include <cstdio>\n\n#include \"spvm.h\"\n#include \"log"
},
{
"path": "src/decoder.h",
"chars": 437,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <cstdlib>\n#include \"spvm.h\"\n#include \"module.h\"\n"
},
{
"path": "src/ext/GLSL.std.450.h",
"chars": 3959,
"preview": "/*\n** Copyright (c) 2014-2016 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person o"
},
{
"path": "src/ext/GLSL.std.450.inc",
"chars": 16052,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#define DEF_GLSL_OP_FUNC(op) case GLSLstd450##op :\n#define GLSL_GO_NEXT"
},
{
"path": "src/image.cpp",
"chars": 31669,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"image.h\"\n#include <stdlib.h>\n#include \"logger.h\"\n#include \"ut"
},
{
"path": "src/image.h",
"chars": 4446,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include \"spvm.h\"\n\nnamespace SPVM {\n\n#define kMaxSamplerL"
},
{
"path": "src/interface.cpp",
"chars": 10031,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"interface.h\"\n#include \"runtime.h\"\n#include \"module.h\"\n#includ"
},
{
"path": "src/interface.h",
"chars": 2015,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <vector>\n#include <unordered_map>\n\n#include \"spv"
},
{
"path": "src/logger.cpp",
"chars": 1618,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"logger.h\"\n\nnamespace SPVM {\n\nvoid *Logger::logContext_ = null"
},
{
"path": "src/logger.h",
"chars": 1162,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <cstdio>\n#include <cstring>\n#include <cstdarg>\n\n"
},
{
"path": "src/module.cpp",
"chars": 231,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"module.h\"\n\nnamespace SPVM {\n\nSpvmModule::SpvmModule() : buffe"
},
{
"path": "src/module.h",
"chars": 1001,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include \"spvm.h\"\n\n#include <vector>\n#include <unordered_"
},
{
"path": "src/opcodes.inc",
"chars": 50077,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include <cmath>\n\n#include \"spvm.h\"\n#include \"logger.h\"\n#include \"utils"
},
{
"path": "src/opstrings.h",
"chars": 11180,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include \"spirv.h\"\n\nnamespace SPVM {\n\nstatic const char *"
},
{
"path": "src/runtime.cpp",
"chars": 2751,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"runtime.h\"\n#include \"opcodes.inc\"\n\nnamespace SPVM {\n\nRuntime:"
},
{
"path": "src/runtime.h",
"chars": 2224,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include \"spvm.h\"\n#include \"module.h\"\n#include \"interface"
},
{
"path": "src/spirv.h",
"chars": 31826,
"preview": "/*\n** Copyright (c) 2014-2018 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person o"
},
{
"path": "src/spvm.cpp",
"chars": 6664,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"spvm.h\"\n#include \"opstrings.h\"\n#include \"logger.h\"\n\nnamespace"
},
{
"path": "src/spvm.h",
"chars": 6076,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <cinttypes>\n\n#include \"spirv.h\"\n\nnamespace SPVM "
},
{
"path": "src/utils.h",
"chars": 10705,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include <math.h>\n#include <float.h>\n#include \"spvm.h\"\n#i"
},
{
"path": "test/CMakeLists.txt",
"chars": 725,
"preview": "cmake_minimum_required(VERSION 3.3)\nproject(spvm_test)\n\nset(gtest_force_shared_crt ON CACHE BOOL \"\" FORCE)\nadd_subdirect"
},
{
"path": "test/assets/arithmetic_0.frag",
"chars": 2031,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\nvoid main()\n{\n ASSERT_BEGIN(32"
},
{
"path": "test/assets/arithmetic_0.frag.spv.txt",
"chars": 18889,
"preview": "arithmetic_0.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 277\n\n "
},
{
"path": "test/assets/arithmetic_1.frag",
"chars": 3586,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\nvoid main()\n{\n ASSERT_BEGIN(32"
},
{
"path": "test/assets/arithmetic_1.frag.spv.txt",
"chars": 31000,
"preview": ".\\arithmetic_1.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 454\n\n "
},
{
"path": "test/assets/array.frag",
"chars": 721,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\nlayout(set = 0, binding = 0) buff"
},
{
"path": "test/assets/array.frag.spv.txt",
"chars": 11785,
"preview": ".\\array.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 171\n\n "
},
{
"path": "test/assets/assert.glsl",
"chars": 594,
"preview": "layout (location = 0) out int outAssert;\n\n#define ASSERT_BEGIN(n) \\\n int assertIdx = 0; "
},
{
"path": "test/assets/bit.frag",
"chars": 2188,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\nvoid main()\n{\n ASSERT_BEGIN(64"
},
{
"path": "test/assets/bit.frag.spv.txt",
"chars": 20425,
"preview": ".\\bit.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 321\n\n "
},
{
"path": "test/assets/built_in.vert",
"chars": 389,
"preview": "#version 450\n\nlayout (location = 0) out vec3 outColor;\n\nvoid main()\n{\n\tconst vec3 positions[3] = vec3[3](\n\t\tvec3(1.f, 1."
},
{
"path": "test/assets/built_in.vert.spv.txt",
"chars": 4297,
"preview": "built_in.vert\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 50\n\n "
},
{
"path": "test/assets/composite.frag",
"chars": 597,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\nvoid main()\n{\n ASSERT_BEGIN(32"
},
{
"path": "test/assets/composite.frag.spv.txt",
"chars": 7515,
"preview": "composite.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 111\n\n "
},
{
"path": "test/assets/control_flow.frag",
"chars": 1433,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\nvec4 func_if(vec3 inColor) {\n "
},
{
"path": "test/assets/control_flow.frag.spv.txt",
"chars": 14753,
"preview": ".\\control_flow.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 199\n\n "
},
{
"path": "test/assets/conversion.frag",
"chars": 643,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\nvoid main()\n{\n ASSERT_BEGIN(32"
},
{
"path": "test/assets/conversion.frag.spv.txt",
"chars": 7366,
"preview": ".\\conversion.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 99\n\n "
},
{
"path": "test/assets/derivative.frag",
"chars": 274,
"preview": "#version 450\n\nlayout (location = 0) in vec3 inColor;\nlayout (location = 0) out vec4 outDx;\nlayout (location = 1) out vec"
},
{
"path": "test/assets/derivative.frag.spv.txt",
"chars": 2858,
"preview": ".\\derivative.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 35\n\n "
},
{
"path": "test/assets/function.frag",
"chars": 502,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\nfloat func1(float a, float b) {\n "
},
{
"path": "test/assets/function.frag.spv.txt",
"chars": 8448,
"preview": ".\\function.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 116\n\n "
},
{
"path": "test/assets/glsl_std_450_0.frag",
"chars": 2871,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\n#define PI 3.1415926535f\n\nvoid ma"
},
{
"path": "test/assets/glsl_std_450_0.frag.spv.txt",
"chars": 31615,
"preview": ".\\glsl_std_450_0.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 455\n\n "
},
{
"path": "test/assets/glsl_std_450_1.frag",
"chars": 2359,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\n#define PI 3.1415926535f\n\nvoid ma"
},
{
"path": "test/assets/glsl_std_450_1.frag.spv.txt",
"chars": 21476,
"preview": ".\\glsl_std_450_1.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 314\n\n "
},
{
"path": "test/assets/glsl_std_450_2.frag",
"chars": 2421,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\n#define PI 3.1415926535f\n\nvoid ma"
},
{
"path": "test/assets/glsl_std_450_2.frag.spv.txt",
"chars": 23024,
"preview": ".\\glsl_std_450_2.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 337\n\n "
},
{
"path": "test/assets/image.frag",
"chars": 1311,
"preview": "#version 450\n\nlayout(binding = 0) uniform sampler2D texSampler;\n\nlayout(location = 0) in vec2 fragTexCoord;\nlayout(locat"
},
{
"path": "test/assets/image.frag.spv.txt",
"chars": 6971,
"preview": "image.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 77\n\n "
},
{
"path": "test/assets/location.frag",
"chars": 160,
"preview": "#version 450\n\nlayout (location = 0) in vec3 inColor;\n\nlayout (location = 0) out vec4 outFragColor;\n\nvoid main()\n{\n ou"
},
{
"path": "test/assets/location.frag.spv.txt",
"chars": 1741,
"preview": ".\\location.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 20\n\n "
},
{
"path": "test/assets/relational_logical.frag",
"chars": 2251,
"preview": "#version 450\n\n#extension GL_GOOGLE_include_directive : require\n#include \"assert.glsl\"\n\nvoid main()\n{\n ASSERT_BEGIN(64"
},
{
"path": "test/assets/relational_logical.frag.spv.txt",
"chars": 21245,
"preview": ".\\relational_logical.frag\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 322\n\n "
},
{
"path": "test/assets/uniform_block.vert",
"chars": 408,
"preview": "#version 450\nlayout (location = 0) in vec3 vPosition;\n\nlayout(set = 0, binding = 0) uniform CameraBuffer\n{\n vec4 data"
},
{
"path": "test/assets/uniform_block.vert.spv.txt",
"chars": 5157,
"preview": ".\\uniform_block.vert\n// Module Version 10000\n// Generated by (magic number): 8000a\n// Id's are bound by 46\n\n "
},
{
"path": "test/main.cpp",
"chars": 178,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"gtest/gtest.h\"\n\nint main(int argc, char *argv[]) {\n testing:"
},
{
"path": "test/test.h",
"chars": 1955,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#pragma once\n\n#include \"gtest/gtest.h\"\n\n#include \"decoder.h\"\n#include \""
},
{
"path": "test/test_core.cpp",
"chars": 4544,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"test.h\"\n\nTEST(TEST_SPV_EXEC, location_frag) {\n TestContext c"
},
{
"path": "test/test_ext.cpp",
"chars": 260,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"test.h\"\n\nTEST_GLSL_SPV(glsl_std_450_0, \"assets/glsl_std_450_0"
},
{
"path": "test/test_image.cpp",
"chars": 8004,
"preview": "/*\n * spvm\n * @author \t: keith@robot9.me\n *\n */\n\n#include \"test.h\"\n\ntypedef struct ImageContext_ {\n SPVM::SpvmImage *sp"
},
{
"path": "test/tools/glsl.py",
"chars": 340,
"preview": "import sys, os\n\nglslangValidator_name = 'glslangValidator'\nif sys.platform == 'win32':\n glslangValidator_name = 'glsl"
}
]
// ... and 24 more files (download for full content)
About this extraction
This page contains the full source code of the keith2018/spvm GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 146 files (4.0 MB), approximately 1.0M tokens, and a symbol index with 1574 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.