Dat Chu
11-06-2010, 01:59 PM
I have a variable that is on stack
float myVars[4] = {0.f,0.f,1.f,0.f};
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glLightfv(GL_LIGHT0, GL_POSITION, myVars)
Will OpenGL copy the data right at this point? Since after this line my myVars variable will go out of scope and get destroyed.
float myVars[4] = {0.f,0.f,1.f,0.f};
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glLightfv(GL_LIGHT0, GL_POSITION, myVars)
Will OpenGL copy the data right at this point? Since after this line my myVars variable will go out of scope and get destroyed.