I am using openGL to render geometry shapes such as stipple filled polygons. The problem I am runing into is that the stipple-filled pattern becomes mis-aligned AFTER Win32’s ScrollWindow(). I am using an offscreen DIB method to buffer openGL rendering. When scrolling occurs, I only redraw the invalidated area caused by scrolling. The problem appears that the stipple pattern no longer matches the previous one and therefore leave a small gap between them.
The similar problem can exist with GDI, but it can be solved by calling WIN32’s SetBrushOrgEx() to change brush(stipple pattern)'s origin after scrolling.
However, I am not aware there is a way to reset stipple pattern’s origin in openGL. I think both GDI and openGL needs to know the origin of the stipple pattern. There must be an openGL way to deal with this problem.