Hello,
I am working on a scientific visualization application using opengl. I also use additional library called Global Mapper. Now Global Mapper doesn’t have rendering interface with OpenGL directly. So the indirect way to get Global mapper’s output to my opengl based application is to render Global Mapper’s output into memory, read it in OpenGL using read pixels and render again using glDrawPixels().
It works fine with other entities which are being rendered in opengl. I face issues only when a OGLFT based text is inserted and rendered. Once the text is used, I can see there is a shift in the position of objects rendered with Global Mapper. At a times, I can also see there forms a transparent margin, beyond which the Global Mapper’s output is not rendered (as if the viewport is restricted).
No doubt OGLFT is wonderful text rendering library and I don’t want to ignore it. I just digged into the code, and I saw that OGLFT library uses glRasterPos2i during rendering. And probably this might be causing the shift to occur. If I don’t use texts, then I don’t see this offset. How can I reset the raster position for glDrawPixels() so that I do not the any shift at the left hand side? Would rendering pixels to textures help?
Thanks
Regards