Re: AntiAlias and Multisampling

New Message Reply Date view Thread view Subject view Author view

Allan Schaffer (allan)
Sat, 18 Oct 1997 17:17:45 -0700


On Oct 17, 8:26pm, Gary Quinn wrote:
> Firstly, I can't persuade Antialiasing to work when
> using 3 channels out of an IR, but it does work
> (sometimes) when using only one channel.

setenv PFNFYLEVEL 9 (or something high) to see why. My guess is that
with 1 channel, your system runs with medium pixel depth. With three
channels, you probably only have enough RM boards to support small
pixel depth, which doesn't have any doublebuffered 8-bit multisample
visuals (only 4 bit). Load the 3-channel video combination & run
/usr/gfx/gfxinfo to see whether you are running with small or medium
pixel depth.

> I suspect that this has something to do with the
> AntiAliasing multisampling which seems to default
> to 8x8 when there's enough memory, and nothing when
> there's not enough memory - hmmm, but I can't
> verify this.
>
> Is there a way to ask for (say) 4x4 or 2x2
> multisampling ?

Yes, when configuring the pfPipeWindow do something like this:

static int FBAttrs[] = {
    PFFB_RGBA,
    PFFB_DOUBLEBUFFER,
    PFFB_DEPTH_SIZE, 1,
    PFFB_RED_SIZE, 1,
    PFFB_SAMPLES, 4,
    PFFB_STENCIL_SIZE, 1,
    None,
};

[...]
    pfPWinFBConfigAttrs(pipewindow, FBAttrs);

The 'PFFB_SAMPLES, 4' is a hard specification: it tells Performer
that you require that item to be exactly that value. Specifying "1"
in the others says "as much of this as is available."

Load the 3-channel video combination and then run '/usr/sbin/glxinfo'
(or glxinfo -t) to find out what's available. You can then tailor
your FBAttrs info to this.

> On High and Max Impact, I can't
> persuade AntiAliasing to work at all :-(

High & Max Impact don't have multisample buffers.

> My second problem seems so trivial that it's
> driving me up the wall. I must be missing something
> so silly that I'm prepared to kick myself down the
> street when I find the answer.
>
> I can't disable texturing.
>
> pfGStateMode(shared->gstateScene, PFSTATE_ENTEXTURE, PF_OFF);
>
> I've tried pfOverride() with PF_ON and PF_OFF, before AND after
> the above - with no effect - textures are always on !

This doesn't work because of lazy evaluation of state. The "global
geostate" attributes are only used for objects which don't have their
own attributes set.

pfDisable(PFEN_TEXTURE);
pfOverride(PFSTATE_ENTEXTURE, PF_ON);

...in a DRAW process callback should do the trick.
(See perfly.c 'localPreDraw()' code as an example)

> I'm using similar code for wireframe
>
> pfGStateMode(shared->gstateScene, PFSTATE_ENWIREFRAME, PF_ON);
>
> which does enable/disable wireframe for me, so I can't
> understand why the texture switch doesn't work.

Your geostates don't happen to have wireframe specified so they all
pick up whatever is set for the 'global geostate'.

Allan

-- 
Allan Schaffer                                                allan++at++sgi.com
Silicon Graphics                               http://reality.sgi.com/allan
=======================================================================
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:56:06 PDT

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