Re: Infinite Reality, Colour matrix etc

New Message Reply Date view Thread view Subject view Author view

Graham Jones (graham.jones++at++sharp.co.uk)
Thu, 23 Jan 1997 16:45:15 +0000


Angus Dorbie wrote:
> glColorMask should be enough for this without lookup tables
> after the component select.

It certainly is, no problem there.

> You should try GL_QUAD_INTENSITY8_SGIS as the components term
> in glTexImage2D (the internal format) if you want to use
> glTexParameter to isolate components.

Ran Yakir wrote:
> You should do the following :
>
> When you create the pfTexture that is being subtexloaded with the
> screen, you should give it an internal format of
> GL_QUAD_LUMINANCE8_SGIS. I think that
> Performer will eat this argument although it is a GL constant.

Now I'm getting somewhere - I thought about doing this almost
simultanously with the arrival of your mail. I have found that the
format needs to be GL_QUAD_INTENSITY8_SGIS, as Angus suggested, rather
then the LUMINANCE version but otherwise that is the method that works.

> When you need to use the texture, bind it first (using apply()), and
> then call glTexParameter with the selection.

Now I do get an intensity texture drawn on my tri-strips.

That leaves me with only (!) 2 problems.

1) The texture extracted by the glTexParameter setting seems to taking 4
bits out of the 8 in the particular colour component selected.

The top 4 bits of the 8 are duplicated into the bottom 4 to make the
full 8 bit grey level. So a pixel value in hex of 39 would show on
screen as hex 33 (in R, G, B and A). It's better than it not happening
at all but can I get the full 8 bits?

2) The other problem is that intermittently (always the worst problems)
my stencil mask is not written to the screen and then nothing appears.
It looks like some state or position is being left over from the
rendering of the previous channels causing the origin not to be where I
expect and the glDrawPixels call fails. Is there any way of guaranteeing
the geometry state at the start of a draw callback?

Of course I could just set it explicitly.

Thanks again for all your help, I seem to be on the road to sanity at
last.

Graham.

-- 
Sharp Laboratories of Europe,         Phone: +44-(0)1865-747711
Oxford Science Park,                  Fax:   +44-(0)1865-714217
Oxford, OX4 4GA
England                               Graham.Jones++at++sharp.co.uk
=======================================================================
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:54:27 PDT

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