{"id":13896611,"url":"https://github.com/pixeljetstream/zbstudio-graphicscodepack","last_synced_at":"2026-03-02T16:12:36.044Z","repository":{"id":68774891,"uuid":"80992260","full_name":"pixeljetstream/zbstudio-graphicscodepack","owner":"pixeljetstream","description":"A package for ZeroBraneStudio to aid graphics programming in Lua (OpenGL, Vulkan etc.)","archived":false,"fork":false,"pushed_at":"2022-02-28T12:26:35.000Z","size":139,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-09T21:43:57.471Z","etag":null,"topics":["glsl","glsl-editors","ide","lua","luajit","opengl","vulkan","zerobrane-studio"],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixeljetstream.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-02-05T12:46:44.000Z","updated_at":"2024-06-07T21:44:31.000Z","dependencies_parsed_at":"2023-02-26T22:45:38.825Z","dependency_job_id":null,"html_url":"https://github.com/pixeljetstream/zbstudio-graphicscodepack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixeljetstream%2Fzbstudio-graphicscodepack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixeljetstream%2Fzbstudio-graphicscodepack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixeljetstream%2Fzbstudio-graphicscodepack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixeljetstream%2Fzbstudio-graphicscodepack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixeljetstream","download_url":"https://codeload.github.com/pixeljetstream/zbstudio-graphicscodepack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214236125,"owners_count":15703436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["glsl","glsl-editors","ide","lua","luajit","opengl","vulkan","zerobrane-studio"],"created_at":"2024-08-06T18:03:02.247Z","updated_at":"2026-03-02T16:12:35.974Z","avatar_url":"https://github.com/pixeljetstream.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# zbstudio-graphicscodepack\nA package for [ZeroBraneStudio](https://studio.zerobrane.com/) to aid graphics programming in Lua (OpenGL, Vulkan etc.). Its content originates from the [Estrela Editor](http://www.luxinia.de/index.php/Estrela/Estrela) from which zbstudio was forked. The installation of this package supercedes the \"estrela\" configuration that zbstudio used previously.\n\n## Installation\n\nZeroBraneStudio 1.51 or a version from this [commit](https://github.com/pkulchenko/ZeroBraneStudio/commit/9c8b3f0167361cc7e065e48a5deb9f6c93fd03a4) onwards.\n\nThere is two differnt options:\n\n* Install like a regular package, put the lua file and the subdirectory of this repository into zbstudio's package directory\n* Put a dummy file into the package directory that simply forwards to the content of this repository:\n\n  `return dofile([[Absolute filepath to graphicscodepack.lua]])`\n\n## Features\n\n### GLSL\nThis package comes with a spec, api tooltips, and tools for GLSL.\n\n#### GLSLC Tool\nUses [glslc](https://github.com/pixeljetstream/glslc), which makes use of the system's OpenGL driver to compile the files (not recommended anymore, prefer to use GLSLANG, see below)\nTo make the GLSLC menu working either modify your zbstudio's `cfg/user.lua` and add `path.glslcbin = [[path to glslc.exe (excluded)]]` or set the `GLSLC_BIN_PATH` environment variable.\n\n![glslc inside zbstudio](http://www.luxinia.de/images/estrela_glslc.png).\n\nThe GLASM output from glslc is also analyzed and formated by the tool. However, be aware that this is just an intermediate format for NVIDIA and not the actual assembly.\n\n![glslc_glasm](http://www.luxinia.de/uploads/Estrela/Estrelacg.png)\n\nDepending on the shadertype a define is set, e.g. `-D_VERTEX_SHADER_ -D_IDE_`.\n\n#### GLSLANG Tool\nUses the official Khronos [glslangValidator](https://github.com/KhronosGroup/glslang) from the installed [VulkanSDK](https://vulkan.lunarg.com/sdk/home).\nTo get the GLSLANG menu, modify `cfg/user.lua` and add `path.glslangbin = [[path to glslangValidator.exe (excluded)]]` otherwise `(os.getenv(\"VULKAN_SDK\") and os.getenv(\"VULKAN_SDK\")..\"/Bin\")` is used.\n\nThe menu looks similar to the above tool. On success two files are generated `\u003cinputfile\u003e.spv` and `\u003cinputfile\u003e.txt` (humand readable spir-v).\nBy default shaders are compiled targeting Vulkan 1.1. The tool does support raytracing and mesh shaders.\n\nDepending on the shadertype a define is set, e.g. `-D_VERTEX_SHADER_ -D_IDE_`.\n\nTo add project specific include directories:\n* put `zbsgfxpack.lua` file in project directory\n* return include paths through the lua file: `return { glslang = { includes = { \"myIncludeDirectory\", ...} } }`\n\n### HLSL\nSimilar as above is provided for the DirectX HLSL (however not maintained as much as GLSL). \n\n#### DXC Tool\nTo get the DXC menu entry, modify `cfg/user.lua` and add `path.dxcbin = [[path to dxc.exe (excluded)]]`\n\n#### FXC Tool\nTo get the FXC menu entry, modify `cfg/user.lua` and add `path.fxcbin = [[path to fxc.exe (excluded)]]` otherwise `(os.getenv(\"DXSDK_DIR\") and os.getenv(\"DXSDK_DIR\")..\"/Utilities/bin/x86/\")` is used.\n\nDepending on the shadertype a define is set, e.g. `-D_VERTEX_SHADER_ -D_IDE_`.\n\n### Lua\n#### Api Files\nThere is api completion for various lua-ffi bindings:\n* [GLFW](http://www.glfw.org) 2 and 3\n* OpenGL (glewgl) core + ARB,NV,AMD extensions\n* Vulkan\n* [ShaderC](https://github.com/google/shaderc) \n\n#### Interpreter\nAn interpreter for the [LuaJIT gfx sandbox](https://github.com/pixeljetstream/luajit_gfx_sandbox) is provided, which makes use of the above bindings. It can be used by setting `path.luajitgfxsandbox = [[path to luajit gfx runtime directory]]` in the config file or via `LUAJIT_GFX_SANDBOX_PATH` environment variable. The interpreter does support debugging.\n\n### Tools\n#### LuaJIT ffi string to editor api\nA tool is provided to turn a LuaJIT ffi C header into an api specification that zbstudio can use. This makes adding auto completion and tooltips for C apis easier. Ensure the ffi header is in the active editor tab when running the tool.\n\n#### Perforce edit/revert\nTo some basic perforce operations with the current file\n\n#### stringify to C\nSurrounds every line of the active editor file by quotes and new line symbol: ```\" original content \\n\"``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixeljetstream%2Fzbstudio-graphicscodepack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixeljetstream%2Fzbstudio-graphicscodepack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixeljetstream%2Fzbstudio-graphicscodepack/lists"}