本文整理汇总了C++中CModel::GLrender方法的典型用法代码示例。如果您正苦于以下问题:C++ CModel::GLrender方法的具体用法?C++ CModel::GLrender怎么用?C++ CModel::GLrender使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CModel
的用法示例。
在下文中一共展示了CModel::GLrender方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: display
void display(void) // Creamos la funcion donde se dibuja
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glPushMatrix();
glRotatef(g_lookupdown, 1.0f, 0, 0);
gluLookAt(objCamera.mPos.x, objCamera.mPos.y, objCamera.mPos.z,
objCamera.mView.x, objCamera.mView.y, objCamera.mView.z,
objCamera.mUp.x, objCamera.mUp.y, objCamera.mUp.z);
glPushMatrix();
glPushMatrix(); //Rectoria
glDisable(GL_LIGHTING);
glRotatef(-4, 0, 1, 0);
glTranslatef(-235, 7.0, 86.0);
glScalef(0.017, 0.017, 0.017);
rectoria.GLrender(NULL, _SHADED, 1);
glEnable(GL_LIGHTING);
glPopMatrix();
glPushMatrix(); //Biblioteca
glDisable(GL_LIGHTING);
glTranslatef(-208.0, 7.0, 5.0);
glScalef(0.45, 0.45, 0.45);
biblioteca.GLrender(NULL, _SHADED, 1);
glEnable(GL_LIGHTING);
glPopMatrix();
glPushMatrix(); //pasto islas
glDisable(GL_LIGHTING);
glTranslatef(-20.0, 0.5, 40.0);
glRotatef(185, 0, 1, 0);
glScalef(210.0, 0.0, 100.0);
pasto.prisma2(texturaPasto.GLindex, 0);
glEnable(GL_LIGHTING);
glPopMatrix();
glPushMatrix(); //Isla Inge
glDisable(GL_LIGHTING);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTranslatef(25.0, -3.0, 60.0);
glScalef(5.0, 2.0, 3.0);
isla.esfera(5.0, 15.0, 15.0, texturaPasto.GLindex);
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glEnable(GL_LIGHTING);
glPopMatrix();
glPushMatrix(); //Isla Derecho
glDisable(GL_LIGHTING);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTranslatef(25.0, -3.0, 9.0);
glScalef(5.0, 2.0, 3.0);
isla.esfera(5.0, 15.0, 15.0, texturaPasto.GLindex);
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glEnable(GL_LIGHTING);
glPopMatrix();
glPushMatrix(); //Isla Filos
glDisable(GL_LIGHTING);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTranslatef(-80.0, -3.0, 20.0);
glScalef(8.0, 2.0, 5.0);
isla.esfera(5.0, 15.0, 15.0, texturaPasto.GLindex);
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glEnable(GL_LIGHTING);
glPopMatrix();
glPushMatrix(); //facultad de derecho
glDisable(GL_LIGHTING);
glRotatef(-4, 0, 1, 0);
glTranslatef(-32.0, 0.0, -9.0);
glScalef(0.7, 0.7, 0.7);
facultadD.GLrender(NULL, _SHADED, 1);
glEnable(GL_LIGHTING);
glPopMatrix();
glPushMatrix();//pastoRectoria
glDisable(GL_LIGHTING);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_GEN_S);
//.........这里部分代码省略.........