eleni@19: #include eleni@19: #include "tesquad.h" eleni@19: eleni@19: void draw_tess_quad(float x, float y, float w, float h, int usub, int vsub, bool ortho) eleni@19: { eleni@23: glPushAttrib(GL_ENABLE_BIT); eleni@23: glDisable(GL_DEPTH_TEST); eleni@23: glDisable(GL_LIGHTING); eleni@23: eleni@19: if(ortho) { eleni@19: glMatrixMode(GL_PROJECTION); eleni@19: glPushMatrix(); eleni@19: glLoadIdentity(); eleni@19: } eleni@19: eleni@19: float du = 1.0 / usub; eleni@19: float dv = 1.0 / vsub; eleni@19: eleni@19: float dx = du * w; eleni@19: float dy = dv * h; eleni@19: eleni@19: glBegin(GL_QUADS); eleni@19: for (int i=0; i