iPhone OpenGL能够画出实线吗?

时间:2010-04-15 15:07:20

标签: iphone opengl-es

我正在尝试修改Apple的GLPaint样本以绘制实线而不是透明的霓虹灯线。我试图实现触摸绘画功能,看起来像喷漆效果。我试过禁用glblend但没有效果。而且我也试图让OpenGL在背景图像上绘制而不是默认的黑色。或者是否可以在具有透明背景的UIImageView上绘制Open GL?

1 个答案:

答案 0 :(得分:1)

在painView.h中你会发现:

#define kBrushOpacity   1.0 //the opacity of the line
#define kBrushPixelStep 1 // the density the dots
#define kBrushScale     14 //thickens  of the line (1 = thickest)
#define kLuminosity     0.5 // the Luminosity. I think that this is what you have to play with
#define kSaturation     1.0 //the Saturation of the line color

更改这些参数将使您获得实线。 上面的设置假设给你一条很细的实线。

希望它会有所帮助。 SHANI

相关问题