From 0dcea8e2145b402a522c07a644cd0575baa547b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Wed, 9 Dec 2015 19:52:38 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/libs@66 a8b55f48-bf90-11e4-a774-851b48703e85 --- qglview/glprimitives.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/qglview/glprimitives.cpp b/qglview/glprimitives.cpp index 1c20be1..4c5bdbb 100644 --- a/qglview/glprimitives.cpp +++ b/qglview/glprimitives.cpp @@ -59,7 +59,6 @@ void GLPrimitiveCube::init() { d_vertices.clear(); d_normals.clear(); d_uvs.clear(); - for (int i = 0; i < 4; ++i) d_normals << 0. << -1. << 0.; d_vertices << -hw << -hl << -hh; @@ -67,7 +66,6 @@ void GLPrimitiveCube::init() { d_vertices << hw << -hl << hh; d_vertices << -hw << -hl << hh; d_uvs << 0. << 0. << 1. << 0. << 1. << 1. << 0. << 1.; - for (int i = 0; i < 4; ++i) d_normals << 0. << 1. << 0.; d_vertices << -hw << hl << -hh; @@ -75,7 +73,6 @@ void GLPrimitiveCube::init() { d_vertices << hw << hl << hh; d_vertices << hw << hl << -hh; d_uvs << 0. << 0. << 1. << 0. << 1. << 1. << 0. << 1.; - for (int i = 0; i < 4; ++i) d_normals << -1. << 0. << 0.; d_vertices << -hw << -hl << -hh; @@ -83,7 +80,6 @@ void GLPrimitiveCube::init() { d_vertices << -hw << hl << hh; d_vertices << -hw << hl << -hh; d_uvs << 0. << 0. << 1. << 0. << 1. << 1. << 0. << 1.; - for (int i = 0; i < 4; ++i) d_normals << 1. << 0. << 0.; d_vertices << hw << -hl << -hh; @@ -91,7 +87,6 @@ void GLPrimitiveCube::init() { d_vertices << hw << hl << hh; d_vertices << hw << -hl << hh; d_uvs << 0. << 0. << 1. << 0. << 1. << 1. << 0. << 1.; - for (int i = 0; i < 4; ++i) d_normals << 0. << 0. << -1.; d_vertices << -hw << -hl << -hh; @@ -99,7 +94,6 @@ void GLPrimitiveCube::init() { d_vertices << hw << hl << -hh; d_vertices << hw << -hl << -hh; d_uvs << 0. << 0. << 1. << 0. << 1. << 1. << 0. << 1.; - for (int i = 0; i < 4; ++i) d_normals << 0. << 0. << 1.; d_vertices << -hw << -hl << hh; @@ -107,7 +101,6 @@ void GLPrimitiveCube::init() { d_vertices << hw << hl << hh; d_vertices << -hw << hl << hh; d_uvs << 0. << 0. << 1. << 0. << 1. << 1. << 0. << 1.; - is_init = true; vbo.rebuffer(); } @@ -142,8 +135,8 @@ void GLPrimitiveEllipsoid::init() { QVector points; vbo.clear(); vbo.init(); - - int ret = 0, hseg = sh + 1, wlseg = swl + 1; + uint ret = 0; + int hseg = sh + 1, wlseg = swl + 1; double crw, crl, a, ch, twl; QVector3D cp(0., 0., -h / 2.); points << cp; @@ -179,7 +172,6 @@ void GLPrimitiveEllipsoid::init() { putTriangle(points[ret - 1], points[ret - wlseg * 2], points[ret]); for (int j = 1; j < wlseg * 2; j++) if (j > 0) putTriangle(points[ret - wlseg * 2 + j - 1], points[ret - wlseg * 2 + j], points[ret]); - is_init = true; vbo.rebuffer(); }