glClipPlane problem

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?

static bool t = true;
matrix_push(); // save current matrix
matrix_pure_reset(); // normalize matrix
matrix_move_z(-8.0f); // move to (0,0,-8)
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);

// bind and draw another texture (Porche)


Whats wrong ?

I don’t think you really want to use a clip plane for this. If you want to trim a specific area of the screen, you might want to consider using the stencil buffer and mask out the sections of the screen you don’t want the bitmap drawn to. Sorry if I misunderstand what you are trying to do.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.