Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

opengl sspipes teapot once in a blue moon

17 views
Skip to first unread message

nick...@googlemail.com

unread,
Mar 12, 2010, 7:23:53 PM3/12/10
to
windows_2000_source_code\win2k\private\windows\opengl\scrsave\pipes\

nstate.cxx

---
...
/
*-----------------------------------------------------------------------
|
|
|
ChooseJointType |
| - Decides which type of joint to
draw |
|
|
-----------------------------------------------------------------------
*/

#define BLUE_MOON 153

int
NORMAL_STATE::ChooseJointType( )
{
switch( jointStyle ) {
case ELBOWS:
return ELBOW_JOINT;
case BALLS:
return BALL_JOINT;
case EITHER:
// draw a teapot once in a blue moon
if( ss_iRand(1000) == BLUE_MOON )
return( TEAPOT );
default:
// otherwise an elbow or a ball (1/3 ball)
if( !ss_iRand(3) )
return BALL_JOINT;
else
return ELBOW_JOINT;
}
}

nick...@googlemail.com

unread,
Mar 12, 2010, 7:24:08 PM3/12/10
to

tuber...@gmail.com

unread,
May 12, 2020, 4:32:46 PM5/12/20
to
how can you change it to only teapots

tuber...@gmail.com

unread,
May 12, 2020, 4:36:25 PM5/12/20
to
how do you make it only teapots

Doly G

unread,
Jan 16, 2024, 3:30:32 PM1/16/24
to
> how do you make it only teapots

Easy. Change the long function to simply:

NORMAL_STATE::ChooseJointType( )
{ return( TEAPOT );}

And re-compile.

It was Nick's favourite screensaver because it had this Easter egg. From memory, I think that the screensaver went slower when it did a teapot, probably because they're harder to render. So making it all teapots could make it less responsive and not immediately go away when you move the mouse or press a key.
0 new messages