func ActualizeLight(n uint) { // n < MaxL // var L [4]float64 L[0], L[1], L[2] = lightSource[n].Coord3() var l [4]C.GLfloat for i := 0; i < 3; i++ { l[i] = C.GLfloat(L[i]) } l[3] = C.GLfloat(1.0) C.glLightfv(C.GL_LIGHT0+C.GLenum(n), C.GL_POSITION, &l[0]) C.glLightfv(C.GL_LIGHT0+C.GLenum(n), C.GL_AMBIENT, &aa[n][0]) C.glLightfv(C.GL_LIGHT0+C.GLenum(n), C.GL_DIFFUSE, &dd[n][0]) C.glEnable(C.GL_LIGHT0 + C.GLenum(n)) }
//void glLightfv (GLenum light, GLenum pname, const float *params) func Lightfv(light GLenum, pname GLenum, params []float32) { if len(params) == 0 { panic("Invalid params length") } C.glLightfv(C.GLenum(light), C.GLenum(pname), (*C.GLfloat)(¶ms[0])) }
//void glLightfv (GLenum light, GLenum pname, const float *params) func Lightfv(light GLenum, pname GLenum, params []float32) { if len(params) == 0 { panic(ErrorInputSize) } C.glLightfv(C.GLenum(light), C.GLenum(pname), (*C.GLfloat)(¶ms[0])) }