[vlc-devel] [PATCH 4/4] opengl: more const

Steve Lhomme robux4 at videolabs.io
Thu Nov 17 12:45:28 CET 2016


---
 modules/video_output/opengl.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 9c795c0..7c0ccb6 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -1271,7 +1271,8 @@ static void DrawWithoutShaders(vout_display_opengl_t *vgl,
 static int BuildSphere(unsigned nbPlanes,
                         GLfloat **vertexCoord, GLfloat **textureCoord, unsigned *nbVertices,
                         GLushort **indices, unsigned *nbIndices,
-                        float *left, float *top, float *right, float *bottom)
+                        const float *left, const float *top,
+                        const float *right, const float *bottom)
 {
     unsigned nbLatBands = 128;
     unsigned nbLonBands = 128;
@@ -1356,7 +1357,8 @@ static int BuildCube(unsigned nbPlanes,
                      float padW, float padH,
                      GLfloat **vertexCoord, GLfloat **textureCoord, unsigned *nbVertices,
                      GLushort **indices, unsigned *nbIndices,
-                     float *left, float *top, float *right, float *bottom)
+                     const float *left, const float *top,
+                     const float *right, const float *bottom)
 {
     *nbVertices = 4 * 6;
     *nbIndices = 6 * 6;
@@ -1479,7 +1481,8 @@ static int BuildCube(unsigned nbPlanes,
 static int BuildRectangle(unsigned nbPlanes,
                           GLfloat **vertexCoord, GLfloat **textureCoord, unsigned *nbVertices,
                           GLushort **indices, unsigned *nbIndices,
-                          float *left, float *top, float *right, float *bottom)
+                          const float *left, const float *top,
+                          const float *right, const float *bottom)
 {
     *nbVertices = 4;
     *nbIndices = 6;
@@ -1534,7 +1537,8 @@ static int BuildRectangle(unsigned nbPlanes,
 }
 
 static void DrawWithShaders(vout_display_opengl_t *vgl,
-                            float *left, float *top, float *right, float *bottom,
+                            const float *left, const float *top,
+                            const float *right, const float *bottom,
                             int program)
 {
     vgl->UseProgram(vgl->program[program]);
-- 
2.10.1.windows.1



More information about the vlc-devel mailing list