diff --git a/panda/src/gobj/geomLine.h b/panda/src/gobj/geomLine.h index d94112ba4f..bf376b4b96 100644 --- a/panda/src/gobj/geomLine.h +++ b/panda/src/gobj/geomLine.h @@ -28,7 +28,7 @@ class EXPCL_PANDA GeomLine : public Geom { public: - GeomLine( void ) : Geom() { _width = 1.0; } + GeomLine( void ) : Geom() { _width = 1.0f; } virtual Geom *make_copy() const; virtual void print_draw_immediate( void ) const { } virtual void draw_immediate(GraphicsStateGuardianBase *gsg, GeomContext *gc); diff --git a/panda/src/gobj/geomLinestrip.h b/panda/src/gobj/geomLinestrip.h index 63d661e0c9..20dd8ceed7 100644 --- a/panda/src/gobj/geomLinestrip.h +++ b/panda/src/gobj/geomLinestrip.h @@ -28,7 +28,7 @@ class EXPCL_PANDA GeomLinestrip : public Geom { public: - GeomLinestrip(void) : Geom() { _width = 1.0; } + GeomLinestrip(void) : Geom() { _width = 1.0f; } virtual Geom *make_copy() const; virtual void print_draw_immediate( void ) const { } virtual void draw_immediate(GraphicsStateGuardianBase *gsg, GeomContext *gc); diff --git a/panda/src/gobj/geomPoint.h b/panda/src/gobj/geomPoint.h index 7b13922f0b..ba2498ac8c 100644 --- a/panda/src/gobj/geomPoint.h +++ b/panda/src/gobj/geomPoint.h @@ -27,7 +27,7 @@ //////////////////////////////////////////////////////////////////// class EXPCL_PANDA GeomPoint : public Geom { public: - GeomPoint() : Geom() { _size = 1.0; } + GeomPoint() : Geom() { _size = 1.0f; } virtual Geom *make_copy() const; virtual void print_draw_immediate() const; diff --git a/panda/src/gobj/geomSprite.cxx b/panda/src/gobj/geomSprite.cxx index d94e7b48df..416d3dab29 100644 --- a/panda/src/gobj/geomSprite.cxx +++ b/panda/src/gobj/geomSprite.cxx @@ -39,8 +39,8 @@ GeomSprite:: GeomSprite(Texture *tex, bool alpha_disable) : _texture(tex), _alpha_disable(alpha_disable) { - _ll_uv.set(0.0, 0.0); - _ur_uv.set(1.0, 1.0); + _ll_uv.set(0.0f, 0.0f); + _ur_uv.set(1.0f, 1.0f); _x_texel_ratio.clear(); _y_texel_ratio.clear(); diff --git a/panda/src/gobj/orthoProjection.h b/panda/src/gobj/orthoProjection.h index 5095c01d2c..e6a756ec7d 100644 --- a/panda/src/gobj/orthoProjection.h +++ b/panda/src/gobj/orthoProjection.h @@ -37,7 +37,7 @@ public: virtual Projection *make_copy() const; virtual LMatrix4f get_projection_mat(CoordinateSystem cs = CS_default) const; - virtual Geom* make_geometry(const Colorf &color = Colorf(0.0, 1.0, 0.0, 1.0), + virtual Geom* make_geometry(const Colorf &color = Colorf(0.0f, 1.0f, 0.0f, 1.0f), CoordinateSystem cs = CS_default) const; virtual BoundingVolume *make_bounds(CoordinateSystem cs = CS_default) const; diff --git a/panda/src/gobj/perspectiveProjection.cxx b/panda/src/gobj/perspectiveProjection.cxx index 1fbf5ca06f..baf2a93ac9 100644 --- a/panda/src/gobj/perspectiveProjection.cxx +++ b/panda/src/gobj/perspectiveProjection.cxx @@ -165,9 +165,9 @@ extrude(const LPoint2f &point2d, LPoint3f &origin, LVector3f &direction, // Scale the point from (-1,1) to the range of the frustum. - LPoint2f scaled(_frustum._l + 0.5 * (point2d[0] + 1.0) * + LPoint2f scaled(_frustum._l + 0.5f * (point2d[0] + 1.0f) * (_frustum._r - _frustum._l), - _frustum._b + 0.5 * (point2d[1] + 1.0) * + _frustum._b + 0.5f * (point2d[1] + 1.0f) * (_frustum._t - _frustum._b)); LVector3f near_vector = @@ -211,9 +211,9 @@ project(const LPoint3f &point3d, LPoint2f &point2d, return false; } - point2d.set((scaled[0] - _frustum._l) * 2.0 / - (_frustum._r - _frustum._l) - 1.0, - (scaled[1] - _frustum._b) * 2.0 / - (_frustum._t - _frustum._b) - 1.0); + point2d.set((scaled[0] - _frustum._l) * 2.0f / + (_frustum._r - _frustum._l) - 1.0f, + (scaled[1] - _frustum._b) * 2.0f / + (_frustum._t - _frustum._b) - 1.0f); return true; } diff --git a/panda/src/gobj/perspectiveProjection.h b/panda/src/gobj/perspectiveProjection.h index 3f6b1964f5..a402a41028 100644 --- a/panda/src/gobj/perspectiveProjection.h +++ b/panda/src/gobj/perspectiveProjection.h @@ -37,7 +37,7 @@ public: virtual Projection *make_copy() const; virtual LMatrix4f get_projection_mat(CoordinateSystem cs = CS_default) const; - virtual Geom* make_geometry(const Colorf &color = Colorf(0.0, 1.0, 0.0, 1.0), + virtual Geom* make_geometry(const Colorf &color = Colorf(0.0f, 1.0f, 0.0f, 1.0f), CoordinateSystem cs = CS_default) const; virtual BoundingVolume *make_bounds(CoordinateSystem cs = CS_default) const;