vlc | branch: master | Thomas Guillem <tho...@gllm.fr> | Wed Nov 16 15:34:27 2016 +0100| [8b3460eccb3532c1388f10f08ec5810814b8b017] | committer: Thomas Guillem
vout: opengl: add a define for sphere radius > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8b3460eccb3532c1388f10f08ec5810814b8b017 --- modules/video_output/opengl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c index 618a556..a6bebbd 100644 --- a/modules/video_output/opengl.c +++ b/modules/video_output/opengl.c @@ -97,6 +97,8 @@ # define SUPPORTS_FIXED_PIPELINE #endif +#define SPHERE_RADIUS 1.f + typedef struct { GLuint texture; unsigned format; @@ -1252,7 +1254,6 @@ static int BuildSphere(unsigned nbPlanes, GLushort **indices, unsigned *nbIndices, float *left, float *top, float *right, float *bottom) { - float radius = 1; unsigned nbLatBands = 128; unsigned nbLonBands = 128; @@ -1293,9 +1294,9 @@ static int BuildSphere(unsigned nbPlanes, float z = sinPhi * sinTheta; unsigned off1 = (lat * (nbLonBands + 1) + lon) * 3; - (*vertexCoord)[off1] = radius * x; - (*vertexCoord)[off1 + 1] = radius * y; - (*vertexCoord)[off1 + 2] = radius * z; + (*vertexCoord)[off1] = SPHERE_RADIUS * x; + (*vertexCoord)[off1 + 1] = SPHERE_RADIUS * y; + (*vertexCoord)[off1 + 2] = SPHERE_RADIUS * z; for (unsigned p = 0; p < nbPlanes; ++p) { _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits