glCopyTexSubImage2D
Can I use glCopyTexSubImage2D to grab only the alpha buffer into a GL_ALPHA8 texture?
ie if my texture, which I set up already in a different call, is not RGBA, will the copy automatically know to only copy the components that the texture supports, or will it try to mangle the original RGBA data and squeeze it into the texture?
Also, do you know if glCopyTexSubImage2D uses the CPU to copy the data or does it do it with the GPU? (NVidea GeForce 4MX)
Thanks
ie if my texture, which I set up already in a different call, is not RGBA, will the copy automatically know to only copy the components that the texture supports, or will it try to mangle the original RGBA data and squeeze it into the texture?
Also, do you know if glCopyTexSubImage2D uses the CPU to copy the data or does it do it with the GPU? (NVidea GeForce 4MX)
Thanks
It works when copying into luminance textures, so I don't see why not. However I don't think that it's very efficient. If the source and destination factors aren't the same it will have to convert/unpack the bits, presumably with the processor and not the video card.
Experts?
Experts?
It's a fairly safe bet that you will get CPU conversion of colors when packing. What you likely want to do is to copy it as RGBA - that will get you the fast GPU path. Then you just ignore the RGB components when you use the texture....
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| glCopyTexSubImage2D vs antialiasing on iPhone? | Mark Levin | 4 | 3,925 |
Jul 16, 2010 01:46 AM Last Post: Bersaelor |
|
| Trouble with glCopyTexSubImage2D when using multisampled rendering | TomorrowPlusX | 11 | 4,418 |
Nov 1, 2006 02:54 PM Last Post: OneSadCookie |
|
| Quick question, will glCopyTexSubImage2D with with RECT textures? | TomorrowPlusX | 28 | 7,937 |
Jun 8, 2006 07:04 PM Last Post: akb825 |
|
| 2D games and glCopyTexSubImage2D() | Skorche | 7 | 5,845 |
Feb 19, 2005 11:25 PM Last Post: Skorche |
|

