RE: Restrictions on [FxTexture createData]?
RE: Restrictions on [FxTexture createData]?
- Subject: RE: Restrictions on [FxTexture createData]?
- From: "Bret Battey" <email@hidden>
- Date: Thu, 30 Aug 2007 09:56:45 +0100
- Thread-topic: Restrictions on [FxTexture createData]?
Title: RE: Restrictions on [FxTexture createData]?
Pete,
I finally gave up on trying to get createData to work on a project last year and have been stuck with a software-render only (and slow) plugin as a result.
Do you have an example piece of code that could be easily provided demonstrating this process of rendering to the pbuffer and using glReadPixels on that?
Cheers,
Bret Battey
Music, Technology and Innovation
De Montfort University
Leicester, UK
-----Original Message-----
From: pro-apps-dev-bounces+bbattey=email@hidden on behalf of Pete Warden
Sent: Fri 8/24/2007 1:27 AM
To: Matt Rhodes
Cc: email@hidden
Subject: Re: Restrictions on [FxTexture createData]?
Hi Matt,
sorry for the slow reply on this one. The bad news is that we've run into a fair number of GL problems when trying to retrieve data directly from GL textures, even without using the FxTexture calls. What we've normally ended up doing is rendering the texture into our own pbuffer, and then doing a glReadPixels from that.
The problem with getting the data from textures seems to arise because there's so many different objects that may appear as a texture, some of which, like pbuffers and FBOs, weren't created from data on the CPU originally. This means a read-back from the card, and unfortunately those paths seems to be little-used and have a fair number of issues.
Pete
On Aug 20, 2007, at 6:03 PM, Matt Rhodes wrote:
Hey Team.
I need to grab the image data from an FxTexture (to set it up in our internal texturing system).
I'm trying to use [FxTexture createData].
Are there limitations as to what I can pass to the function, especially in terms of the withType parameter?
I'd like to retrieve a GL_RGBA/GL_FLOAT combo (4 floats - 16 bytes - per pixel, right?), but I can live with something like GL_RGBA/GL_UNSIGNED_BYTE.
I've tried GL_RGBA/GL_UNSIGNED_BYTE, but it crashed the second time the method was called.
I've tried GL_RGBA/GL_FLOAT, but there doesn't seem to be enough data returned.
For GL_RGBA/GL_FLOAT, I'm assuming that the size of the data returned is:
[txt width]*[txt height]*4*sizeof(float)
I'm trying these calls within -renderOutput.
Any suggestions would be helpful.
Thanks.
Matt Rhodes
Zaxwerks, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden