WebGL syntax support addition
Brought to you by:
cdolivet
There is no support for WebGL syntax in EditArea. This support is needed for online WebGL tutorials at http://www.gpupowered.org.
The attached js file adds webGL syntax support to EditArea. Copy this file to "edit_area/reg_syntax/webgl.js.
The WebGL syntax was taken from https://www.khronos.org/registry/webgl/specs/1.0/ , version 1.0 (dated Feb 2011 - latest as on Nov 2011). The below reqexp were used to convert from the WebGL specs to a format EditArea understands.
removing comment lines (/****/)
/[^<>]+/
removing =0x lines
(0x....;)
removing const GLenum
(const GLenum)
remove end of equation (= 0x1223;)
\s*(= 0x[A-Z0-9]*);
removing =0 or =1 equations
\s*(= [0-9]*);
WebGL syntax file for EditArea