Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Do OpenGL commands copy my data right away?

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2010
    Location
    TX
    Posts
    1

    Do OpenGL commands copy my data right away?

    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.

  2. #2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •