Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // draw the shape normally
- static int shape = 0;
- if(SFW::Input::Instance()->CheckTriggered('1'))
- ++shape %= SFW::Shape::TYPE_NUM;
- setTB(shader.progID, shape);
- SFW::Shape::Draw(shape);
- glPopMatrix();
- glPushMatrix();
- glTranslatef(0, -5, 0);
- glScalef(50, 50, 50);
- glRotatef(-90, 1.0f, 0, 0);
- setTB(shader.progID, SFW::Shape::TYPE_PLANE);
- SFW::Shape::Draw(SFW::Shape::TYPE_PLANE);
- glActiveTexture (GL_TEXTURE0);
- glDisable (GL_TEXTURE_2D);
- glActiveTexture (GL_TEXTURE1);
- glDisable (GL_TEXTURE_2D);
- glActiveTexture (GL_TEXTURE2);
- glDisable (GL_TEXTURE_2D);
- glActiveTexture (GL_TEXTURE3);
- glDisable (GL_TEXTURE_2D);
- glActiveTexture (GL_TEXTURE4);
- glDisable (GL_TEXTURE_2D);
- glActiveTexture (GL_TEXTURE5);
- glDisable (GL_TEXTURE_2D);
- shader.cleanUp();
- angle = 0;
- for(int i = 0 ; i < numCircles; ++i, angle += circAngle)
- {
- glPopMatrix();
- glPushMatrix();
- float x, z;
- x = 5*cos(SFW::DegToRad(angle+index));
- z = 5*sin(SFW::DegToRad(angle+index));
- glTranslatef(x, 5, z);
- glScalef(0.25, 0.25, 0.25);
- setTB(shader.progID, SFW::Shape::TYPE_SPHERE);
- SFW::Shape::Draw(SFW::Shape::TYPE_SPHERE);
- }
- if(rotate)
- index += 0.3f;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement