android - Best Practice for Rounded Rectangles in OpenGL ES -
using opengl es, there seem 2 viable options rounded rectangles:
- manually draw shape using trig. (this i'm doing.)
- use a texture or group of textures scale appropriately, such 9-slice scaling
the problem first option antialiasing not come free, , if aiming compatibility wide array of devices, 1 can't count on opengl antialiasing hints work on hardware. you're left choppy-looking rounded rectangles, small ones, , performance overhead of making vertex array draw call. switch away this
the second option (9-slice or 9-patch) seems go-to method ui rounded rect elements, there surprisingly little information out there implementing 9-patching in opengl es.
what is: efficient strategy rendering antialiased rounded rectangles in opengl es adjustable border widths, border colors , fill colors. suggestions?
what want technique called edge anti-aliasing.
it described in answer: opengl es iphone - drawing anti aliased lines
just apply transparent vertexes @ outmost borderline of rectangle.
Comments
Post a Comment