Re: Problem with OpenGL calls
Don Burns (don_burns++at++peru.csd.sgi.com)
Thu, 10 Dec 1998 09:48:57 -0800 (PST)
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
This archive was generated by hypermail 2.0b2
on Thu Dec 10 1998 - 09:50:16 PST