GLSL向C引入了哪些关键字? [英] What keywords GLSL introduce to C?

查看:91
本文介绍了GLSL向C引入了哪些关键字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我们在C中:

auto if break int case long char register
continue return default short do sizeof 
double static else struct entry switch extern
typedef float union for unsigned 
goto while enum void const signed volatile

OpenGL(ES)着色器语言为我们提供了哪些新关键字?

我是GLSL的新手,我想创建一些突出显示实用程序,以便于使用.

GLSL中包含的数学单词将被视为关键字..

解决方案

您可能想获取OpenGL ES GLSL OpenGL 4.1 GLSL
OpenGL ES 2.0 GLSL

So we have in C:

auto if break int case long char register
continue return default short do sizeof 
double static else struct entry switch extern
typedef float union for unsigned 
goto while enum void const signed volatile

What new keywords OpenGL (ES) Shader Language provide to us?

I am new to GLSL and I want to create some highlight editing util for ease of use.

Math words included into GLSL will count as keywords..?

解决方案

You probably want to get the OpenGL ES GLSL language specification. §3.6 lists the keywords (plus a number of reserved words that aren't keywords, but you're not supposed to use anyway, so they probably merit some sort of color coding as well).

Edit: Oops, I grabbed the wrong link there. My apologies. The current specs are:

OpenGL 4.1 GLSL
OpenGL ES 2.0 GLSL

这篇关于GLSL向C引入了哪些关键字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆