Hi,
This is mostly a pure OpenGL question, and I’m sure I could eventually figure it out, but I am under time pressure, and I would like some input on how to achieve the following: I have a quad which is texture mapped (e.g. with a PNG) which already contains variable transparency, i.e. an object and, for exmaple, it’s shadow (and it’s of an irregular “shape” (opaque pixels) to begin with.
What I need to do, is render this object with variable transparency (i.e. scale the entire alpha channel) at runtime, i.e. without modifying the texture. For example, to have the object flashing smoothly, or fading in/out. My suspicion is that I can achieve this by altering the alpha component of the “colour” of the quad being drawn, and then tweaking the blending and texturing modes (i.e. using GL_MODULATE or something like that, instead of GL_DECAL).
Could anybody give me any pointers? And (the big “if”): Would I be able to achieve this using the JOGL Texture utility classes (which are already servign me well in dealing with non-power-2 textures) or would I need to take a look at the source code, and either implement my own, or subclass them if necessary? I would prefer to stay at a higher level of abstraction, i.e. as said, to deal with things like texture dimensions. (I don’t want to re-implement it all in OpenGL calls if possible)
thanks for any help,
Dawid