1

I was trying to make a cube to backface cull the side outwards, I succesfully completed my indicies so it worked. But I stumbled upon a wierd thing, were when I for example wanted to change // bot indicies it didn't update in program until, I resized my GLuint indicies[36] to GLuint indicies[30] and out commented the // bot and runned the program and the put it back to GLuint indicies[36].

Are the EBO or indicies stored in the GPU between program runs? I delete vao, vbo and ebo when I destroy my class?

Here is my cube verticies and indicies:

    GLfloat skyboxVertices[24] = {        
            // front
            1.0, -1.0,  1.0,
            1.0, -1.0,  1.0,
            1.0,  1.0,  1.0,
            -1.0,  1.0,  1.0,
            // back
            -1.0, -1.0, -1.0,
            1.0, -1.0, -1.0,
            1.0,  1.0, -1.0,
            -1.0,  1.0, -1.0,
        };

GLuint indicies[36] = {

        // front
        0, 2, 1,
        2, 0, 3,
        // back
        4, 5, 6,
        6, 7, 4,
        // right
        1, 6, 5,
        1, 2, 6,
        // left
        0, 4, 7,
        7, 3, 0,
        // top
        2, 3, 7,
        2, 7, 6,
        // bot
        0, 1, 4,
        5, 4, 1,
    };

Thanks for reply beforehand!

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
  • No, they are not stored anywhere between two executions. Are you sure you recompiled your code properly? – BDL Apr 07 '18 at 21:11
  • I use Visual Studio and use their command: CTRL + SHIFT + B to compile between executions, do I have to recompile the whole project to update it? – Adrian Nordin Apr 08 '18 at 08:06
  • Doing a "Build" should be fine. I tried to replicate your behavior (pasting your code, adding commandline output), but unfortunately I'm not able to reproduce it. For me, everytime I build new values are displayed. – BDL Apr 08 '18 at 15:41

0 Answers0