Exemple #1
0
func DrawObjects(objRef ObjectRef, count int, positions []DrawInfo, lighting, earthRelative bool) {
	if len(positions) == 0 {
		C.XPLMDrawObjects(C.XPLMObjectRef(objRef), C.int(count), nil, C.int(goplane.FromBoolToInt(lighting)), C.int(goplane.FromBoolToInt(earthRelative)))
	} else {
		C.XPLMDrawObjects(C.XPLMObjectRef(objRef), C.int(count), (*C.XPLMDrawInfo_t)(unsafe.Pointer(&positions[0])), C.int(goplane.FromBoolToInt(lighting)), C.int(goplane.FromBoolToInt(earthRelative)))
	}
}
Exemple #2
0
func UnloadObject(objRef ObjectRef) {
	C.XPLMUnloadObject(C.XPLMObjectRef(objRef))
}