2

I'm looking for a way to draw lines with thickness and smoothness with OpenGL ES2 without using the build it glLineWidth function which has a lot of limitations. I think this can be done using shaders, but my glsl skills are limited.

What I've already tried is to actually construct a poly with rounded joints like in this question's answer. However, for my purpose of free drawing this is an overkill and makes my app run very slow. So, I'm thinking, doing the same in the vertex shader will increase the performance, but not that much to become usable for my purpose (drawing).

So, right now I have a set of points that would describe the line nicely, if I would be able to connect them and give each connected segment thickness.

4

1 回答 1

1

在这种情况下经常做的是绘制一个没有平滑的四边形。然后使用平滑的单像素宽线画绘制四边形的轮廓。

于 2012-09-23T14:30:52.360 回答