Swift 替换不推荐使用的函数glLineWidth()
我需要一个属性或方法,允许我控制线的宽度。现在不推荐使用有用且简单的函数glLineWidth:Swift 替换不推荐使用的函数glLineWidth(),swift,opengl-es,scenekit,augmented-reality,arkit,Swift,Opengl Es,Scenekit,Augmented Reality,Arkit,我需要一个属性或方法,允许我控制线的宽度。现在不推荐使用有用且简单的函数glLineWidth: func glLineWidth(_ width: GLfloat) 我可以使用什么函数来代替不推荐使用的函数 下面是制作3D线条的代码: class func drawLine(vector vector1: SCNVector3, toVector vector2: SCNVector3) -> SCNGeometry { let indic
func glLineWidth(_ width: GLfloat)
我可以使用什么函数来代替不推荐使用的函数
下面是制作3D线条的代码:
class func drawLine(vector vector1: SCNVector3,
toVector vector2: SCNVector3) -> SCNGeometry {
let indices: [Int32] = [0, 1]
let source = SCNGeometrySource(vertices: [vector1, vector2]
let element = SCNGeometryElement(indices: indices, primitiveType: .line)
let geometry = SCNGeometry(sources: [source], elements: [element])
return geometry
}
OpenGL中没有替代品,金属中也不存在此功能