summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-08-06 09:09:35 -0600
committerBrian Paul <brianp@vmware.com>2009-08-06 09:47:55 -0600
commit4d4a904bb087d96e8000c6d56f4ca1c699cd53c9 (patch)
tree276640feeac6585c80c4269c206e51250f8c5da2
parent4a20a7222be0fcb63949e18222ca8a3fffbf9bb2 (diff)
glsl1: s/half/Half/
'half' is a reserved word, don't use it for a function name.
-rw-r--r--src/glean/tglsl1.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/glean/tglsl1.cpp b/src/glean/tglsl1.cpp
index 10a43df..3c4e840 100644
--- a/src/glean/tglsl1.cpp
+++ b/src/glean/tglsl1.cpp
@@ -2185,13 +2185,13 @@ static const ShaderProgram Programs[] = {
{
"function call with in, out params",
NO_VERTEX_SHADER,
- "void half(in float x, out float y) { \n"
+ "void Half(in float x, out float y) { \n"
" y = 0.5 * x; \n"
"} \n"
"\n"
"void main() { \n"
" float a = 0.5, b = 0.1; \n"
- " half(a, b); \n"
+ " Half(a, b); \n"
" gl_FragColor = vec4(b); \n"
"} \n",
{ 0.25, 0.25, 0.25, 0.25 },
@@ -2259,7 +2259,7 @@ static const ShaderProgram Programs[] = {
{
"nested function calls (1)",
NO_VERTEX_SHADER,
- "float half(const in float x) { \n"
+ "float Half(const in float x) { \n"
" return 0.5 * x; \n"
"} \n"
"\n"
@@ -2269,7 +2269,7 @@ static const ShaderProgram Programs[] = {
"\n"
"void main() { \n"
" float a = 0.5; \n"
- " float b = square(half(1.0)); \n"
+ " float b = square(Half(1.0)); \n"
" gl_FragColor = vec4(b); \n"
"} \n",
{ 0.25, 0.25, 0.25, 0.25 },
@@ -2280,12 +2280,12 @@ static const ShaderProgram Programs[] = {
{
"nested function calls (2)",
NO_VERTEX_SHADER,
- "float half(const in float x) { \n"
+ "float Half(const in float x) { \n"
" return 0.5 * x; \n"
"} \n"
"\n"
"float square_half(const in float x) { \n"
- " float y = half(x); \n"
+ " float y = Half(x); \n"
" return y * y; \n"
"} \n"
"\n"
@@ -2302,13 +2302,13 @@ static const ShaderProgram Programs[] = {
{
"nested function calls (3)",
NO_VERTEX_SHADER,
- "float half(const in float x) { \n"
+ "float Half(const in float x) { \n"
" return 0.5 * x; \n"
"} \n"
"\n"
"void main() { \n"
" float a = 0.5; \n"
- " float b = half(half(a)); \n"
+ " float b = Half(Half(a)); \n"
" gl_FragColor = vec4(b); \n"
"} \n",
{ 0.125, 0.125, 0.125, 0.125 },