Re: How do I overlay Performer scene on X window grafic c

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Thu, 18 Jun 1998 11:42:13 -0700


ISOMURA_MITUGU wrote:
>
> Thank you for your quick reply.
>
> > If you use an OpenGL rendering context in the Motif window
> Maybe yes. I referenced Performer sample c source "motif.c" when I make
> my program. I create ManagedWidget like below.
>
> Widget v_glwidget; /* performer drawing area */
> Widget V_frame_widget; /* Frame widget, parent of v_glwidget */
> XVisualInfo *vi;
>
> v_glwidget = XtVaCreateManagedWidget("v_glwidget",
> glwMDrawingAreaWidgetClass, V_frame_widget, GLwNvisualInfo, vi,
> NULL);
>
> > you could introduce 50% alpha to the performer image in memory after
> > you read from performer but before you glDrawPixels. Then you can enable
> > blending and drawpixels with source_alpha, one_minus_source_alpha for
> > the blend.
> When I draw Performer image, I use pfFrame().
> Must I do anything before pfFrame()? Or must I change some performer
> configuration to use alpha blending?

No, just:

1)draw the performer image normally.

2)glReadPixels this image.

3)Add the alpha information in system memory.

4)glDrawPixels the transparent image in the glContext for the motif
application.

The last two stages have nothing to do with performer,
and stage 2 is called in a channel draw callback after
you call pfDraw.

You could use the picel transfer stuff in the gl to add
alpha during the gldrawpixels but just try the avove for
now.

Cheers,Angus.

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux 

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/ ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:33 PDT

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