func (parent H3DNode) AddEmitterNode(name string, materialRes H3DRes, particleEffectRes H3DRes, maxParticleCount int, respawnCount int) H3DNode { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return H3DNode(C.h3dAddEmitterNode(C.H3DNode(parent), cName, C.H3DRes(materialRes), C.H3DRes(particleEffectRes), C.int(maxParticleCount), C.int(respawnCount))) }
func (parent H3DNode) AddMeshNode(name string, materialRes H3DRes, batchStart int, batchCount int, vertRStart int, vertEnd int) H3DNode { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return H3DNode(C.h3dAddMeshNode(C.H3DNode(parent), cName, C.H3DRes(materialRes), C.int(batchStart), C.int(batchCount), C.int(vertRStart), C.int(vertEnd))) }
func ShowText(text string, x float32, y float32, size float32, colR float32, colG float32, colB float32, fontMaterialRes H3DRes) { cText := C.CString(text) defer C.free(unsafe.Pointer(cText)) C.h3dutShowText(cText, C.float(x), C.float(y), C.float(size), C.float(colR), C.float(colG), C.float(colB), C.H3DRes(fontMaterialRes)) }
func SetupModelAnimStage(modelNode H3DNode, stage int, animationRes H3DRes, layer int, startNode string, additive bool) { cStartNode := C.CString(startNode) defer C.free(unsafe.Pointer(cStartNode)) C.h3dSetupModelAnimStage(C.H3DNode(modelNode), C.int(stage), C.H3DRes(animationRes), C.int(layer), cStartNode, Int[additive]) }
func SetMaterialUniform(materialRes H3DRes, name string, a float32, b float32, c float32, d float32) bool { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return Bool[int(C.h3dSetMaterialUniform(C.H3DRes(materialRes), cName, C.float(a), C.float(b), C.float(c), C.float(d)))] }
func RenderTargetData(pipelineRes H3DRes, targetName string, bufIndex int, width *int, height *int, compCount *int, dataBuffer []byte) bool { cTargetName := C.CString(targetName) defer C.free(unsafe.Pointer(cTargetName)) return Bool[int(C.h3dGetRenderTargetData(C.H3DRes(pipelineRes), cTargetName, C.int(bufIndex), (*C.int)(unsafe.Pointer(width)), (*C.int)(unsafe.Pointer(height)), (*C.int)(unsafe.Pointer(compCount)), unsafe.Pointer(&dataBuffer[0]), C.int(len(dataBuffer))))] }
func (parent H3DNode) AddLightNode(name string, materialRes H3DRes, lightingContext string, shadowContext string) H3DNode { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) cLightingContext := C.CString(lightingContext) defer C.free(unsafe.Pointer(cLightingContext)) cShadowContext := C.CString(shadowContext) defer C.free(unsafe.Pointer(cShadowContext)) return H3DNode(C.h3dAddLightNode(C.H3DNode(parent), cName, C.H3DRes(materialRes), cLightingContext, cShadowContext)) }
func ShowOverlays(verts []float32, vertCount int, colR float32, colG float32, colB float32, colA float32, materialRes H3DRes, flags int) { C.h3dShowOverlays((*C.float)(unsafe.Pointer(&verts[0])), C.int(vertCount), C.float(colR), C.float(colG), C.float(colB), C.float(colA), C.H3DRes(materialRes), C.int(flags)) }
func (res H3DRes) SetResParamI(elem int, elemIdx int, param int, value int) { C.h3dSetResParamI(C.H3DRes(res), C.int(elem), C.int(elemIdx), C.int(param), C.int(value)) }
//MapResStream will return an unsafe pointer to the internal C array in Horde. Think about using // other safer typed stream options instead func (res H3DRes) MapResStream(elem int, elemIdx int, stream int, read bool, write bool) unsafe.Pointer { return C.h3dMapResStream(C.H3DRes(res), C.int(elem), C.int(elemIdx), C.int(stream), Int[read], Int[write]) }
func (res H3DRes) UnmapResStream() { C.h3dUnmapResStream(C.H3DRes(res)) }
func (res H3DRes) ResParamStr(elem int, elemIdx int, param int) string { value := C.h3dGetResParamStr(C.H3DRes(res), C.int(elem), C.int(elemIdx), C.int(param)) return C.GoString(value) }
func (res H3DRes) SetResParamStr(elem int, elemIdx int, param int, value string) { cValue := C.CString(value) defer C.free(unsafe.Pointer(cValue)) C.h3dSetResParamStr(C.H3DRes(res), C.int(elem), C.int(elemIdx), C.int(param), cValue) }
func (res H3DRes) ResParamF(elem int, elemIdx int, param int, compIdx int) float32 { return float32(C.h3dGetResParamF(C.H3DRes(res), C.int(elem), C.int(elemIdx), C.int(param), C.int(compIdx))) }
func (res H3DRes) SetResParamF(elem int, elemIdx int, param int, compIdx int, value float32) { C.h3dSetResParamF(C.H3DRes(res), C.int(elem), C.int(elemIdx), C.int(param), C.int(compIdx), C.float(value)) }
func ResizePipelineBuffers(pipeRes H3DRes, width int, height int) { C.h3dResizePipelineBuffers(C.H3DRes(pipeRes), C.int(width), C.int(height)) }
func NextResource(resType int, start H3DRes) H3DRes { return H3DRes(C.h3dGetNextResource(C.int(resType), C.H3DRes(start))) }
func (parent H3DNode) AddNodes(sceneGraphRes H3DRes) H3DNode { return H3DNode(C.h3dAddNodes(C.H3DNode(parent), C.H3DRes(sceneGraphRes))) }
func (res H3DRes) Type() int { return int(C.h3dGetResType(C.H3DRes(res))) }
func (res H3DRes) Unload() { C.h3dUnloadResource(C.H3DRes(res)) }
func (res H3DRes) Load(data []byte) bool { return Bool[int(C.h3dLoadResource(C.H3DRes(res), (*C.char)(unsafe.Pointer(&data[0])), C.int(len(data))))] }
func (res H3DRes) IsLoaded() bool { return Bool[int(C.h3dIsResLoaded(C.H3DRes(res)))] }
func (res H3DRes) Remove() int { return int(C.h3dRemoveResource(C.H3DRes(res))) }
func (sourceRes H3DRes) Clone(name string) H3DRes { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return H3DRes(C.h3dCloneResource(C.H3DRes(sourceRes), cName)) }
func (res H3DRes) ElemCount(elem int) int { return int(C.h3dGetResElemCount(C.H3DRes(res), C.int(elem))) }
func (res H3DRes) Name() string { return C.GoString(C.h3dGetResName(C.H3DRes(res))) }
func (parent H3DNode) AddModelNode(name string, geometryRes H3DRes) H3DNode { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return H3DNode(C.h3dAddModelNode(C.H3DNode(parent), cName, C.H3DRes(geometryRes))) }
func (res H3DRes) FindResElem(elem int, param int, value string) int { cValue := C.CString(value) defer C.free(unsafe.Pointer(cValue)) return int(C.h3dFindResElem(C.H3DRes(res), C.int(elem), C.int(param), cValue)) }
func ShowFrameStats(fontMaterialRes H3DRes, panelMaterialRes H3DRes, mode int) { C.h3dutShowFrameStats(C.H3DRes(fontMaterialRes), C.H3DRes(panelMaterialRes), C.int(mode)) }
func (res H3DRes) ResParamI(elem int, elemIdx int, param int) int { return int(C.h3dGetResParamI(C.H3DRes(res), C.int(elem), C.int(elemIdx), C.int(param))) }