長方形を描画するときは
const GLfloat squareVertices[] = {
x0, y0,
x1, y1,
x3, y3,
x2, y2,
};
const GLubyte squareColors[] = {
static_cast<GLubyte>(red), static_cast<GLubyte>(green), static_cast<GLubyte>(blue) ,static_cast<GLubyte>(alpha),
static_cast<GLubyte>(red), static_cast<GLubyte>(green), static_cast<GLubyte>(blue) ,static_cast<GLubyte>(alpha),
static_cast<GLubyte>(red), static_cast<GLubyte>(green), static_cast<GLubyte>(blue) ,static_cast<GLubyte>(alpha),
static_cast<GLubyte>(red), static_cast<GLubyte>(green), static_cast<GLubyte>(blue) ,static_cast<GLubyte>(alpha),
};
glVertexPointer(2, GL_FLOAT, 0, squareVertices);
glEnableClientState(GL_VERTEX_ARRAY);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, squareColors);
glEnableClientState(GL_COLOR_ARRAY);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
このとき、特定点は描画しない、
ということはできるのでしょうか。
具体的には、長方形に丸い穴をあけたり、円同士重なったところだけを描画したり
というようなことは可能なのでしょうか。
何かヒントをいただければ嬉しいです。
よろしくお願いします。