mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 00:44:12 +02:00
Successful static half cylinder backing.
This commit is contained in:
parent
d725bcdbff
commit
05d933bf33
2 changed files with 5 additions and 1 deletions
|
@ -262,6 +262,10 @@ bool Face::render(float alpha) {
|
|||
xScale = FULL_FRAME_SCALE * _owningHead->getScale();
|
||||
zScale = xScale * 0.3f;
|
||||
|
||||
glPushMatrix();
|
||||
glScalef(xScale / 12, xScale / (aspect * 3), zScale / 2);
|
||||
Application::getInstance()->getGeometryCache()->renderHalfCylinder(25,20);
|
||||
glPopMatrix();
|
||||
} else {
|
||||
aspect = _aspectRatio;
|
||||
xScale = BODY_BALL_RADIUS_HEAD_BASE * _owningHead->getScale();
|
||||
|
|
|
@ -176,7 +176,7 @@ void GeometryCache::renderHalfCylinder(int slices, int stacks) {
|
|||
float radius = 1.0f;
|
||||
|
||||
for (int j = 0; j <= slices; j++) {
|
||||
float theta = PIf * j / slices;
|
||||
float theta = 3 * PIf / 2 + PIf * j / slices;
|
||||
|
||||
*(vertex++) = sinf(theta) * radius;
|
||||
*(vertex++) = y;
|
||||
|
|
Loading…
Reference in a new issue