fixed normals of glutCone, thanks Ioannis!
Also now using irad as base input for cone and cylinder, while using orad as height. Without that the problem can't be seen in our demo git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1408 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
7e1599594c
commit
eec680a34b
@ -445,10 +445,10 @@ static void drawSolidTorus(void) { glutSolidTorus(irad,orad,slices
|
||||
static void drawWireTorus(void) { glutWireTorus (irad,orad,slices,stacks); }
|
||||
static void drawSolidSphere(void) { glutSolidSphere(orad,slices,stacks); } /* orad doubles as size input */
|
||||
static void drawWireSphere(void) { glutWireSphere(orad,slices,stacks); } /* orad doubles as size input */
|
||||
static void drawSolidCone(void) { glutSolidCone(orad,orad,slices,stacks); } /* orad doubles as size input */
|
||||
static void drawWireCone(void) { glutWireCone(orad,orad,slices,stacks); } /* orad doubles as size input */
|
||||
static void drawSolidCylinder(void) { glutSolidCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */
|
||||
static void drawWireCylinder(void) { glutWireCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */
|
||||
static void drawSolidCone(void) { glutSolidCone(irad,orad,slices,stacks); } /* irad doubles as base input, and orad as height input */
|
||||
static void drawWireCone(void) { glutWireCone(irad,orad,slices,stacks); } /* irad doubles as base input, and orad as height input */
|
||||
static void drawSolidCylinder(void) { glutSolidCylinder(irad,orad,slices,stacks); } /* irad doubles as radius input, and orad as height input */
|
||||
static void drawWireCylinder(void) { glutWireCylinder(irad,orad,slices,stacks); } /* irad doubles as radius input, and orad as height input */
|
||||
static void drawSolidTeapot(void)
|
||||
{
|
||||
/* per Glut manpage, it should be noted that the teapot is rendered
|
||||
|
@ -1298,9 +1298,9 @@ void fghGenerateCone(
|
||||
(*vertices)[idx ] = cost[j]*r;
|
||||
(*vertices)[idx+1] = sint[j]*r;
|
||||
(*vertices)[idx+2] = z;
|
||||
(*normals )[idx ] = cost[j]*sinn;
|
||||
(*normals )[idx+1] = sint[j]*sinn;
|
||||
(*normals )[idx+2] = cosn;
|
||||
(*normals )[idx ] = cost[j]*cosn;
|
||||
(*normals )[idx+1] = sint[j]*cosn;
|
||||
(*normals )[idx+2] = sinn;
|
||||
}
|
||||
|
||||
z += zStep;
|
||||
|
Reference in New Issue
Block a user