【问题标题】:iPhone OpenGL to draw a solid line?iPhone OpenGL 画一条实线?
【发布时间】:2010-04-15 15:07:20
【问题描述】:

我正在尝试修改来自苹果的 GLPaint 示例以绘制一条实线,而不是其中的透明霓虹灯线。我正在尝试实现触摸漆功能,使其看起来像喷漆效果。我尝试禁用 glblend 但没有效果。而且我还试图让 OpenGL 在背景图像上绘制而不是默认的黑色。或者是否可以让 Open GL 在具有透明背景的 UIImageView 上进行绘制?

【问题讨论】:

    标签: iphone opengl-es


    【解决方案1】:

    在paintingView.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
    

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

    希望它会有所帮助。 沙尼

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多