[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] ESSL 3.5 Comments Compliance



I'm sorry if this all seems like too much nitpicking but I'd like to suggest that we allow UTF8, not just ASCII. At least in comments.

It seems unlikely that any OpenGL ES 2.0 driver would fail on UTF8 as it's been designed so there is no overlap with ASCII.

The reason I suggest this is because limiting it to ASCII hurts non English speaking developers. I know my Japanese friends would prefer to write comments in Japanese, not English. Sure they can strip comments themselves at runtime but it's potentially not easy. You can't just go through the string looking for "//.*?\n" and "/*.*?*/" since you can do things like #define A "this//that" and #error "this//that" or #error "this/*that". You could write an offline comment stripper but it just seems sad that a non ASCII using person would have to go through such efforts.

UTF8 conformance is easy to check. Most browser probably already have code to check it. If a particular platform's drivers can't handle it then WebGL implementations on that platform can strip the comments themselves.