Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Chungus::Draw(Viewport vp, SDL_Renderer* ren)
- {
- Model->Draw();
- glPushMatrix();
- glBegin(GL_QUADS);
- /* Cube Top */
- glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
- glVertex3f(-10.0f, 10.0f, 10.0f);
- glVertex3f(-10.0f, 10.0f, -10.0f);
- glVertex3f(10.0f, 10.0f, -10.0f);
- glVertex3f(10.0f, 10.0f, 10.0f);
- /* Cube Bottom */
- glColor4f(1.0f, 0.5f, 0.0f, 1.0f);
- glVertex3f(-10.0f, -10.0f, 10.0f);
- glVertex3f(-10.0f, -10.0f, -10.0f);
- glVertex3f(10.0f, -10.0f, -10.0f);
- glVertex3f(10.0f, -10.0f, 10.0f);
- /* Cube Front */
- glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
- glVertex3f(-10.0f, 10.0f, 10.0f);
- glVertex3f(10.0f, 10.0f, 10.0f);
- glVertex3f(10.0f, -10.0f, 10.0f);
- glVertex3f(-10.0f, -10.0f, 10.0f);
- /* Cube Back */
- glColor4f(0.0f, 10.0f, 5, 10.0f);
- glVertex3f(-10.0f, 10.0f, -10.0f);
- glVertex3f(10.0f, 10.0f, -10.0f);
- glVertex3f(10.0f, -10.0f, -10.0f);
- glVertex3f(-10.0f, -10.0f, -10.0f);
- /* Cube Left Side */
- glColor4f(0.5f, 0.5f, 0.5f, 1.0f);
- glVertex3f(-10.0f, 10.0f, -10.0f);
- glVertex3f(-10.0f, 10.0f, 10.0f);
- glVertex3f(-10.0f, -10.0f, 10.0f);
- glVertex3f(-10.0f, -10.0f, -10.0f);
- /* Cube Right Side */
- glColor4f(0.15f, 0.25f, 0.75f, 1.0f);
- glVertex3f(10.0f, 10.0f, -10.0f);
- glVertex3f(10.0f, 10.0f, 10.0f);
- glVertex3f(10.0f, -10.0f, 10.0f);
- glVertex3f(10.0f, -10.0f, -10.0f);
- glEnd();
- glPopMatrix();
- glColor4f(1, 1, 1, 1.0f);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement