Exemple #1
0
func (buffer *LightBuffer) SetNbLights(nbLights uint32) {
	if nbLights > nbLightsMax {
		panic("too many lights")
	}
	buffer.data.nbLights = gl.GLuint(nbLights)
	buffer.bufferdataClean = false
}
Exemple #2
0
func (bank *TextureBank) Enter() {
	for key, value := range bank.Samplers {
		value.Parameters(&bank.SamplerParameters[key])
	}
	for key, value := range bank.Units {
		gl.ActiveTexture(gl.TEXTURE0 + gl.GLenum(key))
		value.Texture.Bind(value.Target)
		value.Sampler.Bind(gl.GLuint(key))
	}
}