Fast way to specify alpha value on RGB to RGBA conversion?

Does anyone know of a performant way to force an explicit alpha value (other than the default) when using glCopyTexSubImage2D() to load a RGB source image into an RGBA texture? glPixelTransferf(GL_ALPHA_SCALE, xx) is way too slow.

Thanks for any help.

not really a solution to your problem, but on rendering you could change the whole texture’s alpha manually with a workaround using GL_ARB_texture_env_combine extension (if you are with fixed function pipeline, else it would be trivial with shaders)

in tex_env_combine you can use a “constant” value per texture unit. therefore you can override texture’s alpha using a constant value you specify

you would set your alpha_combine to replace and source to constant, operand with alpha.