[vlc-devel] [vlc-commits] OpenGL: draw 360° frames on a sphere or a cube
Adrien Maglo
magsoft at videolan.org
Tue Aug 16 19:30:51 CEST 2016
Le 12/08/2016 à 17:19, Filip Roséen a écrit :
> Hi Adrian,
Hi Filip,
> On 16/08/12 16:08, Adrien Maglo wrote:
>
> |vlc | branch: master | Adrien Maglo <magsoft at videolan.org> | Wed May
> 25 19:55:24 2016 +0200| [63337cab3bc1aa3391721372c27ded107767ea4c] |
> committer: Jean-Baptiste Kempf OpenGL: draw 360° frames on a sphere
> or a cube |
>
>
> Potential division-by-zero?
>
> |@@ -1217,6 +1529,25 @@ static void
> DrawWithShaders(vout_display_opengl_t *vgl,
> orientationTransformMatrix(orientationMatrix, vgl->fmt.orientation);
> + if (vgl->fmt.projection_mode == PROJECTION_MODE_EQUIRECTANGULAR +
> || vgl->fmt.projection_mode ==
> PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD) + { + float sar =
> vgl->fmt.i_visible_width / vgl->fmt.i_visible_height; +
> getProjectionMatrix(sar, projectionMatrix); +
> getViewMatrix(viewMatrix); + getYRotMatrix(vgl->f_teta, yRotMatrix);
> + getXRotMatrix(vgl->f_phi, xRotMatrix); +
> getZoomMatrix(vgl->f_zoom, zoomMatrix); + }|
>
> * Is |vgl->fmt.i_visible_height| really guaranteed to not be |0| at
> this stage?
>
> Certainly such value would not make a lot of sense, but I am not sure
> whether protection against it is present elsewhere, nor do I think there
> actually is something in the codebase stating the equivalent of |assert(
> x.i_visible_height != 0 )| (where |x| is |struct video_format_t|).
>
> In other words; mostly asking out of curiosity because it caught my
> attention reading the diff.
Good catch, I'll check that.
Thanks,
--
Adrien
More information about the vlc-devel
mailing list