Re: Problem with OpenGL calls
Phil Keslin (philk++at++cthulhu.engr.sgi.com)
Thu, 10 Dec 1998 10:14:29 -0800
Don Burns wrote:
>
> On Dec 10, 12:22pm, Javier Muņoz Lagaron wrote:
> > Subject: Problem with OpenGL calls
> >
> > [ plain text
> > Encoded with "quoted-printable" ] :
> Hello,
> >
> > We are developing a Performer application.
> > In this application, we want to make OpenGL
> > calls in the draw process.
> >
> > But it doesnīt work if I use certain calls as
> > glRasterPos2i. I donīt know if I must change
> > something in the configuration of pfWindow
> > or pfPipeWindow for working with that
> > calls.
> >
> > For example these lines donīt work:
> >
> > GLint vals[4];
> > GLboolean val;
> >
> > glGetIntegerv(GL_CURRENT_RASTER_POSITION,vals); <-1
> > glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID,&val);
> > glRasterPos4i(0,0,0,1);
> > glGetIntegerv(GL_CURRENT_RASTER_POSITION,vals); <-2
> > glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID,&val);
> > glDrawPixels(nave->ns,nave->nt,GL_RGB,GL_UNSIGNED_BYTE,nave->imagen);
> >
> > 1 and 2 returns the same values, and the imagen isnīt displayed.
> >
> > Can anyone give us any clue?
> >
> > Many thanks
> >
>
> Javier,
>
> It is quite possible that the OpenGL calls are working as expected.
> glDrawPixels will apparently fail if the current raster position is not within
> the viewing frustum.
>
> To test this, force the viewing frustum to something known.. For example, use
> glOrtho( 0, 1, 0, 1, -1, -1 ), just before the RasterPos call. If the image
> then appears you know your problem.
>
> -don
The arguments to RasterPos are transformed by the current
modelview/projection matrices. If the transformed coordinates do not lie
within the viewport, DrawPixels will fail. What does the valid flag
indicate? If true then invalid coordinates are not your problem. You may
have some other state enabled (e.g., texturing) or color buffer writes
disabled (ColorMask).
- Phil
--
Phil Keslin <philk++at++engr.sgi.com>
This archive was generated by hypermail 2.0b2
on Thu Dec 10 1998 - 10:14:33 PST