This is a major mode for Emacs providing editing conveniences for the OpenGL Shading Language (GLSL). It currently handles GLSL version 4.6, including many recent Vulkan extensions.
In brief, it provides the following features:
Syntax high-lighting for symbols and built-in functions and variables.
Indentation for the current line (TAB) and selected region (C-M-\).
Fast switching between 'file.vert' and 'file.frag' with ff-find-other-file
(S-iso-lefttab).
Interactive function glsl-find-man-page
prompts for a GLSL built-in functions which it formats to an opengl.org
URL and finally passes that to browse-url
.
An initial tree-sitter implementation.
The easiest way to install glsl-mode
via MELPA, which can be setup with the following snippet:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/"))
(package-initialize)
Once that is done, then just refresh the packages and install it with:
Alternatively, you can also install the package using e.g. use-package with the following snippet in your .emacs
:
(use-package glsl-mode
:ensure t)
Attributions and References
This major mode was originally authored by Xavier.Decoret@imag.fr and extended by Jim Hourihan.
Original GLSL mode website: (https://maverick.inria.fr/~Xavier.Decoret/resources/glsl-mode/index.html)
See GLSL 4.6 Spec (PDF) the official reference document for GLSL 4.6.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4