diff options
author | Timo Lotterbach <timo.lotterbach@bmw-carit.de> | 2012-10-15 04:12:10 -0700 |
---|---|---|
committer | Timo Lotterbach <timo.lotterbach@bmw-carit.de> | 2012-10-17 02:29:19 -0700 |
commit | be6986acd4fdaf6497b39f4a9b2becf739eabf2b (patch) | |
tree | 199a6d2c84585693fe2fc62e8acab8ab459b99b1 | |
parent | 6c9a1467cf0d18b1e1857d1b54051a1f3c80cc5b (diff) | |
download | layer_management-be6986acd4fdaf6497b39f4a9b2becf739eabf2b.tar.gz |
LayerManagerExamples: fixed gcc 4.7.1 warnings and errors
These issues have occurred using Ubuntu 12.10 pre-release version.
5 files changed, 7 insertions, 4 deletions
diff --git a/LayerManagerExamples/EGLWLApplicationExample/src/gles2application.cpp b/LayerManagerExamples/EGLWLApplicationExample/src/gles2application.cpp index 06ca161..38bc397 100644 --- a/LayerManagerExamples/EGLWLApplicationExample/src/gles2application.cpp +++ b/LayerManagerExamples/EGLWLApplicationExample/src/gles2application.cpp @@ -238,8 +238,8 @@ printf("currentTime=%d, startTime=%d, animTime=%d\n", currentTime, startTime, an currentAngle = angle - ((float) i) * 10.0f; IlmMatrixIdentity(matrix); IlmMatrixRotateZ(matrix, currentAngle); - float color[4] = { 0.0, 1.0, 1.0, 0.5 + (0.3 / (float) i) }; - float lineColor[4] = { 0.0, 0.0, 0.0, 0.5 + (0.4 / (float) i) }; + float color[4] = { 0.0f, 1.0f, 1.0f, 0.5f + (0.3f / (float) i) }; + float lineColor[4] = { 0.0f, 0.0f, 0.0f, 0.5f + (0.4f / (float) i) }; glUniformMatrix4fv(shader.matrixLocation, 1, GL_FALSE, &matrix.f[0]); glUniform4fv(shader.colorLocation, 1, &color[0]); diff --git a/LayerManagerExamples/EGLWLMockNavigation/src/MockNavi.cpp b/LayerManagerExamples/EGLWLMockNavigation/src/MockNavi.cpp index 9c3e7e8..b8bad60 100644 --- a/LayerManagerExamples/EGLWLMockNavigation/src/MockNavi.cpp +++ b/LayerManagerExamples/EGLWLMockNavigation/src/MockNavi.cpp @@ -25,6 +25,7 @@ #include "ShaderLighting.h" #include <stdlib.h> +#include <unistd.h> #include <limits.h> #define CITY_GRID_SIZE 1.0f diff --git a/LayerManagerExamples/EGLWLMockNavigation/src/OpenGLES2App.cpp b/LayerManagerExamples/EGLWLMockNavigation/src/OpenGLES2App.cpp index 5a46ad7..6081e95 100644 --- a/LayerManagerExamples/EGLWLMockNavigation/src/OpenGLES2App.cpp +++ b/LayerManagerExamples/EGLWLMockNavigation/src/OpenGLES2App.cpp @@ -26,6 +26,7 @@ using std::cout; using std::endl; #include <stdlib.h> +#include <unistd.h> #include <math.h> #include <sys/time.h> diff --git a/LayerManagerExamples/EGLX11ApplicationExample/src/gles2application.cpp b/LayerManagerExamples/EGLX11ApplicationExample/src/gles2application.cpp index e189451..a5aac05 100644 --- a/LayerManagerExamples/EGLX11ApplicationExample/src/gles2application.cpp +++ b/LayerManagerExamples/EGLX11ApplicationExample/src/gles2application.cpp @@ -237,8 +237,8 @@ void draw(t_ilm_uint animTime) currentAngle = angle - ((float) i) * 10.0f; IlmMatrixIdentity(matrix); IlmMatrixRotateZ(matrix, currentAngle); - float color[4] = { 0.0, 1.0, 1.0, 0.5 + (0.3 / (float) i) }; - float lineColor[4] = { 0.0, 0.0, 0.0, 0.5 + (0.4 / (float) i) }; + float color[4] = { 0.0f, 1.0f, 1.0f, 0.5f + (0.3f / (float) i) }; + float lineColor[4] = { 0.0f, 0.0f, 0.0f, 0.5f + (0.4f / (float) i) }; glUniformMatrix4fv(shader.matrixLocation, 1, GL_FALSE, &matrix.f[0]); glUniform4fv(shader.colorLocation, 1, &color[0]); diff --git a/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp b/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp index 9897cfe..f15235f 100644 --- a/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp +++ b/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp @@ -25,6 +25,7 @@ using std::cout; using std::endl; #include <stdlib.h> +#include <unistd.h> #include <math.h> #include <sys/time.h> |