PDA

View Full Version : [OpenGL ES 1.1] Combine glColorf with Mesh color



asunaf
04-24-2012, 03:11 PM
Hi there, i have one little problem with a task that seemed quite simple at the beginning, but is not that easy.

I have a scene, with meshes all over the place. Some meshes represent simple geometrical objects, with plain outline and fill, some others are textured, and some have both texture and per-vertex color blending with the texture itself.

Now, the problem is about fading the whole scene in and out. when a mesh with per-vertex color is rendered, the values provided with glColor4f are ignored, so i can't simply specify

glColor4f(1,1,1,a)
and programmatically change 'a' over time to reach my purpose.

So the question is: How can i mix glColor4v() and vertices color w/o creating the mesh again over and over?

Thanks in advance

ZbuffeR
04-24-2012, 04:33 PM
If this is about fading, simply draw a fullscreen translucent quad over your scene.

asunaf
04-24-2012, 04:49 PM
I only want some objects to fade in/out. The background, which is rendered with some meshes and/or texture patterns, must not be involved in the fading process.

Thanks for your answer