【问题标题】:How to draw anti-aliased line in cocos2d-x for android games如何在 cocos2d-x 中为安卓游戏绘制抗锯齿线
【发布时间】:2014-03-21 14:43:30
【问题描述】:

问题是我上面问的。一般我们可以使用:


glEnable(GL_LINE_SMOOTH);

但是opengles不支持这种方法,所以我们不能用它来玩安卓游戏。 在 cocos2d-x 中为 android 游戏绘制抗锯齿线有什么好的方法吗?非常感谢任何帮助。

【问题讨论】:

    标签: android opengl-es cocos2d-x


    【解决方案1】:
    try this
    
    CCPoint originPoint=CCPoint(100, 100);
    CCPoint destinationPoint=CCPoint(500, 500);
    
    ccDrawLine(originPoint, destinationPoint); // draw line
    

    【讨论】:

    • 谢谢你。其实我只是按照你说的做了。但是我确实想要一个抗锯齿线。我们可以使用简单的方法:“glEnable(GL_LINE_SMOOTH)”和opengl。但是这个方法不是在opengl-es中支持。那我该怎么办?
    猜你喜欢
    • 1970-01-01
    • 2015-08-15
    • 1970-01-01
    • 2010-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-31
    • 1970-01-01
    相关资源
    最近更新 更多