[gl2ps] Need solution for correcting generated PS file's dimensions

Sheetal Deshpande Sheetal.Deshpande at mscsoftware.com
Thu Sep 4 09:14:01 CEST 2014


Hi,

I have started using gl2ps functionality recently. It satisfies my need to capture 3d scene at different times of rendering.
I use it in my code as below
       state = GL2PS_OVERFLOW;
       fp = fopen("mypsoutput.ps", "wb");
       while(state == GL2PS_OVERFLOW)
       {
              buffsize += 1024*1024;
              renderingVetorPlotMode = true;


              gl2psBeginPage("Sample", "GfxGraphicsEngine", NULL, GL2PS_PS, GL2PS_NO_SORT,
GL2PS_NO_BLENDING | GL2PS_NO_PIXMAP | GL2PS_DRAW_BACKGROUND | GL2PS_USE_CURRENT_VIEWPORT|GL2PS_LANDSCAPE | GL2PS_OCCLUSION_CULL| GL2PS_TIGHT_BOUNDING_BOX,
                     GL_RGBA, 0, NULL, 0, 0, 0, buffsize, fp, "mypsoutput.ps");

              draw();//call to draw all objects in a scene

              renderingVetorPlotMode = false;
              state = gl2psEndPage();
       }
       fclose(fp);

Also gl2ps is used for printing text in PS file in same scene like below.
       glRasterPos3d(sx, yr, sz);
       gl2psTextOpt(sm_string.c_str(),font_family,m_ifont->getFontHeight() ,align, orientation);


Now when I get the generated PS file it is not covering complete scene.
I have attached the screenshot and the generated PS file with this mail.
Please write back to me if there is any solution so that complete scene can be captured in this PS file.

PS: Currently I am using 'Rampant Logic Postscript Viewer' version 1.2 for opening this PS file which opens it in adobe reader.

Let me know if the problem is in the viewer and not while generating the PS file.

Thanks in advance.
Regards,
Sheetal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gl2ps/attachments/20140904/a1cb29af/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mypsoutput.ps
Type: application/postscript
Size: 217660 bytes
Desc: mypsoutput.ps
URL: <http://www.geuz.org/pipermail/gl2ps/attachments/20140904/a1cb29af/attachment.ps>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SceneImage.PNG
Type: image/png
Size: 47953 bytes
Desc: SceneImage.PNG
URL: <http://www.geuz.org/pipermail/gl2ps/attachments/20140904/a1cb29af/attachment.PNG>