… | |
… | |
123 | |
123 | |
124 | void geometry_sphere::draw (view &ctx) |
124 | void geometry_sphere::draw (view &ctx) |
125 | { |
125 | { |
126 | int n = min (100, max (15, (int)(ctx.pixfact * radius) / 10)); |
126 | int n = min (100, max (15, (int)(ctx.pixfact * radius) / 10)); |
127 | |
127 | |
|
|
128 | m->enable (ctx); |
128 | GLUquadric *quad = gluNewQuadric (); |
129 | GLUquadric *quad = gluNewQuadric (); |
129 | gluQuadricTexture (quad, true); |
130 | gluQuadricTexture (quad, true); |
130 | gluSphere (quad, radius, n, n); |
131 | gluSphere (quad, radius, n, n); |
131 | gluDeleteQuadric (quad); |
132 | gluDeleteQuadric (quad); |
|
|
133 | m->disable (ctx); |
132 | } |
134 | } |
133 | |
135 | |
134 | ///////////////////////////////////////////////////////////////////////////// |
136 | ///////////////////////////////////////////////////////////////////////////// |
135 | |
137 | |
136 | void geometry_transform::update () |
138 | void geometry_transform::update () |