本文整理汇总了C++中Trajectory::render方法的典型用法代码示例。如果您正苦于以下问题:C++ Trajectory::render方法的具体用法?C++ Trajectory::render怎么用?C++ Trajectory::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trajectory
的用法示例。
在下文中一共展示了Trajectory::render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void WorldWizApp::draw() {
glClearColor(0.0, 0.0, 0.0, 0.0);
glClearAccum(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective (23.0, screenAspect, 0.5, 50);
//Vec3f cpos = Vec3f(cos(orbitDegrees)*12.0f ,0.0f,sin(orbitDegrees)*12.0f);
//gluLookAt(cpos.x,cpos.y,cpos.z, 0,0,0, 0,1,0);
// cpos.x = 0;
// cpos.y = 0;
// cpos.z = 0;
gluLookAt(0,0,0, -1,0,0, 0,1,0);
// world.globeShader.uniform("CAMERA_POSITION",cpos);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glPushMatrix();
glLoadIdentity();
GLfloat light_position[] = { -10.0, 4.0, 0.0, 1.0 };
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
GLfloat lm_ambient[] = { 0.5, 0.5, 0.5, 1.0 };
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lm_ambient);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glPopMatrix();
glTranslatef( -15., 0, 0 );
orbitDegrees += 0.3f;
glRotatef(orbitDegrees, 0.f, 1.f, 0.5f);
glEnable(GL_DEPTH_TEST);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_POINT_SMOOTH);
//glEnable(GL_POLYGON_SMOOTH);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_MULTISAMPLE);
glShadeModel(GL_FLAT);//glShadeModel(GL_SMOOTH);
glLineWidth(1.5);
world.render();
testTrajectory.render(&world);
glPopMatrix();
}