make[2]: Entering directory `/home/h4ck3rm1k3/experiments/ftgl/trunk/demo'
g++ -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/usr/include/freetype2 -Wall -std=c++0x -W -Wall -Wundef -Wfloat-equal -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -Winlin\
e -Waggregate-return -MT simple-simple.o -MD -MP -MF .deps/simple-simple.Tpo -c -o simple-simple.o `test -f 'simple.cpp' || echo './'`simple.cpp
simple.cpp: In function ‘void RenderScene()’:
simple.cpp:110:47: error: narrowing conversion of ‘((((double)t1) + 2.0e+0) / 3.0e+0)’ from ‘double’ to ‘float’ inside { }
simple.cpp:110:47: error: narrowing conversion of ‘((((double)t2) + 2.0e+0) / 3.0e+0)’ from ‘double’ to ‘float’ inside { }
simple.cpp:110:47: error: narrowing conversion of ‘((((double)t3) + 2.0e+0) / 3.0e+0)’ from ‘double’ to ‘float’ inside { }
simple.cpp: At global scope:
simple.cpp:162:13: warning: unused parameter ‘x’
simple.cpp:162:13: warning: unused parameter ‘y’
make[2]: *** [simple-simple.o] Error 1
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
c++0x not c99
Index: demo/simple.cpp
--- demo/simple.cpp (revision 1266)
+++ demo/simple.cpp (working copy)
@@ -105,9 +105,9 @@
float t2 = sin(n / 50 + 1);
float t3 = sin(n / 30 + 2);
- float ambient[4] = { (t1 + 2.0) / 3,
- (t2 + 2.0) / 3,
- (t3 + 2.0) / 3, 0.3 };
+ float ambient[4] = { (float)(t1 + 2.0) / 3,
+ (float)(t2 + 2.0) / 3,
+ (float)(t3 + 2.0) / 3, 0.3 };
float diffuse[4] = { 1.0, 0.9, 0.9, 1.0 };
float specular[4] = { 1.0, 0.7, 0.7, 1.0 };
float position[4] = { 100.0, 100.0, 0.0, 1.0 };