From: Sergio Casas Yrurzum (sergiocy++at++arrakis.es)
Date: 04/14/2001 03:59:35
At Friday 13/04/2001 10:58, you wrote:
Oh, thanks for your reply.
>What hardware are you running on?
Well, I'm running on a Linux Intel Pentium III with a 3dfx Voodoo 5 AGP
(Mesa drivers) and Performer 2.4 (90 days version).
>Does performer print out any errors to
>the console when your subload fails? Does the subload fail entirely, or do
>you subload a 256x256 sub-image?
No, there are not print messages, and the subload fails entirely (it is
like ignored)
>As for the 5th parameter to subload, that's the width of the image data
>you're subloading from in case it does not match your texture width. We
>use it to set up the stride through the image.
Width in texels, I suppose.
And, what about the height? Is not needed. Why?
>-- Marcin
>
>On Fri, 13 Apr 2001, Sergio Casas Yrurzum wrote:
>
> >
> >
> > Hello,
> > first of all, many thanks to Stephane Jaeger and Angus Dorbie who
> helped me
> > to capture the framebuffer. Unfortunately, I have another problem..., so I
> > hope you can help me again, please.
> >
> > Well, my problem now is that I can't capture more than 256x256 pixels of
> > the framebuffer with the subload() function.
> >
> >
> > In order to make me understand, I'll show a piece of my source code:
> >
> > ..
> > ..
> > ..
> > pfTexture *texture;
> >
> > int main()
> > {
> > ...
> > ...
> > ...
> >
> > texture = new pfTexture();
> > unsigned int *image;
> >
> > int sizeTex = 1024;
> > image = (unsigned int *)pfMalloc(sizeof(unsigned
> > int)*sizeTex*sizeTex,pfGetSharedArena());
> >
> > texture->setFormat(PFTEX_EXTERNAL_FORMAT,PFTEX_PACK_8);
> > texture->setFormat(PFTEX_INTERNAL_FORMAT,PFTEX_RGBA_8);
> > texture->setFormat(PFTEX_IMAGE_FORMAT,PFTEX_RGBA);
> > texture->setLoadMode(PFTEX_LOAD_SOURCE,PFTEX_SOURCE_IMAGE);
> > texture->setName("Frame Buffer Texture");
> > texture->setImage(image,4,sizeTex,sizeTex,1);
> > texture->setLoadOrigin(PFTEX_ORIGIN_SOURCE, 0, 0);
> > texture->setLoadOrigin(PFTEX_ORIGIN_DEST, 0, 0);
> > texture->setLoadSize(sizeTex, sizeTex);
> > texture->setFormat(PFTEX_SUBLOAD_FORMAT, PF_ON);
> > texture->setFilter(PFTEX_MINFILTER, PFTEX_BILINEAR);
> > texture->setFilter(PFTEX_MAGFILTER, PFTEX_BILINEAR);
> >
> > texture->apply();
> > texture->format();
> > texture->load();
> >
> > texture->setLoadMode(PFTEX_LOAD_SOURCE, PFTEX_SOURCE_FRAMEBUFFER);
> >
> > ...
> > ...
> > ...
> > ...
> >
> > }
> >
> >
> > static void travOriginalChan(pfChannel *chan, void *)
> > {
> > // draw call-back function of the original channel
> >
> > chan->clear();
> > pfDraw();
> >
> > texture->subload(PFTEX_SOURCE_FRAMEBUFFER,
> > NULL,
> > 0,0, /* Source origin */
> > 0, /*
> ???? */
> > 0,0, /* Destination origin */
> > 1024,1024 /* Subload size */
> > );
> > }
> >
> >
> > static void travDistortedChannel(pfChannel *chan, void *)
> > {
> > // draw call-back function of the distorted channel
> >
> > chan->clear();
> > pfDraw();
> > }
> >
> >
> > If I change the last two values of the subload() call to ...256,256)
> > everythings works OK, but with ...512,512) or ...1024,1024) it doesn't
> > work (no subload is made).
> >
> > By the way, can anyone explain me what means the 5th argument of
> subload() ?
> > Whatever I put there, it seems to be ignored...
> >
> >
> > My window has a 1024x1024 size, and if I made a getImage() before the
> > subload(), I read this:
> >
> > comp = 4
> > s = 1024
> > t = 1024
> > r = 1
> >
> > so it seems the size of texture is not the problem.
> >
> > Does anyone know what the hell is happening??
> >
> >
> > Thanks, and sorry about my terrible english!!!
> >
> > -----------------------------------------------------------------------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Open Development Project: http://oss.sgi.com/projects/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
> >
>
>-----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
>Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2b29 : Sat Apr 14 2001 - 03:58:40 PDT