Advertisement
toxictype

Untitled

Mar 19th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.38 KB | None | 0 0
  1. void Chungus::Draw(Viewport vp, SDL_Renderer* ren)
  2. {
  3.     Model->Draw();
  4.  
  5.     glPushMatrix();
  6.     glBegin(GL_QUADS);
  7.  
  8.     /* Cube Top */
  9.     glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
  10.     glVertex3f(-10.0f, 10.0f, 10.0f);
  11.     glVertex3f(-10.0f, 10.0f, -10.0f);
  12.     glVertex3f(10.0f, 10.0f, -10.0f);
  13.     glVertex3f(10.0f, 10.0f, 10.0f);
  14.  
  15.  
  16.     /* Cube Bottom */
  17.     glColor4f(1.0f, 0.5f, 0.0f, 1.0f);
  18.     glVertex3f(-10.0f, -10.0f, 10.0f);
  19.     glVertex3f(-10.0f, -10.0f, -10.0f);
  20.     glVertex3f(10.0f, -10.0f, -10.0f);
  21.     glVertex3f(10.0f, -10.0f, 10.0f);
  22.  
  23.     /* Cube Front */
  24.     glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
  25.     glVertex3f(-10.0f, 10.0f, 10.0f);
  26.     glVertex3f(10.0f, 10.0f, 10.0f);
  27.     glVertex3f(10.0f, -10.0f, 10.0f);
  28.     glVertex3f(-10.0f, -10.0f, 10.0f);
  29.  
  30.     /* Cube Back */
  31.     glColor4f(0.0f, 10.0f, 5, 10.0f);
  32.     glVertex3f(-10.0f, 10.0f, -10.0f);
  33.     glVertex3f(10.0f, 10.0f, -10.0f);
  34.     glVertex3f(10.0f, -10.0f, -10.0f);
  35.     glVertex3f(-10.0f, -10.0f, -10.0f);
  36.  
  37.     /* Cube Left Side */
  38.     glColor4f(0.5f, 0.5f, 0.5f, 1.0f);
  39.     glVertex3f(-10.0f, 10.0f, -10.0f);
  40.     glVertex3f(-10.0f, 10.0f, 10.0f);
  41.     glVertex3f(-10.0f, -10.0f, 10.0f);
  42.     glVertex3f(-10.0f, -10.0f, -10.0f);
  43.  
  44.     /* Cube Right Side */
  45.     glColor4f(0.15f, 0.25f, 0.75f, 1.0f);
  46.     glVertex3f(10.0f, 10.0f, -10.0f);
  47.     glVertex3f(10.0f, 10.0f, 10.0f);
  48.     glVertex3f(10.0f, -10.0f, 10.0f);
  49.     glVertex3f(10.0f, -10.0f, -10.0f);
  50.  
  51.  
  52.     glEnd();
  53.     glPopMatrix();
  54.     glColor4f(1, 1, 1, 1.0f);
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement