Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Color matrix issues with glCopyTexImage2D



I'm trying to implement a certain video effect (without pixel
shaders). This effect involves blitting red and blue channels to the
screen, and then combining the two to form the green channel. The
first step is easy and works perfectly... create a GL_LUMINANCE
texture from the framebuffer and blit that straight back into the
framebuffer (with a glColorMask). The red channel is the one used to
create GL_LUMINANCE textures, so it works fine.
The next step involves doing the same step with the blue channel, only
with glBlendEquation(GL_MIN), glBlendFunc(GL_ONE, GL_ONE), and
blending enabled. It works completely except for the extraction of the
blue channel.
I've tried two different ways... creating a GL_LUMINANCE texture with
the color matrix [[0,0,1,0],[0,0,0,0],[0,0,0,0],[0,0,0,1]] and
creating a GL_RGB texture with
[[0,0,0,0],[0,0,1,0],[0,0,0,0],[0,0,0,1]]. My video card (a Radeon
9600 Pro 64MB) supports ARB_imaging, but setting the color matrix
before the glCopyTexImage2D does not seem to change the generated
texture, unless I have the color matrix set at the previous buffer
swap, which switches it to the software renderer, making the effect
useless.
Is there some stupid thing I'm missing? Am I going to have to
implement this with shaders to run in hardware on my 9600 and, if so,
will the effect as described above be accelerated on any earlier ATI
cards? (Radeons, anyway)
I'm on Mac OS 10.4.1, if that matters.
-:sigma.SB
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.