Re: info-performer Jun 15 2001

New Message Reply Date view Thread view Subject view Author view

From: Guillaume Smietanski (gsmietan++at++fmr.tu-darmstadt.de)
Date: 06/18/2001 00:38:13


>
> From: Changhee Han <changhee++at++ict.usc.edu>
> Date: Fri, 15 Jun 2001 11:54:55 -0700
> Subject: how to call pfDraw() more than one in vega draw callback function
>
> Dear performer people:
> Thank you especially all who responded to my stupid previous question.
>
> I have a still problem. So please let me know your valuable idea.
> What I want to make is that:
> Making audiences to see the original demostration image, I(an agent) want to
> do my own computation in my memory. For doing this, Back buffer can be used
> for the audience and Auxilary buffer can be used for me(an agent).
>
> Like in performer manual, saying pfDraw() can be called more than twice, I
> can use 2 times drawings onto BACK and AUX buffers in one drawing callback
> function by using chan->setTravFunc().
> In this case, the image for audience looks like no lighting ghost city (most
> of images are black and samll center places get only light like having
> fog(?))
>
> When I do this purpose by vega function like vgAddFunc() with some part of
> above my whole procedures, the image for audience seems to be drawn always
> correctly.
> But because my purpose needs 2 times drawing, based on my poor background
> (never taken graphics course, I will), I think vega DRAW callback, not post
> or pre, function should be needed. Or there will be some way for this by
> only using vgAddFunc, which I didn't know before. Based on my current
> knowledge, it can have only pre and post drawing callback function.
>
> Because of poor english, please let me summarize.
> Audience should see correct original demo image. I need some computation in
> another place(buffer).
> By performer channel draw function like setTravFunc, two times drawings can
> be done. But by some reason maybe with bug from our code, the image is
> blacken.
> It will be more stable to know vega DRAW callback fuction, meaning that I
> want to do two times drawings inside vega function.
>
> Thanks in advance,
> changhee
>
>
Hello Changhee,
We develop a software with different channel and so for each frame we
need to call more than one pfDraw. It should not be a problem. You only
need to erase correctly the frame one time (and only one time) for each
frame, I thinking that it is your problem. If it is, you can reuse the
following source code, I rewrite a part of our c++ code for you.
drawChannel is a callback function for the 3D channel, for each pipe we
have at less 2 channel one for 2D a second one for 3D representation.
Only the first channel clear the windows.

void
drawChannel (pfChannel * thisChannel, void *) {
  if (thisChannel->getPWin()->getChan(0)==thisChannel){

    thisChannel->clear();
    pfVec4 colors;
     // Red Green Blue Alphablending for display background
    colors = setBackgroundColor();
    pfClear(PFCL_COLOR, &colors);
    pfDecal(PFDECAL_BASE_DISPLACE);
  }
  pfDraw();
}

I hope this will help you.
Guillaume Smietanski.



New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jun 18 2001 - 00:30:30 PDT

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