Example #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
}
Example #2
0
func (glRenderer *OpenglRenderer) DestroyCubeMap(cubeMap *renderer.CubeMap) {
	if !cubeMap.Loaded {
		return
	}
	gl.DeleteTextures(1, &cubeMap.Id)
	cubeMap.Loaded = false
}