   How to draw "lines" in Op
  I'm using a circle gradient texture to draw lines with a smooth edge. The texture goes from 255,255,255,255 in the center to 255,255,255,0 on the outside.So to draw a line, I draw the line body using the vertical middle slice of the texture. And I draw a cap on each end to make it look nice.I'm using these lines to draw a snake (tron style but that can turn 360 degrees). I need these caps because sometimes a segment gets removed and I want the surrounding segments to look nice.As you can see in the screenshot, I can't seem to find the correct GLES 1.1 mode to get the lines to draw properly one after the other.The Blend mode uses the classic: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);Which does not draw the lines properly (the alpha is wrong at the intersection).Also I tried a couple of silly logic operations.What I need  is to draw the pixel only if its alpha value is higher than what's already displayed.I looked at glAlphaFunc, but it can only compare the incoming alpha to a set value.Is there's any way to do that using the fixed pipeline of OGLES 1.1 ? (It's on the iPad)Thanks !PS: sorry I mistyped the title, can't seem to correct it.   
  I can't think of any blend function that will give you exactly what you want there. Have you considered that you can probably get a good look without doing any blending? You could only put a cap on lines that have no connecting lines, and otherwise bisect your 'line quads' at the half angle between their intersection. This would ensure that there's no drawing overlap between two lines.Something like this:[attachment=2031:lines.JPG]   ;  Does that hardware support the MAX blend operation? GL has had those in the API for a while, and they might do exactly what you want.   ;  karwosts:Your suggestion is interesting and thanks for the drawing.But it wouldn't display properly when 2 lines would be drawn side by side (eg:  snake going back along its trail or 2 snakes going close to each other).It wouldn't "blend" properly.osmanb:What extension is that exactly ? I don't think the iPad would have it.For a moment, I thought the logic OR operation would work (kind of returning the max of the incoming fragment and the destination fragment). But it doesn't.I'll also check if I can use OGLES 2.0 in the middle of my cocos2d game or if I can use the experimental OGLES 2.0 build of cocos2d.Any other suggestions ?Thanks   ;  I think osmanb's extension might be GL_EXT_blend_minmax. No idea if its supported on iOS.That's true that my suggestion won't work when the line doubles over on top of itself, I didn't think of that. OR doesn't work because it's not the same thing as taking the max. (2'b10 | 2'b01) != max(2'b10, 2'b01).The only other idea I can think of is to render the line just as a solid single line to a separate render target, and then try a bloom-like blur filter to the entire snake. Then throw down that image on top of the rest of your scene. Its not terribly elegant though. Sometimes the things you want to do with blending don't always fit nicely into what the hardware can achieve :-\   ;  Alright, GL_EXT_blend_minmax is supported on the iPad and works like a charm.Here's a screenie.Thanks to both of you guys   