I have a problem and I don’t know how I can fix it.
Ok, what I 'm trying to do is to draw a widget (like a rectangle).
The widget has in its structure an X,Y coordinate pair that defines a reference point for the rectangle, a width and a height.
These are the items I use to draw the rectangle.
Now, in this structure there is a second width and height that defines the area that the rectangle may use.
If the rectangle width/height is larger than the area width/height, then the the drawn rectangle is limited to the area width/height.
The draw of the widget has to be clipped on the area boundaries.
For now I solved it by using glScissor to limit the area where the widget can be drawn.
An other option of the widget is that I can rotate the rectangle.
Now when I rotate the rectangle, the drawn rectangle is rotated but I cannot rotate the scissor box.
This results in the rectangle is drawn completely out of the scissor area and nothing is drawn.
I can not reposition the scissor box because it is always an X, Y oriented box and not on a given angle.
Does somebody knows how this can be done.
I have to use OpenGL 1.0 and I can not use all the functions available.
Actually I use OpenGL 1.0 SC.