Re: background texture using glDrawPixels

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 10/12/2000 22:34:30


No clear in pfDraw, you are expected to clear if you have a draw
callback on a channel.

You may not need to clear if you set your depth test to always when you
draw the image.
Same thing goes for stencil test and write when drawing.

In general your code should work I as far as I can tell. Are you sure
you are double buffered?

Cheers,Angus.

Yoram Shahak wrote:
>
> Hi,
>
> I am trying to implement background texturing using glDrawPixels in my
> draw call back.
> my code looks something like this :
>
> void drawCallBack(pfChannel *chan, void *data)
> {
> preDraw(chan, data);
> pfDraw();
> }
>
> void preDraw()
> {
> chan->clear();
> glClearStencil(0x0);
> glClear(GL_STENCIL_BUFFER_BIT);
>
> pfVec3 farPlaneLL, dummy;
> chan->getFar(farPlaneLL, dummy, dummy, dummy);
>
> glRasterPos3f(farPlaneLL[0], farPlaeLL[1], farPlaneLL[2]);
> glDrawPixels(winWidth, winHeight, imageFormat,GL_UNSIGNED_INT,
> imageBuffer);
>
> }
>
> As a result I get the background image flickering if at all seen.
> Does performer clear the gl buffer in pfDraw ?
> Am I going totally the wrong way about implementing this ?
>
> Please help .
> Thanx.
>
> :o)
>
> Yoram Shahak
> DreamTeam ltd.
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/

"In the middle of difficulty lies opportunity." --Albert Einstein


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Oct 12 2000 - 22:34:46 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.