๐Ÿ“ฆ IamLizu / cgCustomFunctions

๐Ÿ“„ funcs.cpp ยท 18 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18void quadHorzInt(int pT, int pB, int fixedP, int fixedQ) {
    glVertex2i(pB, fixedP);
    glVertex2i(pT, fixedP);
    glVertex2i(pT, fixedQ);
    glVertex2i(pB, fixedQ);
}

// float 
void quadHorzFloat(float pT, float pB, float fixedP, float fixedQ) {
    glBegin(GL_QUADS);
    glVertex2f(pB, fixedP);
    glVertex2f(pT, fixedP);
    glVertex2f(pT, fixedQ);
    glVertex2f(pB, fixedQ);
    glEnd();
}