From: Rajesh R (rajeshr++at++cair.res.in)
Date: 07/05/2005 21:42:20
I want to render a bckground texture. I tried to render it using Channel
Call back function. But no texture is being rendered.Even the pfb model
which I am supposed to draw infront the background is not seen. Can
anyone suggest where I am going wrong
The following are the
few lines from my application.
In the main function I am calling Callback Function.
pfChanTravFunc(chan, PFTRAV_DRAW, DrawChannel);
// Function for rendering the background texture
void DrawChannel(pfChannel *chan, void *data)
{
int imagebuffer[500][500];
int j,i;
int k;
pfVec3 far, dummy;
for(i=0;i<500;i++)
{
for(j=0;j<500;j++)
{
imagebuffer[i][j] = (i+j)%255;
}
}
glClearStencil(0x0);
glClear(GL_STENCIL_BUFFER_BIT);
pfGetChanFar(chan, far,dummy,dummy,dummy);
glRasterPos3f(farPlaneLL[0], farPlaneLL[1],
farPlaneLL[2]*0.99999);
glDrawPixels(winWidth, winHeight, GL_RGB,GL_UNSIGNED_INT,
imagebuffer);
pfDraw();
}
With regards,
RAJESH.R
VR LAB,
IRIS, c/o CAIR,
Bangalore - 1;
Phone - 080- 22256473
This archive was generated by hypermail 2b29 : Tue Jul 05 2005 - 22:06:26 PDT