object.cpp 258 B

123456789101112131415161718
  1. #include <GL/glew.h>
  2. #include <GL/glut.h>
  3. #include "object.h"
  4. void Object::draw() {
  5. /* Draw object with matrix transformation */
  6. //Local transformation
  7. glPushMatrix();
  8. glMultMatrixf(m);
  9. //Mesh drawing
  10. Mesh2::draw();
  11. //Pop matrix
  12. glPopMatrix();
  13. }