本文整理汇总了C++中Object3D::build方法的典型用法代码示例。如果您正苦于以下问题:C++ Object3D::build方法的具体用法?C++ Object3D::build怎么用?C++ Object3D::build使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Object3D
的用法示例。
在下文中一共展示了Object3D::build方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: playTrack
int Game::playTrack(Track& track){
bool raceFinished = false;
unsigned int timeElapsed = 0;
//Interface
Program prog2D;
prog2D = loadProgram("../shaders/tex2D.vs.glsl", "../shaders/tex2D.fs.glsl");
prog2D.use();
//Carre qui affiche les pouvoirs
Object2D powerquad;
powerquad.setVertices(0.7, 0.9, -0.9, -0.64);
powerquad.build();
//Carre qui affiche la position
Object2D positionQuad;
positionQuad.setVertices(-0.9,-0.7,0.64,0.9);
positionQuad.build();
//Surfaces pour afficher le classement final (à optimiser)
Object2D positionQuad1;
positionQuad1.setVertices(-0.2,-0.1,0.8,0.9);
positionQuad1.build();
Object2D positionQuad2;
positionQuad2.setVertices(-0.2,-0.1,0.6,0.7);
positionQuad2.build();
Object2D positionQuad3;
positionQuad3.setVertices(-0.2,-0.1,0.4,0.5);
positionQuad3.build();
Object2D positionQuad4;
positionQuad4.setVertices(-0.2,-0.1,0.2,0.3);
positionQuad4.build();
Object2D positionQuad5;
positionQuad5.setVertices(-0.2,-0.1,0.0,0.1);
positionQuad5.build();
Object2D positionQuad6;
positionQuad6.setVertices(-0.2,-0.1,-0.2,-0.1);
positionQuad6.build();
Object2D positionQuad7;
positionQuad7.setVertices(-0.2,-0.1,-0.4,-0.3);
positionQuad7.build();
Object2D positionQuad8;
positionQuad8.setVertices(-0.2,-0.1,-0.6,-0.5);
positionQuad8.build();
Object2D persoQuad1;
persoQuad1.setVertices(0.1,0.2,0.8,0.9);
persoQuad1.build();
Object2D persoQuad2;
persoQuad2.setVertices(0.1,0.2,0.6,0.7);
persoQuad2.build();
Object2D persoQuad3;
persoQuad3.setVertices(0.1,0.2,0.4,0.5);
persoQuad3.build();
Object2D persoQuad4;
persoQuad4.setVertices(0.1,0.2,0.2,0.3);
persoQuad4.build();
Object2D persoQuad5;
persoQuad5.setVertices(0.1,0.2,0.0,0.1);
persoQuad5.build();
Object2D persoQuad6;
persoQuad6.setVertices(0.1,0.2,-0.2,-0.1);
persoQuad6.build();
Object2D persoQuad7;
persoQuad7.setVertices(0.1,0.2,-0.4,-0.3);
persoQuad7.build();
Object2D persoQuad8;
persoQuad8.setVertices(0.1,0.2,-0.6,-0.5);
persoQuad8.build();
GLint locVarTexture;
locVarTexture= glGetUniformLocation(prog2D.getGLId(), "uTexture");
GLuint* texturepower=PowerTexture();
GLuint* textureRank=RankTexture();
GLuint* texturePerso=PersoTexture();
Program prog;
prog = loadProgram("../shaders/3D.vs.glsl","../shaders/tex3D.fs.glsl");
prog.use();
GLuint uMVPMatrix=glGetUniformLocation(prog.getGLId(),"uMVPMatrix");
GLuint uMVMatrix=glGetUniformLocation(prog.getGLId(),"uMVMatrix");
GLuint uNormalMatrix=glGetUniformLocation(prog.getGLId(),"uNormalMatrix");
GLuint uTex=glGetUniformLocation(prog.getGLId(),"uTexture");
GLuint uKd=glGetUniformLocation(prog.getGLId(),"uKd");
GLuint uKs=glGetUniformLocation(prog.getGLId(),"uKs");
GLuint uShininess=glGetUniformLocation(prog.getGLId(),"uShininess");
GLuint uLightDir_vs=glGetUniformLocation(prog.getGLId(),"uLightDir_vs");
GLuint uLightIntensity=glGetUniformLocation(prog.getGLId(),"uLightIntensity");
glEnable(GL_DEPTH_TEST);
glm::mat4 ViewMatrix;
TrackballCamera camera;
//.........这里部分代码省略.........