Matsumura Makoto (matumura++at++matsumura.nsg.sgi.com)
Mon, 14 Oct 1996 13:49:31 +0900
I'd like to image mapping in perfly. i.e. draw background and render the
scene near to the eye point.
I insert the following code in "localPreDraw in perfly.C "
I expect the raster position is set as (0.0, 0.0, 0.0, 1.0) and it is VALID.
I run the perfly (perfly -W 300) with this piece of code and get:
Current Raster Position 0.000000, 0.000000, 0.000000, 1.000000, 1
== After pressing "g" key:
PF Notice/Usage: OpenGL Error 0x504 - stack underflow
Current Raster Position 0.000000, 0.000000, 0.000000, 1.000000, 1
Is anything wrong with the code? way of doing this?
Thanks In Advance
best regards,
========== Code : localPreDraw in perfly.C ===============
{
float rp[4];
GLboolean vf;
glMatrixMode( GL_PROJECTION );
glPushMatrix();
glLoadIdentity();
glOrtho( 0.0, 1.0, 0.0, 1.0,0.0,1.0);
glMatrixMode( GL_MODELVIEW );
glPushMatrix();
glLoadIdentity();
glRasterPos4f( 0.0, 0.0, 0.0, 1.0);
glGetFloatv( GL_CURRENT_RASTER_POSITION , rp );
glGetBooleanv( GL_CURRENT_RASTER_POSITION_VALID , &vf );
printf("Current Raster Position %f, %f, %f, %f, %d\n",
rp[0], rp[1], rp[2], rp[3],vf);
/***
glDrawBuffer( GL_BACK );
glDrawPixels(xs,ys, GL_RGBA, GL_UNSIGNED_BYTE,
color_buffer_image);
***/
glMatrixMode( GL_MODELVIEW );
glPopMatrix();
glMatrixMode( GL_PROJECTION );
glPopMatrix();
}
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:45 PDT