Re: Texture Paging

New Message Reply Date view Thread view Subject view Author view

Rob Jenkins (robj++at++quid)
Mon, 16 Dec 1996 11:51:32 -0800


On Dec 12, 2:01pm, Jeremy Hinegardner wrote:
> Subject: Texture Paging
> Has anyone done a log of texutre paging? I am looking for some good
> information on exactly how it is done and how to do it. I have some
extremely
> texture intesive databases that I will be working with and I have never done
> texure paging before. So any help is appreciated.
>
Javier Castellar posted some guidelines for doing this *on Infinite Reality* a
while ago, I'll paste it below:

Cheers
Rob

---------------------------------------------

Hi,

        Following please find how to page textures in iR using performer.

Performer initialization for texture paging :
---------------------------------------------

    share->tex = pfNewTex ( arena );

        /* PFTEX_SOURCE_IMAGE = source is in main memory */
        /* PFTEX_SOURCE_FRAMEBUFFER = source is the framebuffer */
        /* PFTEX_SOURCE_VIDEO = source is Sirius live video */
    pfTexLoadMode ( share->tex, PFTEX_LOAD_SOURCE, PFTEX_SOURCE_IMAGE);

        /* you should match the internal format with the external format */
        /* you could use GL_RGB10_EXT but since you need a fast paging *
        /* I recomend PFTEX_RGB_5 (five bits per component) */
    pfTexFormat ( share->tex, PFTEX_INTERNAL_FORMAT , PFTEX_RGB5 );
    pfTexFormat ( share->tex, PFTEX_SUBLOAD_FORMAT , PF_ON);
    pfTexFilter ( share->tex, PFTEX_MINFILTER , PFTEX_BILINEAR );
    pfTexFilter ( share->tex, PFTEX_MAGFILTER , PFTEX_BILINEAR );

            /* Texture size warnning: padding to powers of two */
    pfTexImage (share->tex , NULL, 3, textureSizeS, textureSizeT, 1);

Performer/OpenGL initialization draw callback (at initialization on FIRST
frame)
--------------------------------------------------------------------------------
[ You should make in on the Pre draw callback with other initializations ]

    if( share->first )
    {
        /* texture initialization (just in case) */
        /* this is the place in which the texture definition is being MADE */
        pfApplyTex(dist->tex);
    }

Performer/OpenGL POST draw callback (real time ... )
----------------------------------------------------
[It is in the POST draw callback in order to perform parallel paging while
the Raster Manager 6 is busy]

        pfSubloadTex( share->tex, PFTEX_IMAGE, (uint *) image
                    , 0, 0, 0, 0
                    , textureSizeS, textureSizeT);

If you change the image pointer per frame: you have a movie.

As far as I know the performer API works nicely (pfTexture::subload,
pfTexture::subloadLevel). pfSubloadTex is using internally glBindTextureEXT and
glTexSubImage2DEXT, glCopyTexSubImage2DEXT ... etc.

You have to convert the images to 5551 format (the main memory format) to match
the internal format and then save a lot of paging bandwidth. It is very easy.

Remember: all powers of two !!!!!!!!! My advice is to work in fields (60hz) of
512x256. Use izoom to perform the scan down. If they work in frames (30hz) I
may suggest 512x512. If they need more, you can use a 1kx1k texture and then
Subtexload only the video image. For subtexload in pieces you need to follow
paddings of 8 pixels in S and T.

Regards.

-Javier

--
*************************************************************************
* Javier Castellar Arribas     * Email:              javier++at++asd.sgi.com *
*                              * Vmail:            		 3-1589 *
* Member of Technical Staff    * Phone: (415)-933-1589 | 933-2108 (lab) *
* Applied Engineering 	       * Fax:                    (415)-964-8671 *
* Advanced Systems Division    * MailStop:                       8L-800 *
*************************************************************************
* Silicon Graphics Inc.                                                 *
* 2011 N. Shoreline Boulevard,                                          *
* Mountain View, California 94043-1386, USA                             *
*************************************************************************

-- 
________________________________________________________________
Rob Jenkins mailto:robj++at++csd.sgi.com
Silicon Graphics, Mtn View, California, USA
=======================================================================
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:10 PDT

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