Esempio n. 1
0
func (glRenderer *OpenglRenderer) CreateCubeMap(cubeMap *renderer.CubeMap) {
	if cubeMap.Loaded {
		return
	}

	cm := cubeMap
	cubeMap.Id = glRenderer.loadCubeMap(cm.Right, cm.Left, cm.Top, cm.Bottom, cm.Back, cm.Front, uint32(10), cm.Lod)
	cubeMap.Loaded = true
}
Esempio n. 2
0
func (glRenderer *OpenglRenderer) DestroyCubeMap(cubeMap *renderer.CubeMap) {
	if !cubeMap.Loaded {
		return
	}
	gl.DeleteTextures(1, &cubeMap.Id)
	cubeMap.Loaded = false
}