I have a small texture, multiplied with help GL_REPEAT on all window. How with the help a glClipPlane to cut off it so that there was a rectangular on the center of the sizes w x h?
sample:
static bool t = true;
matrix_push(); // save current matrix
matrix_pure_reset(); // normalize matrix
matrix_move_z(-8.0f); // move to (0,0,-8)
glEnable(GL_CLIP_PLANE0);
draw_background(BGquads.bits(), &texQuads, 32, width(), height(), t); // draw quads
matrix_pop(); // restore matrix
write_gl_matrix(); // and write it
double e[4] = {150, 0, 0, 0}; // try to cut of pixels on the right hand
glClipPlane(GL_CLIP_PLANE0, e);
glDisable(GL_CLIP_PLANE0);
matrix_move_z(-7.0f);
// bind and draw another texture (Porche)
Result:
http://ksquirrel.sourceforge.net/IMG/error3.png
Whats wrong ?
Thanks.