<div dir="ltr"><div>Hello,</div><div><br></div>I'm having troubles rendering to gl2ps.  When I try to render to gl2ps, I get a eps that is blank, but has the correct dimensions.  This makes me think that it's using the correct viewport, but something is going wrong with the actual rendering.  The GL option I am using are:<div><br></div><div><div>            glewInit();</div><div>            glClearColor(1.0, 1.0, 1.0, 1.0);</div><div>            glEnable(GL_DEPTH_TEST);</div><div>            glDepthFunc(GL_LESS);</div><div>            glEnable(GL_BLEND);</div><div>            glEnable(GL_VERTEX_PROGRAM_TWO_SIDE);</div><div>            glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);</div><div>            glEnable(GL_LIGHT0);</div><div>            glEnable(GL_LIGHT1);</div><div>            glEnable(GL_LIGHT2);</div><div>            glEnable(GL_LIGHT3);</div><div>            glEnable(GL_LIGHT4);</div><div>            glEnable(GL_LIGHT5);</div><div>            glEnable(GL_LIGHT6);</div><div>            glEnable(GL_LIGHT7);</div></div><div><br></div><div>Although I've tried commenting these out with no effect.  I'm also using shaders and frame buffer objects -- will these effect gl2ps in anyway?</div><div><br></div><div> The snippet of code that renders to gl2ps is:<div><br></div><div><div>void RenderToFile(const GLfloat rotX, const GLfloat rotY, const GLfloat rotZ, const GLfloat distance)</div><div> {</div><div>            FILE *fp = fopen("myoutput.eps", "wb");</div><div>            GLint buffsize = 0, state = GL2PS_OVERFLOW;</div><div>            GLint viewport[4];</div><div><br></div><div>            glGetIntegerv(GL_VIEWPORT, viewport);</div><div>            </div><div>            char *oldlocale = setlocale(LC_NUMERIC, "C");</div><div><br></div><div>            /* gl2ps drawing stuff */</div><div>            setlocale(LC_NUMERIC, oldlocale);</div><div><br></div><div>            while( state == GL2PS_OVERFLOW )</div><div>            {</div><div>                buffsize += 1024*1024;</div><div>                gl2psBeginPage ( "Titles", "Software", viewport,</div><div>                                GL2PS_EPS, GL2PS_BSP_SORT, GL2PS_SILENT |</div><div>                                GL2PS_SIMPLE_LINE_OFFSET | GL2PS_NO_BLENDING |</div><div>                                GL2PS_OCCLUSION_CULL | GL2PS_BEST_ROOT | GL2PS_USE_CURRENT_VIEWPORT,</div><div>                                GL_RGBA, 0, NULL, 0, 0, 0, buffsize,</div><div>                                fp, "myoutput" );</div><div>                Render(rotX, rotY, rotZ, distance);</div><div>                state = gl2psEndPage();</div><div>                </div><div>            }</div><div>            fclose(fp);</div></div><div>}</div></div><div><br></div><div>Here, Render(...) contains the actual drawing commands.  Any help would be appreciated.</div><div><br></div><div>-- Greg</div><div><br></div></div>