Subversion Repositories DIN Is Noise

Rev

Rev 2097 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
964 jag 1
/*
2
* cross_button.cc
2302 jag 3
* DIN Is Noise is copyright (c) 2006-2025 Jagannathan Sampath
1713 jag 4
* DIN Is Noise is released under GNU Public License 2.0
1479 jag 5
* For more information, please visit https://dinisnoise.org/
964 jag 6
*/
7
 
8
#include "cross_button.h"
9
 
10
void cross_button::draw () {
1132 jag 11
  box<int>& e = extents;
964 jag 12
  glColor3f (clr.r, clr.g, clr.b);
1132 jag 13
  {
14
    int pts[8] = {e.left, e.bottom, e.right, e.top, e.left, e.top, e.right, e.bottom};
15
    glVertexPointer (2, GL_INT, 0, pts);
16
    glDrawArrays (GL_LINES, 0, 4);
1459 jag 17
    pts[0] = e.right; pts[1] = e.top;  pts[2] = e.left; pts[3] = e.bottom;
18
    pts[4] = e.right; pts[5] = e.bottom; pts[6] = e.left; pts[7] = e.top;
19
    glDrawArrays (GL_LINES, 0, 4);
1132 jag 20
  }
1459 jag 21
  /*{
1132 jag 22
    int pts[4]= {e.right, e.top, e.right, e.bottom};
23
    glVertexPointer (2, GL_INT, 0, pts);
24
    glDrawArrays (GL_POINTS, 0, 2);
1459 jag 25
  }*/
964 jag 26
}