本文整理汇总了C++中Light::ActivateLight方法的典型用法代码示例。如果您正苦于以下问题:C++ Light::ActivateLight方法的具体用法?C++ Light::ActivateLight怎么用?C++ Light::ActivateLight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Light
的用法示例。
在下文中一共展示了Light::ActivateLight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DisplayFunc
void GlutWinObj::DisplayFunc()
{
static float alpha = 0.0;
static int iFrameCount = 0;
static float fz = 0.00;
static int i = 0;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
//Perform ops based on the GlutWinObj's state variables
glTranslatef(fTranX,fTranY,fTranZ);
glRotatef(-fRotX,1,0,0);
glRotatef(-fRotY,0,1,0);
glRotatef(-fRotZ,0,0,1);
glScalef(fScaleX,fScaleY,fScaleZ);
if(GlutWinObj::bToggleDefAnim == true)
trkTrack1.MoveCam(&cam1);
else
cam1.CamLook();
ltSun.ActivateLight();
RenderWorld();
glCallList(TrackList);
glFlush();
glutSwapBuffers();
}
示例2: GlutCreateWindow
int GlutWinObj::GlutCreateWindow(const char *pszTitle)
{
//Create window here and also set required flags
this->iWinHandle = glutCreateWindow_ATEXIT_HACK(pszTitle);
glClearColor (0.0, 0.0, 0.0, 0.0);
void InitLights();
ltSun.ActivateLight();
glEnable(GL_DEPTH_TEST);
glShadeModel(GL_SMOOTH);
glEnable( GL_NORMALIZE );
txrEarth.GenTexture();
txrMoon.GenTexture();
txrGround.GenTexture();
txrSky.GenTexture();
txrRail.GenTexture();
this->bGlutReady = true;
TrackList = glGenLists(1);
glNewList(TrackList,GL_COMPILE);
DrawTrack();
glEndList();
InitSphereList();
return this->iWinHandle;
}